Package com.luciad.view.map
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
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/orreplaced
. - 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 bedeactivated
if needed.
- See Also:
-
Field Summary
Fields inherited from interface com.luciad.view.gxy.ILcdGXYView
CENTER, LOWERLEFT, LOWERRIGHT, UPPERLEFT, UPPERRIGHT
-
Constructor Summary
ConstructorDescriptionConstructs a new, emptyBufferedImage
basedILcdGXYView
.TLcdMapBufferedImage
(boolean aRegisterInstance) Deprecated.This class does not support bean registering.TLcdMapBufferedImage
(int aBufferedImageType) Constructs a new, emptyBufferedImage
basedILcdGXYView
of the given image type.TLcdMapBufferedImage
(int aBufferedImageType, ILcdTreeLayeredSupport aTreeLayeredSupport) Constructs a new, emptyBufferedImage
basedILcdGXYView
of the given image type.TLcdMapBufferedImage
(int aBufferedImageType, IndexColorModel aIndexColorModel) Constructs a new, emptyBufferedImage
basedILcdGXYView
of the given image type, with a givenIndexColorModel
.TLcdMapBufferedImage
(int aBufferedImageType, IndexColorModel aIndexColorModel, ILcdTreeLayeredSupport aTreeLayeredSupport) Constructs a new, emptyBufferedImage
basedILcdGXYView
of the given image type, with a givenIndexColorModel
. -
Method Summary
Modifier and TypeMethodDescriptionReturns the grid layer that was configured usingsetGridLayer(com.luciad.view.gxy.ILcdGXYLayer)
, if any.boolean
boolean
Returns whether or not the map includes a configured grid layer.void
setAutoAdjustOnSetXYWorldReference
(boolean aBoolean) void
setGridLayer
(ILcdGXYLayer aGridLayer) Configures the given layer as the grid layer of this map.void
setWithGridLayer
(boolean aWithGridLayer) Enables or disables the configured grid layer.void
setXYWorldReference
(ILcdXYWorldReference aXYWorldReference) Sets the property of XYWorlReference to aXYWorldReference.Methods inherited from class com.luciad.view.gxy.TLcdGXYViewBufferedImage
addGXYLayer, addGXYLayer, addLayeredListener, addLayerSelectionListener, addModel, addModelListener, addPropertyChangeListener, addStatusListener, addViewInvalidationListener, asGXYView, containsLayer, getBackground, getCornerIcon, getDefaultPen, getDisplayName, getForeground, getGraphics, getGXYController, getGXYLayerFactory, getGXYViewLabelPainter, getGXYViewLabelPlacer, getGXYViewXYWorldTransformation, getHeight, getImage, getLayer, getMaximumSize, getMaxScale, getMinimumSize, getMinScale, getName, getNumberOfCachedBackgroundLayers, getPaintExceptionHandler, getPaintExecutorService, getPaintingMode, getPreferredSize, getRootNode, getRotation, getScale, getScaleX, getScaleY, getViewOrigin, getWidth, getWorldOrigin, getXYWorldReference, hasValidImage, indexOf, invalidate, invalidateAndWait, invalidateGXYLayer, invalidateGXYLayerAndWait, invalidateRegion, invalidateRegionAndWait, invalidateRegionSelection, invalidateRegionSelectionAndWait, invalidateSelection, invalidateSelectionAndWait, isAntiAliased, isAsynchronousAllowed, isAutoUpdate, isCopyrightNoticeEnabled, isDoubleBuffered, isDrawOffScreenImageOnPaint, isPaintInBackground, isTraceOn, isUpdateLabelsOnSelectionChanged, isWaitCursorOn, layerCount, layerOf, layers, layersBackwards, modelProduced, moveLayerAt, paint, paintGXYView, pan, print, putCornerIcon, removeAllLayers, removeLayer, removeLayeredListener, removeLayerSelectionListener, removeModel, removeModelListener, removePropertyChangeListener, removeStatusListener, removeViewInvalidationListener, repaint, repaint, setAntiAliased, setAsynchronousAllowed, setAutoUpdate, setBackground, setClassTraceOn, setCopyrightNoticeEnabled, setCursor, setDefaultPen, setDisplayName, setDrawOffScreenImageOnPaint, setForeground, setGXYController, setGXYLayerFactory, setGXYViewLabelPainter, setGXYViewLabelPlacer, setHeight, setMaximumSize, setMaxScale, setMinimumSize, setMinScale, setName, setNumberOfCachedBackgroundLayers, setPaintExceptionHandler, setPaintExecutorService, setPaintInBackground, setPaintingMode, setPreferredSize, setRotation, setRotation, setRotation, setScale, setScale, setScale, setScale, setTraceOn, setUpdateLabelsOnSelectionChanged, setViewOrigin, setViewOrigin, setViewOrigin, setWaitCursorOn, setWidth, setWorldOrigin, setWorldOrigin, setWorldOrigin, setXYWorldReference, setXYWorldReference, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.luciad.view.gxy.ILcdGXYView
getLayers, getMapScale, getMapScaleRange, setMapScale, setMapScaleRange
Methods inherited from interface com.luciad.view.ILcdLayered
addLayeredListener, removeLayeredListener
-
Constructor Details
-
TLcdMapBufferedImage
public TLcdMapBufferedImage()Constructs a new, emptyBufferedImage
basedILcdGXYView
. The internal image is of typeBufferedImage.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
asILcdXYWorldReference
, with an instance ofTLcdEquidistantCylindrical
asILcdProjection
,- See Also:
-
TLcdMapBufferedImage
public TLcdMapBufferedImage(int aBufferedImageType) Constructs a new, emptyBufferedImage
basedILcdGXYView
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
asILcdXYWorldReference
, with an instance ofTLcdEquidistantCylindrical
asILcdProjection
,- Parameters:
aBufferedImageType
- the type of theBufferedImage
.- See Also:
-
TLcdMapBufferedImage
Constructs a new, emptyBufferedImage
basedILcdGXYView
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
asILcdXYWorldReference
, with an instance ofTLcdEquidistantCylindrical
asILcdProjection
,- Parameters:
aBufferedImageType
- the type of theBufferedImage
.aTreeLayeredSupport
- an instance ofILcdTreeLayeredSupport
used to store the layers- See Also:
-
TLcdMapBufferedImage
Constructs a new, emptyBufferedImage
basedILcdGXYView
of the given image type, with a givenIndexColorModel
. 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
asILcdXYWorldReference
, with an instance ofTLcdEquidistantCylindrical
asILcdProjection
,- Parameters:
aBufferedImageType
- the type of theBufferedImage
aIndexColorModel
- the index color model- See Also:
-
TLcdMapBufferedImage
public TLcdMapBufferedImage(int aBufferedImageType, IndexColorModel aIndexColorModel, ILcdTreeLayeredSupport aTreeLayeredSupport) Constructs a new, emptyBufferedImage
basedILcdGXYView
of the given image type, with a givenIndexColorModel
. 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
asILcdXYWorldReference
, with an instance ofTLcdEquidistantCylindrical
asILcdProjection
,- Parameters:
aBufferedImageType
- the type of theBufferedImage
aIndexColorModel
- the index color modelaTreeLayeredSupport
- an instance ofILcdTreeLayeredSupport
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
Returns the grid layer that was configured usingsetGridLayer(com.luciad.view.gxy.ILcdGXYLayer)
, if any.- Returns:
- the grid layer of this map, or
null
if no grid layer was configured
-
setGridLayer
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. Iftrue
, a grid layer is created (if needed) and added to the view. Iffalse
, 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 thisILcdGXYView
still centered on the same model point, when setting a newILcdProjection
. If false the setXYWorldReference will call super.setXYWorldReference
-
isAutoAdjustOnSetXYWorldReference
public boolean isAutoAdjustOnSetXYWorldReference()- See Also:
-
setXYWorldReference
Sets the property of XYWorlReference to aXYWorldReference. If isAutoAdjustOnSetXYWorldReference returns true, it tries to adapt the properties viewOrigin and worldOrigin to the newILcdXYWorldReference
such that the view is still centered on the same model point.- Specified by:
setXYWorldReference
in interfaceILcdGXYView
- Overrides:
setXYWorldReference
in classTLcdGXYViewBufferedImage
- Parameters:
aXYWorldReference
- the newILcdXYWorldReference
associated to this view- See Also:
-