public class TLcdMapBufferedImage extends TLcdGXYViewBufferedImage
TLcdGXYViewBufferedImage
extension suited for displaying maps.
It adds the following extra behavior:
enabled or disabled
and/or replaced
.
setXYWorldReference
method that keeps the map centered on the same model point.
This behavior is enabled by default but can be deactivated
if needed.
CENTER, LOWERLEFT, LOWERRIGHT, UPPERLEFT, UPPERRIGHT
Constructor and Description |
---|
TLcdMapBufferedImage()
Constructs a new, empty
BufferedImage based ILcdGXYView . |
TLcdMapBufferedImage(boolean aRegisterInstance)
Deprecated.
This class does not support bean registering. Use the default constructor instead.
|
TLcdMapBufferedImage(int aBufferedImageType)
Constructs a new, empty
BufferedImage based ILcdGXYView of the given image type. |
TLcdMapBufferedImage(int aBufferedImageType,
ILcdTreeLayeredSupport aTreeLayeredSupport)
Constructs a new, empty
BufferedImage based ILcdGXYView of the given image type. |
TLcdMapBufferedImage(int aBufferedImageType,
IndexColorModel aIndexColorModel)
Constructs a new, empty
BufferedImage based ILcdGXYView of the given image type,
with a given IndexColorModel . |
TLcdMapBufferedImage(int aBufferedImageType,
IndexColorModel aIndexColorModel,
ILcdTreeLayeredSupport aTreeLayeredSupport)
Constructs a new, empty
BufferedImage based ILcdGXYView of the given image type,
with a given IndexColorModel . |
Modifier and Type | Method and Description |
---|---|
ILcdGXYLayer |
getGridLayer()
Returns the grid layer that was configured using
setGridLayer(com.luciad.view.gxy.ILcdGXYLayer) , if any. |
boolean |
isAutoAdjustOnSetXYWorldReference() |
boolean |
isWithGridLayer()
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.
|
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLayers, getMapScale, getMapScaleRange, setMapScale, setMapScaleRange
addLayeredListener, removeLayeredListener
public TLcdMapBufferedImage()
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
,
BufferedImage
public TLcdMapBufferedImage(int aBufferedImageType)
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
,
aBufferedImageType
- the type of the BufferedImage
.BufferedImage
public TLcdMapBufferedImage(int aBufferedImageType, ILcdTreeLayeredSupport aTreeLayeredSupport)
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
,
aBufferedImageType
- the type of the BufferedImage
.aTreeLayeredSupport
- an instance of ILcdTreeLayeredSupport
used to store the layersBufferedImage
public TLcdMapBufferedImage(int aBufferedImageType, IndexColorModel aIndexColorModel)
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
,
aBufferedImageType
- the type of the BufferedImage
aIndexColorModel
- the index color modelBufferedImage
public TLcdMapBufferedImage(int aBufferedImageType, IndexColorModel aIndexColorModel, ILcdTreeLayeredSupport aTreeLayeredSupport)
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
,
aBufferedImageType
- the type of the BufferedImage
aIndexColorModel
- the index color modelaTreeLayeredSupport
- an instance of ILcdTreeLayeredSupport
used to store the layersBufferedImage
public TLcdMapBufferedImage(boolean aRegisterInstance)
public ILcdGXYLayer getGridLayer()
setGridLayer(com.luciad.view.gxy.ILcdGXYLayer)
, if any.null
if no grid layer was configuredpublic void setGridLayer(ILcdGXYLayer aGridLayer)
aGridLayer
- the new layer to configure as grid layerpublic boolean isWithGridLayer()
true
if the map has a configured and enabled grid layer, false
otherwise.setGridLayer(com.luciad.view.gxy.ILcdGXYLayer)
public void setWithGridLayer(boolean aWithGridLayer)
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.aWithGridLayer
- true
if the map has a configured grid layer, false
otherwise.setGridLayer(com.luciad.view.gxy.ILcdGXYLayer)
public void setAutoAdjustOnSetXYWorldReference(boolean aBoolean)
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.setXYWorldReferencepublic boolean isAutoAdjustOnSetXYWorldReference()
public void setXYWorldReference(ILcdXYWorldReference aXYWorldReference)
ILcdXYWorldReference
such
that the view is still centered on the same model point.setXYWorldReference
in interface ILcdGXYView
setXYWorldReference
in class TLcdGXYViewBufferedImage
aXYWorldReference
- the new ILcdXYWorldReference
associated to this viewILcdXYWorldReference
,
ILcdGXYView.getXYWorldReference()
,
ILcdGXYView.setWorldOrigin(com.luciad.shape.ILcdPoint)