Class TLcdMapBufferedImage

java.lang.Object
com.luciad.view.gxy.TLcdGXYViewBufferedImage
com.luciad.view.map.TLcdMapBufferedImage
All Implemented Interfaces:
ILcdModelProducerListener, ILcdPropertyChangeSource, ILcdRotationCapable, ILcdStatusSource, ILcdGXYView, ILcdGXYViewXYWorldTransformationProvider, ILcdRotationCapableGXYView, ILcdLayered, ILcdTreeLayered, ILcdView, Serializable, EventListener

public class TLcdMapBufferedImage extends TLcdGXYViewBufferedImage
TLcdGXYViewBufferedImage extension suited for displaying maps. It adds the following extra behavior:
  • a grid layer (a longitude/latitude grid by default) that can be enabled or disabled and/or replaced.
  • a WGS 84 based grid reference with an equidistant cylindrical projection and a default scale that fits the entire world
  • a redefined setXYWorldReference method that keeps the map centered on the same model point. This behavior is enabled by default but can be deactivated if needed.
See Also:
  • Constructor Details

    • TLcdMapBufferedImage

      public TLcdMapBufferedImage()
      Constructs a new, empty BufferedImage based ILcdGXYView. The internal image is of type BufferedImage.TYPE_INT_RGB. Auto-update is activated by default, no background layers are cached, and no default user interaction is provided.

      The map has a TLcdGridReference as ILcdXYWorldReference, with an instance of TLcdEquidistantCylindrical as ILcdProjection,

      See Also:
    • TLcdMapBufferedImage

      public TLcdMapBufferedImage(int aBufferedImageType)
      Constructs a new, empty BufferedImage based ILcdGXYView of the given image type. Auto-update is activated by default, no background layers are cached, and no default user interaction is provided.

      The map has a TLcdGridReference as ILcdXYWorldReference, with an instance of TLcdEquidistantCylindrical as ILcdProjection,

      Parameters:
      aBufferedImageType - the type of the BufferedImage.
      See Also:
    • TLcdMapBufferedImage

      public TLcdMapBufferedImage(int aBufferedImageType, ILcdTreeLayeredSupport aTreeLayeredSupport)
      Constructs a new, empty BufferedImage based ILcdGXYView of the given image type. Auto-update is activated by default, no background layers are cached, and no default user interaction is provided.

      The map has a TLcdGridReference as ILcdXYWorldReference, with an instance of TLcdEquidistantCylindrical as ILcdProjection,

      Parameters:
      aBufferedImageType - the type of the BufferedImage.
      aTreeLayeredSupport - an instance of ILcdTreeLayeredSupport used to store the layers
      See Also:
    • TLcdMapBufferedImage

      public TLcdMapBufferedImage(int aBufferedImageType, IndexColorModel aIndexColorModel)
      Constructs a new, empty BufferedImage based ILcdGXYView of the given image type, with a given IndexColorModel. All colors that are used when painting on this view are approximated by colors from the given color model. Auto-update is activated by default, no background layers are cached, and no default user interaction is provided.

      The map has a TLcdGridReference as ILcdXYWorldReference, with an instance of TLcdEquidistantCylindrical as ILcdProjection,

      Parameters:
      aBufferedImageType - the type of the BufferedImage
      aIndexColorModel - the index color model
      See Also:
    • TLcdMapBufferedImage

      public TLcdMapBufferedImage(int aBufferedImageType, IndexColorModel aIndexColorModel, ILcdTreeLayeredSupport aTreeLayeredSupport)
      Constructs a new, empty BufferedImage based ILcdGXYView of the given image type, with a given IndexColorModel. All colors that are used when painting on this view are approximated by colors from the given color model. Auto-update is activated by default, no background layers are cached, and no default user interaction is provided.

      The map has a TLcdGridReference as ILcdXYWorldReference, with an instance of TLcdEquidistantCylindrical as ILcdProjection,

      Parameters:
      aBufferedImageType - the type of the BufferedImage
      aIndexColorModel - the index color model
      aTreeLayeredSupport - an instance of ILcdTreeLayeredSupport used to store the layers
      See Also:
    • TLcdMapBufferedImage

      public TLcdMapBufferedImage(boolean aRegisterInstance)
      Deprecated.
      This class does not support bean registering. Use the default constructor instead.
  • Method Details

    • getGridLayer

      public ILcdGXYLayer getGridLayer()
      Returns the grid layer that was configured using setGridLayer(com.luciad.view.gxy.ILcdGXYLayer), if any.
      Returns:
      the grid layer of this map, or null if no grid layer was configured
    • setGridLayer

      public void setGridLayer(ILcdGXYLayer aGridLayer)
      Configures the given layer as the grid layer of this map. The previously configured grid layer (if any) is removed and the layer is added to the top of the view, or to the position of the previously configured grid layer.
      Parameters:
      aGridLayer - the new layer to configure as grid layer
    • isWithGridLayer

      public boolean isWithGridLayer()
      Returns whether or not the map includes a configured grid layer.
      Returns:
      true if the map has a configured and enabled grid layer, false otherwise.
      See Also:
    • setWithGridLayer

      public void setWithGridLayer(boolean aWithGridLayer)
      Enables or disables the configured grid layer. If true, a grid layer is created (if needed) and added to the view. If false, the configured grid layer (if any) is removed from the view.
      Parameters:
      aWithGridLayer - true if the map has a configured grid layer, false otherwise.
      See Also:
    • setAutoAdjustOnSetXYWorldReference

      public void setAutoAdjustOnSetXYWorldReference(boolean aBoolean)
      Parameters:
      aBoolean - if true the setXYWorldReference method will be redefined in order to keep this ILcdGXYView still centered on the same model point, when setting a new ILcdProjection. If false the setXYWorldReference will call super.setXYWorldReference
    • isAutoAdjustOnSetXYWorldReference

      public boolean isAutoAdjustOnSetXYWorldReference()
      See Also:
    • setXYWorldReference

      public void setXYWorldReference(ILcdXYWorldReference aXYWorldReference)
      Sets the property of XYWorlReference to aXYWorldReference. If isAutoAdjustOnSetXYWorldReference returns true, it tries to adapt the properties viewOrigin and worldOrigin to the new ILcdXYWorldReference such that the view is still centered on the same model point.
      Specified by:
      setXYWorldReference in interface ILcdGXYView
      Overrides:
      setXYWorldReference in class TLcdGXYViewBufferedImage
      Parameters:
      aXYWorldReference - the new ILcdXYWorldReference associated to this view
      See Also: