net.sf.jasperreports.components.map.fill

## Class MapFillComponent

- java.lang.Object
- - net.sf.jasperreports.engine.component.BaseFillComponent
  - - net.sf.jasperreports.components.map.fill.MapFillComponent

- All Implemented Interfaces:
    FillContextProvider, FillComponent

      public class MapFillComponent
      extends BaseFillComponent
      implements FillContextProvider

  Version:
    $Id: MapFillComponent.java 6939 2014-02-28 17:01:35Z teodord $
  Author:
    Teodor Danciu (teodord@users.sourceforge.net)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `DEFAULT_ENCODING`
    `static java.lang.String` | `LATITUDE_NODE`
    `static java.lang.String` | `LONGITUDE_NODE`
    `static java.lang.String` | `PLACE_URL_PREFIX`
    `static java.lang.String` | `PLACE_URL_SUFFIX`
    `static java.lang.String` | `STATUS_NODE`
    `static java.lang.String` | `STATUS_OK`

    - ### Fields inherited from class net.sf.jasperreports.engine.component.BaseFillComponent

      `elementId, fillContext, printElementOriginator`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MapFillComponent(MapComponent map)`
    `MapFillComponent(MapComponent map, JRFillObjectFactory factory)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and 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 throws `UnsupportedOperationException`.
    `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()`
    `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(java.util.Map<java.lang.String,java.lang.Object> parentStyleMap, java.util.Map<java.lang.String,java.lang.Object> styleMap)`
    `protected void` | `setStyle(java.lang.String styleName, java.util.Map<java.lang.String,java.lang.Object> styleMap)`

    - ### Methods inherited from class net.sf.jasperreports.engine.component.BaseFillComponent

      `deduplicate, evaluateExpression, initialize, rewind`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### PLACE_URL_PREFIX

          public static final java.lang.String PLACE_URL_PREFIX

      See Also:
        Constant Field Values

    - #### PLACE_URL_SUFFIX

          public static final java.lang.String PLACE_URL_SUFFIX

      See Also:
        Constant Field Values

    - #### DEFAULT_ENCODING

          public static final java.lang.String DEFAULT_ENCODING

      See Also:
        Constant Field Values

    - #### STATUS_NODE

          public static final java.lang.String STATUS_NODE

      See Also:
        Constant Field Values

    - #### LATITUDE_NODE

          public static final java.lang.String LATITUDE_NODE

      See Also:
        Constant Field Values

    - #### LONGITUDE_NODE

          public static final java.lang.String LONGITUDE_NODE

      See Also:
        Constant Field Values

    - #### STATUS_OK

          public static final java.lang.String STATUS_OK

      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 interface `FillContextProvider`

    - #### 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 on `FillComponent.evaluateDelayedElement(JRPrintElement, byte)`.

      Specified by:
        `evaluate` in interface `FillComponent`
      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`

    - #### setStyle

          protected void setStyle(java.lang.String styleName,
                      java.util.Map<java.lang.String,java.lang.Object> styleMap)

    - #### setStyle

          protected void setStyle(java.util.Map<java.lang.String,java.lang.Object> parentStyleMap,
                      java.util.Map<java.lang.String,java.lang.Object> styleMap)

    - #### 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 interface `FillComponent`
      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 interface `FillComponent`
      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 throws `UnsupportedOperationException`.

      If a component supports delayed evaluation, it needs to override this method.

      Specified by:
        `evaluateDelayedElement` in interface `FillComponent`
      Overrides:
        `evaluateDelayedElement` in class `BaseFillComponent`
      Parameters:
        `element` - the print element for which delayed evaluation has been registered
        `evaluation` - the evaluation type
      Throws:
        `JRException`
      See Also:
        `FillComponent.evaluate(byte)`

    - #### copy

          protected void copy(JRGenericPrintElement printElement)

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com