public class TLcdMapCanvas extends TLcdGXYViewCanvas
TLcdGXYViewCanvas
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.
Canvas.AccessibleAWTCanvas
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
CENTER, LOWERLEFT, LOWERRIGHT, UPPERLEFT, UPPERRIGHT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
TLcdMapCanvas()
Constructs a new
TLcdGXYViewCanvas -based ILcdGXYView
with a longitude/latitude grid and a TLcdGridReference that has an instance of
TLcdEquidistantCylindrical as ILcdProjection . |
TLcdMapCanvas(boolean aRegisterInstance)
Deprecated.
Use the default constructor.
|
TLcdMapCanvas(ILcdTreeLayeredSupport aTreeLayeredSupport)
Constructs a new
TLcdGXYViewCanvas -based ILcdGXYView
with a longitude/latitude grid and a TLcdGridReference that has an instance of
TLcdEquidistantCylindrical as ILcdProjection . |
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 |
isTraceOn()
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
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 |
setTraceOn(boolean aTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
setWithGridLayer(boolean aWithGridLayer)
Enables or disables the configured grid layer.
|
void |
setXYWorldReference(ILcdXYWorldReference aXYWorldReference)
Sets the property of XYWorldReference to aXYWorldReference.
|
addAWTEventListener, addGXYLayer, addGXYLayer, addLayeredListener, addLayerSelectionListener, addModel, addModelListener, addNotify, addPropertyChangeListener, addStatusListener, addViewInvalidationListener, asGXYView, containsLayer, getBackground, getCornerIcon, getDefaultPen, getDisplayName, getGXYController, getGXYLayerFactory, getGXYViewLabelPainter, getGXYViewLabelPlacer, getGXYViewXYWorldTransformation, getHeight, getImage, getLayer, getMaximumSize, getMaxScale, getMinimumSize, getMinScale, getNumberOfCachedBackgroundLayers, getPaintExceptionHandler, getPaintingMode, getPreferredSize, getRootNode, getRotation, getScale, getViewOrigin, getWidth, getWorldOrigin, getXYWorldReference, hasValidImage, indexOf, invalidate, invalidateAndWait, invalidateGXYLayer, invalidateGXYLayerAndWait, invalidateRegion, invalidateRegionAndWait, invalidateRegionSelection, invalidateRegionSelectionAndWait, invalidateSelection, invalidateSelectionAndWait, invokeLater, isAntiAliased, isAsynchronousAllowed, isAutoUpdate, isDoubleBuffered, isDrawOffScreenImageOnPaint, isPaintInBackground, isSmartPan, isUpdateLabelsOnSelectionChanged, isWaitCursorOn, layerCount, layerOf, layers, layersBackwards, modelProduced, moveLayerAt, paint, paintGXYView, pan, print, processEvent, putCornerIcon, registerInstance, removeAllLayers, removeAWTEventListener, removeLayer, removeLayeredListener, removeLayerSelectionListener, removeModel, removeModelListener, removePropertyChangeListener, removeStatusListener, removeViewInvalidationListener, setAntiAliased, setAsynchronousAllowed, setAutoUpdate, setBackground, setClassTraceOn, setDefaultPen, setDisplayName, setDrawOffScreenImageOnPaint, setGXYController, setGXYLayerFactory, setGXYViewLabelPainter, setGXYViewLabelPlacer, setMaximumSize, setMaxScale, setMinimumSize, setMinScale, setNumberOfCachedBackgroundLayers, setPaintExceptionHandler, setPaintInBackground, setPaintingMode, setPreferredSize, setRotation, setRotation, setRotation, setScale, setScale, setScale, setScale, setSmartPan, setUpdateLabelsOnSelectionChanged, setViewOrigin, setViewOrigin, setViewOrigin, setWaitCursorOn, setWorldOrigin, setWorldOrigin, setWorldOrigin, setXYWorldReference, setXYWorldReference, update
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getForeground, getGraphics, getLayers, getMapScale, getMapScaleRange, repaint, repaint, setCursor, setForeground, setMapScale, setMapScaleRange
addLayeredListener, removeLayeredListener
public TLcdMapCanvas()
TLcdGXYViewCanvas
-based ILcdGXYView
with a longitude/latitude grid and a TLcdGridReference
that has an instance of
TLcdEquidistantCylindrical
as ILcdProjection
.
The scale is set to make the earth fit in this ILcdGXYView
.public TLcdMapCanvas(boolean aRegisterInstance)
TLcdGXYViewCanvas
-based ILcdGXYView
.aRegisterInstance
- if true, registers the view with TLcdBeanManager
TLcdMapCanvas()
public TLcdMapCanvas(ILcdTreeLayeredSupport aTreeLayeredSupport)
TLcdGXYViewCanvas
-based ILcdGXYView
with a longitude/latitude grid and a TLcdGridReference
that has an instance of
TLcdEquidistantCylindrical
as ILcdProjection
.
The scale is set to make the earth fit in this ILcdGXYView
.aTreeLayeredSupport
- an instance of ILcdTreeLayeredSupport
used to store the layerspublic void setTraceOn(boolean aTraceOn)
true
or false
as argument automatically turns
off tracing for all other class instances for which
setTraceOn
has not been called.
If the argument is false
then only the informative, warning
and error log messages are recorded.setTraceOn
in class TLcdGXYViewCanvas
aTraceOn
- if true then all log messages are recorded for this
instance. If false, then only the informative, warning and
error log messages are recorded.public boolean isTraceOn()
true
if tracing is enabled for this class.isTraceOn
in class TLcdGXYViewCanvas
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.setXYWorldReference.public 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 TLcdGXYViewCanvas
aXYWorldReference
- the new ILcdXYWorldReference
associated to this viewILcdXYWorldReference
,
ILcdGXYView.getXYWorldReference()
,
ILcdGXYView.setWorldOrigin(com.luciad.shape.ILcdPoint)