Class MapFillComponent
- java.lang.Object
-
- net.sf.jasperreports.engine.component.BaseFillComponent
-
- net.sf.jasperreports.components.map.fill.MapFillComponent
-
- All Implemented Interfaces:
FillComponent
,FillContextProvider
public class MapFillComponent extends BaseFillComponent implements FillContextProvider
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_ENCODING
static String
EXCEPTION_MESSAGE_KEY_ADDRESS_REQUEST_FAILED
static String
EXCEPTION_MESSAGE_KEY_INVALID_ADDRESS_COORDINATES
static String
EXCEPTION_MESSAGE_KEY_INVALID_LEGEND_PROPERTY_VALUE
static String
EXCEPTION_MESSAGE_KEY_INVALID_LEGEND_SIZE_PROPERTY_VALUE
static String
EXCEPTION_MESSAGE_KEY_INVALID_ORIENTATION_VALUE
static String
EXCEPTION_MESSAGE_KEY_INVALID_POSITION_VALUE
static String
EXCEPTION_MESSAGE_KEY_NULL_OR_EMPTY_VALUE_NOT_ALLOWED
static String
EXCEPTION_MESSAGE_KEY_NULL_OR_EMPTY_VALUES_NOT_ALLOWED
static String
LATITUDE_NODE
static String
LONGITUDE_NODE
static String
PLACE_URL_PREFIX
static String
PLACE_URL_SUFFIX
static String
STATUS_NODE
static String
STATUS_OK
-
Fields inherited from class net.sf.jasperreports.engine.component.BaseFillComponent
fillContext, printElementOriginator
-
-
Constructor Summary
Constructors Constructor Description MapFillComponent(MapComponent map)
MapFillComponent(MapComponent map, JRFillObjectFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addPathStyles(byte evaluation)
protected void
copy(JRGenericPrintElement printElement)
void
evaluate(byte evaluation)
Evaluates the fill component.void
evaluateDelayedElement(JRPrintElement element, byte evaluation)
The default implementation throwsUnsupportedOperationException
.protected void
evaluateMap(byte evaluation)
JRPrintElement
fill()
Fills the component by creating a print element which will be included in the generated report.FillContext
getFillContext()
protected MapComponent
getMap()
String
getReqParams()
protected boolean
isEvaluateNow()
FillPrepareResult
prepare(int availableHeight)
Prepares to fill the component by deciding whether the component will print, and how much vertical space it will require.protected void
setStyle(String styleName, Map<String,Object> styleMap)
protected void
setStyle(Map<String,Object> parentStyleMap, Map<String,Object> styleMap)
-
Methods inherited from class net.sf.jasperreports.engine.component.BaseFillComponent
deduplicate, evaluateExpression, initialize, rewind
-
-
-
-
Field Detail
-
PLACE_URL_PREFIX
public static final String PLACE_URL_PREFIX
- See Also:
- Constant Field Values
-
PLACE_URL_SUFFIX
public static final String PLACE_URL_SUFFIX
- See Also:
- Constant Field Values
-
DEFAULT_ENCODING
public static final String DEFAULT_ENCODING
- See Also:
- Constant Field Values
-
STATUS_NODE
public static final String STATUS_NODE
- See Also:
- Constant Field Values
-
LATITUDE_NODE
public static final String LATITUDE_NODE
- See Also:
- Constant Field Values
-
LONGITUDE_NODE
public static final String LONGITUDE_NODE
- See Also:
- Constant Field Values
-
STATUS_OK
public static final String STATUS_OK
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_NULL_OR_EMPTY_VALUE_NOT_ALLOWED
public static final String EXCEPTION_MESSAGE_KEY_NULL_OR_EMPTY_VALUE_NOT_ALLOWED
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_NULL_OR_EMPTY_VALUES_NOT_ALLOWED
public static final String EXCEPTION_MESSAGE_KEY_NULL_OR_EMPTY_VALUES_NOT_ALLOWED
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_INVALID_ADDRESS_COORDINATES
public static final String EXCEPTION_MESSAGE_KEY_INVALID_ADDRESS_COORDINATES
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_ADDRESS_REQUEST_FAILED
public static final String EXCEPTION_MESSAGE_KEY_ADDRESS_REQUEST_FAILED
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_INVALID_POSITION_VALUE
public static final String EXCEPTION_MESSAGE_KEY_INVALID_POSITION_VALUE
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_INVALID_ORIENTATION_VALUE
public static final String EXCEPTION_MESSAGE_KEY_INVALID_ORIENTATION_VALUE
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_INVALID_LEGEND_PROPERTY_VALUE
public static final String EXCEPTION_MESSAGE_KEY_INVALID_LEGEND_PROPERTY_VALUE
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_INVALID_LEGEND_SIZE_PROPERTY_VALUE
public static final String EXCEPTION_MESSAGE_KEY_INVALID_LEGEND_SIZE_PROPERTY_VALUE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MapFillComponent
public MapFillComponent(MapComponent map)
-
MapFillComponent
public MapFillComponent(MapComponent map, JRFillObjectFactory factory)
-
-
Method Detail
-
getMap
protected MapComponent getMap()
-
getFillContext
public FillContext getFillContext()
- Specified by:
getFillContext
in interfaceFillContextProvider
-
evaluate
public void evaluate(byte evaluation) throws JRException
Description copied from interface:FillComponent
Evaluates the fill component.This method would evaluate the component expressions and store the results to be used in
FillComponent.fill()
.If the component needs to delay the evaluation of some of its expressions, it would call
FillContext.registerDelayedEvaluation(JRPrintElement, EvaluationTimeEnum, String)
to register a delayed evaluation print element, and perform the delayed evaluations onFillComponent.evaluateDelayedElement(JRPrintElement, byte)
.- Specified by:
evaluate
in interfaceFillComponent
- Parameters:
evaluation
- the evaluation type- Throws:
JRException
- See Also:
FillContext.evaluate(net.sf.jasperreports.engine.JRExpression, byte)
-
evaluateMap
protected void evaluateMap(byte evaluation) throws JRException
- Throws:
JRException
-
addPathStyles
protected void addPathStyles(byte evaluation) throws JRException
- Throws:
JRException
-
isEvaluateNow
protected boolean isEvaluateNow()
-
prepare
public FillPrepareResult prepare(int availableHeight)
Description copied from interface:FillComponent
Prepares to fill the component by deciding whether the component will print, and how much vertical space it will require.- Specified by:
prepare
in interfaceFillComponent
- Parameters:
availableHeight
- the amount of vertical space available for the component, starting from the top of the component element.- Returns:
- the result of the preparation, which specifies whether the component will print and how much it will stretch vertically.
-
fill
public JRPrintElement fill()
Description copied from interface:FillComponent
Fills the component by creating a print element which will be included in the generated report.This method will get called only if
FillComponent.prepare(int)
returned a result that indicated that the component will print.- Specified by:
fill
in interfaceFillComponent
- Returns:
- the print element generated by the component
-
evaluateDelayedElement
public void evaluateDelayedElement(JRPrintElement element, byte evaluation) throws JRException
Description copied from class:BaseFillComponent
The default implementation throwsUnsupportedOperationException
.If a component supports delayed evaluation, it needs to override this method.
- Specified by:
evaluateDelayedElement
in interfaceFillComponent
- Overrides:
evaluateDelayedElement
in classBaseFillComponent
- Parameters:
element
- the print element for which delayed evaluation has been registeredevaluation
- the evaluation type- Throws:
JRException
- See Also:
FillComponent.evaluate(byte)
-
copy
protected void copy(JRGenericPrintElement printElement)
-
getReqParams
public String getReqParams()
-
-