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 StringDEFAULT_ENCODINGstatic StringEXCEPTION_MESSAGE_KEY_ADDRESS_REQUEST_FAILEDstatic StringEXCEPTION_MESSAGE_KEY_INVALID_ADDRESS_COORDINATESstatic StringEXCEPTION_MESSAGE_KEY_INVALID_LEGEND_PROPERTY_VALUEstatic StringEXCEPTION_MESSAGE_KEY_INVALID_LEGEND_SIZE_PROPERTY_VALUEstatic StringEXCEPTION_MESSAGE_KEY_INVALID_ORIENTATION_VALUEstatic StringEXCEPTION_MESSAGE_KEY_INVALID_POSITION_VALUEstatic StringEXCEPTION_MESSAGE_KEY_NULL_OR_EMPTY_VALUE_NOT_ALLOWEDstatic StringEXCEPTION_MESSAGE_KEY_NULL_OR_EMPTY_VALUES_NOT_ALLOWEDstatic StringLATITUDE_NODEstatic StringLONGITUDE_NODEstatic StringPLACE_URL_PREFIXstatic StringPLACE_URL_SUFFIXstatic StringSTATUS_NODEstatic StringSTATUS_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 voidaddPathStyles(byte evaluation)protected voidcopy(JRGenericPrintElement printElement)voidevaluate(byte evaluation)Evaluates the fill component.voidevaluateDelayedElement(JRPrintElement element, byte evaluation)The default implementation throwsUnsupportedOperationException.protected voidevaluateMap(byte evaluation)JRPrintElementfill()Fills the component by creating a print element which will be included in the generated report.FillContextgetFillContext()protected MapComponentgetMap()StringgetReqParams()protected booleanisEvaluateNow()FillPrepareResultprepare(int availableHeight)Prepares to fill the component by deciding whether the component will print, and how much vertical space it will require.protected voidsetStyle(String styleName, Map<String,Object> styleMap)protected voidsetStyle(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:
getFillContextin interfaceFillContextProvider
-
evaluate
public void evaluate(byte evaluation) throws JRExceptionDescription copied from interface:FillComponentEvaluates 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:
evaluatein 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:FillComponentPrepares to fill the component by deciding whether the component will print, and how much vertical space it will require.- Specified by:
preparein 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:FillComponentFills 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:
fillin interfaceFillComponent- Returns:
- the print element generated by the component
-
evaluateDelayedElement
public void evaluateDelayedElement(JRPrintElement element, byte evaluation) throws JRException
Description copied from class:BaseFillComponentThe default implementation throwsUnsupportedOperationException.If a component supports delayed evaluation, it needs to override this method.
- Specified by:
evaluateDelayedElementin interfaceFillComponent- Overrides:
evaluateDelayedElementin 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()
-
-