Class TLcdGXYViewPanel
- All Implemented Interfaces:
ILcdAWTEventSource,ILcdModelProducerListener,ILcdPropertyChangeSource,ILcdStatusSource,ILcdGXYView,ILcdGXYViewXYWorldTransformationProvider,ILcdLayered,ILcdTreeLayered,ILcdView,ImageObserver,MenuContainer,Serializable,EventListener,Accessible
- Direct Known Subclasses:
TLcdMapPanel
ILcdGXYView interface as a java.awt.Panel.
In addition to the
ILcdGXYView functionality, TLcdGXYViewCanvas can
use an ILcdGXYLayerFactory to automatically create ILcdGXYLayer objects from models.
Once the view has been realized, all code that might affect or depend on the state of that component should be executed in the event-dispatching thread. This includes all methods that can cause the view to repaint implicitly or explicitly.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.awt.Panel
Panel.AccessibleAWTPanelNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface com.luciad.view.gxy.ILcdGXYView
CENTER, LOWERLEFT, LOWERRIGHT, UPPERLEFT, UPPERRIGHTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new, emptyPanel-basedILcdGXYView.TLcdGXYViewPanel(boolean aRegisterInstance) Deprecated.Use the default constructor.TLcdGXYViewPanel(ILcdTreeLayeredSupport aTreeLayeredSupport) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAWTEventListener(ILcdAWTEventListener aAWTEventListener) This method registers aILcdAWTEventListener.booleanaddGXYLayer(ILcdGXYLayer aLayer) Adds the givenILcdGXYLayerto thisILcdGXYView.booleanaddGXYLayer(ILcdGXYLayer aLayer, boolean aRepaint) Adds the givenILcdGXYLayerto thisILcdGXYView, forcing a repaint if desired.voidaddLayeredListener(ILcdLayeredListener aLayeredListener) Registers the givenILcdLayeredListenerto be notified when layers are added, removed or moved in the flat list.voidaddLayerSelectionListener(ILcdSelectionListener aSelectionListener) Registers the givenILcdSelectionListenerto be informed of selection change events from any layer in this view.voidAddsaModelto be displayed in thisILcdView.voidaddModelListener(ILcdModelListener aModelListener) Registers the givenILcdModelListenerto be informed ofILcdModelchange events from any layer's model in this view.voidvoidaddPropertyChangeListener(PropertyChangeListener aPropertyChangeListener) Registers a listener to be notified of component and view property changes.voidaddStatusListener(ILcdStatusListener aStatusListener) Registers the givenILcdStatusListenerto be notified of view status events.voidaddViewInvalidationListener(ILcdViewInvalidationListener aInvalidationListener) Registers anILcdViewInvalidationListenerto be informed when the view's contents are invalid.Deprecated.Cast the object toILcdGXYViewinstead.booleancontainsLayer(ILcdLayer aLayer) Returns whether the flat list representation of the hierarchical layer structure contains the given layer.Returns the background color of the view.getCornerIcon(int aPosition) Returns theILcdIconto be painted at the given corner of the view.Deprecated.Use the relevant layer's pen instead.Returns the name of the view for display purposes.Returns theILcdGXYControllerhandling the user interaction of the view.Returns the layer factory used when adding models to the view.Returns the label painting algorithm for this view.Returns the label placer for this view.Returns a validILcdGXYViewXYWorldTransformationfor anILcdGXYView.intReturns the view's current height in AWT pixels.getImage()Returns anImageof this view.getLayer(int aIndex) Returns theILcdLayerwith indexaIndexin the flat list representation of the hierarchical layer structure.doubleReturns the maximum zoomed in scale of the view.doubleReturns the maximum zoomed out scale of the view.intReturns the number of layers whose combined representation is cached across repaints.Returns a handler to report paint exceptions.intDeprecated.This implementation ignores the painting mode setting, always making sure that bodies, labels and selections are painted.Returns the preferred size of the view.Returns the root node of the tree structure.doublegetScale()Returns the scale for which to paint the view contents expressed in toolkit pixels per world unit.Returns the point in AWT pixel coordinates that maps onto the world origin.intgetWidth()Returns the view's current width in AWT pixels.Returns the point in world coordinates that maps onto the view origin.Returns the view's 2D world coordinate system.booleanDeprecated.getImage() always returns a valid imageintReturns the index of the given layeraLayerin the flat list representation of the hierarchical structure.voidinvalidate(boolean aRepaint, Object aSource, String aMessage) Asks the view to invalidate its content, optionally repainting the content asynchronously.voidinvalidateAndWait(boolean aRepaint, Object aSource, String aMessage) Asks the view to invalidate its content, optionally repainting the content synchronously.voidinvalidateGXYLayer(ILcdGXYLayer aGXYLayer, boolean aRepaint, Object aSource, String aMessage) Asks the view to invalidate the content of the givenILcdGXYLayer, optionally repainting the content asynchronously.voidinvalidateGXYLayerAndWait(ILcdGXYLayer aGXYLayer, boolean aRepaint, Object aSource, String aMessage) Asks the view to invalidate the content of the givenILcdGXYLayer, optionally repainting the content synchronously.voidinvalidateRegion(Rectangle aClip, boolean aRepaint, Object aSource, String aMessage) Asks the view to invalidate the content in the given AWT clip, optionally repainting the content asynchronously.voidinvalidateRegionAndWait(Rectangle aClip, boolean aRepaint, Object aSource, String aMessage) Asks the view to invalidate the content in the given AWT clip, optionally repainting the content synchronously.voidinvalidateRegionSelection(Rectangle aClip, boolean aRepaint, Object aSource, String aMessage) Asks the ILcdGXYView to invalidate its selection in the given AWT clip, optionally repainting the content asynchronously.voidinvalidateRegionSelectionAndWait(Rectangle aClip, boolean aRepaint, Object aSource, String aMessage) Asks the ILcdGXYView to invalidate its selection in the given AWT clip, optionally repainting the content synchronously.voidinvalidateSelection(boolean aRepaint, Object aSource, String aMessage) Asks the ILcdGXYView to invalidate its selection, optionally repainting the content asynchronously.voidinvalidateSelectionAndWait(boolean aRepaint, Object aSource, String aMessage) Asks the ILcdGXYView to invalidate its selection, optionally repainting the content synchronously.booleanSpecifies if anti-aliasing is enabled or not.booleanReturns whether this view allows asynchronous operations.booleanReturns whether the view's contents are automatically updated when necessary.booleanbooleanReturns whether the entire view's content is displayed, or only the controller's representation.booleanDeprecated.This method has been deprecated in favor of the approach provided by theILcdGXYAsynchronousLayerWrapperinterface and its implementations, which is more versatile and which generally offers better thread safety.booleanDeprecated.This method has been deprecated.booleanDeprecated.This property is not taken into account anymore.booleanReturns whether a wait cursor is displayed when theILcdGXYViewis repainting.intReturns the number of layers in the flat list representation of the hierarchical layer structure.Returns theILcdLayerof the flat list that contains the givenILcdModel.layers()Returns anEnumerationof all theILcdLayers currently in the flat list representation of the hierarchical layer structure, starting from the bottom layer to the top layer.Returns anEnumerationof all theILcdLayers currently in the flat list representation of the hierarchical layer structure, starting from the top layer to the bottom layer.voidmodelProduced(TLcdModelProducerEvent aModelProducerEvent) The produced model is added to the view, provided that a layer factory supporting the model is set.voidmoveLayerAt(int aIndex, ILcdLayer aLayer) Moves the given layer (which is already inILcdLayered) to the existing index aIndex.voidCalls paintGXYView( aGraphics ).voidpaintGXYView(Graphics aGraphics) Paints the view on the givenGraphics.voidpan(int aDeltaX, int aDeltaY, boolean aRepaint) Changes the view and/or world origin of the view so that the view contents are panned by the specified AWT delta.voidOverridesComponent.print(java.awt.Graphics)for unbuffered printing.protected voidvoidputCornerIcon(ILcdIcon aCornerIcon, int aPosition) Sets anILcdIconto be painted at the given corner of this view.protected voidDeprecated.TLcdBeanManagerregistration is no longer used.voidRemove all the layers from the hierarchical layer structure and the flat list representation.voidremoveAWTEventListener(ILcdAWTEventListener aAWTEventListener) This method removes a registeredILcdAWTEventListener, or does nothing if the passed listener wasn't registered.voidremoveLayer(ILcdLayer aLayer) Removes a layer from both the hierarchical layer structure and the flat list representation.voidremoveLayeredListener(ILcdLayeredListener aLayeredListener) Unregisters the givenILcdLayeredListenerfrom receiving layered events for the flat list.voidremoveLayerSelectionListener(ILcdSelectionListener aSelectionListener) Unregisters the givenILcdSelectionListenerfrom receiving selection change events from any layer in this view.voidremoveModel(ILcdModel aModel) Removes theILcdGXYLayercontaining the model from the view.voidremoveModelListener(ILcdModelListener aModelListener) Unregisters the givenILcdModelListenerfrom receivingILcdModelchange events from any layer's model in this view.voidremovePropertyChangeListener(PropertyChangeListener aPropertyChangeListener) Unregisters the givenPropertyChangeListenerfrom receiving property change events for this view.voidremoveStatusListener(ILcdStatusListener aStatusListener) Unregisters the givenILcdStatusListenerfrom being notified of view status events.voidremoveViewInvalidationListener(ILcdViewInvalidationListener aInvalidationListener) Unregisters anILcdViewInvalidationListenerso that it is no longer informed of invalidation events for this view.voidsetAntiAliased(boolean aAntiAliased) Changes the anti-aliasing behavior.voidsetAsynchronousAllowed(boolean aAsynchronousAllowed) Sets if asynchronous operation are allowed for this view.voidsetAutoUpdate(boolean aAutoUpdate) Sets whether to update the view's representation automatically to keep it in sync with its state and the state of its models.voidsetBackground(Color aColor) Sets the background color of the view.static voidsetClassTraceOn(boolean aClassTraceOn) Deprecated.This method has been deprecated.voidsetDefaultPen(ILcdGXYPen aDefaultPen) Deprecated.Use the relevant layer's pen instead.voidsetDisplayName(String newDisplayName) Sets the name of the view for display purposes.voidsetDrawOffScreenImageOnPaint(boolean aDrawOffScreenImageOnPaint) Sets whether the entire view's content is displayed, or only the current controller's representation.voidsetGXYController(ILcdGXYController aGXYViewController) Makes the givenILcdGXYControllerhandle the user interaction of the view.voidsetGXYLayerFactory(ILcdGXYLayerFactory newGXYLayerFactory) Sets the layer factory to use when adding models to the view.voidsetGXYViewLabelPainter(ILcdGXYViewLabelPainter aGXYViewLabelPainter) Sets the label painter algorithm for thisILcdGXYView.voidsetGXYViewLabelPlacer(ILcdGXYViewLabelPlacer aGXYViewLabelPlacer) This method sets anILcdGXYViewLabelPlacerto use for global labeling.voidsetMaximumSize(Dimension aDimension) voidsetMaxScale(double aMaxScale) Limits the maximum zoomed in scale of the view.voidsetMinimumSize(Dimension aDimension) voidsetMinScale(double aMinScale) Limits the maximum zoomed out scale of the view.voidsetNumberOfCachedBackgroundLayers(int aNumberOfCachedBackgroundLayers) Sets the number of layers whose combined representation is cached across repaints.voidsetPaintExceptionHandler(ILcdPaintExceptionHandler aPaintExceptionHandler) Sets a handler to report paint exceptions.voidsetPaintInBackground(boolean aUpdateInBackground) Deprecated.This method has been deprecated in favor of the approach provided by theILcdGXYAsynchronousLayerWrapperinterface and its implementations, which is more versatile and which generally offers better thread safety.voidsetPaintingMode(int aPaintingMode) Deprecated.This implementation ignores the painting mode setting, always making sure that bodies, labels and selections are painted.voidsetPreferredSize(Dimension aDimension) voidsetScale(double aScale) Sets the scale of this view, repainting the view according toisAutoUpdate.voidsetScale(double aScale, boolean aRepaint) Sets the scale of this view, optionally repainting the view.voidsetScale(double aScale, boolean aRepaint, boolean aAdjusting) Sets the scale of this view, optionally indicating subsequent property changes.voidsetScale(double aScaleX, double aScaleY, boolean aRepaint, boolean aAdjusting) Sets the scale along the x-axis and y-axis of this view, repainting the view according toisAutoUpdate.voidsetTraceOn(boolean aTraceOn) Deprecated.This method has been deprecated.voidsetUpdateLabelsOnSelectionChanged(boolean aUpdateLabelsOnSelectionChanged) Deprecated.This property is not used.voidsetViewOrigin(Point aViewOrigin) Sets the view origin of the view, repainting the view according toisAutoUpdate.voidsetViewOrigin(Point aViewOrigin, boolean aRepaint) Sets the view origin of the view, optionally repainting the view.voidsetViewOrigin(Point aViewOrigin, boolean aRepaint, boolean aAdjusting) Sets the view origin of the view, optionally indicating subsequent property changes.voidsetWaitCursorOn(boolean aWaitCursorOn) Sets whether to display a wait cursor when theILcdGXYViewis repainting.voidsetWorldOrigin(ILcdPoint aWorldOrigin) Sets the world origin of the view, repainting the view according toisAutoUpdate.voidsetWorldOrigin(ILcdPoint aWorldOrigin, boolean aRepaint) Sets the world origin of the view, optionally repainting the view.voidsetWorldOrigin(ILcdPoint aWorldOrigin, boolean aRepaint, boolean aAdjusting) Sets the world origin of the view, optionally indicating subsequent property changes.voidsetXYWorldReference(ILcdXYWorldReference aXYWorldReference) Sets the view's 2D world coordinate system, repainting the view according toisAutoUpdate.voidsetXYWorldReference(ILcdXYWorldReference aXYWorldReference, boolean aRepaint) Sets the view's 2D world coordinate system, optionally repainting the view.voidsetXYWorldReference(ILcdXYWorldReference aXYWorldReference, boolean aRepaint, boolean aAdjusting) Sets the view's 2D world coordinate system, optionally indicating subsequent property changes.voidCallspaintGXYView(aGraphics).Methods inherited from class java.awt.Panel
getAccessibleContextMethods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, isValidateRoot, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusDownCycle, validate, validateTreeMethods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.luciad.view.gxy.ILcdGXYView
getForeground, getGraphics, getLayers, getMapScale, getMapScaleRange, repaint, repaint, setCursor, setForeground, setMapScale, setMapScaleRangeMethods inherited from interface com.luciad.view.ILcdLayered
addLayeredListener, removeLayeredListener
-
Constructor Details
-
TLcdGXYViewPanel
public TLcdGXYViewPanel()Constructs a new, emptyPanel-basedILcdGXYView. Auto-update is activated by default, no background layers are cached, and no default user interaction is provided.After construction, a world coordinate system needs to be set using
setXYWorldReference(com.luciad.view.ILcdXYWorldReference). -
TLcdGXYViewPanel
public TLcdGXYViewPanel(boolean aRegisterInstance) Deprecated.Use the default constructor.Constructs a new, emptyPanel-basedILcdGXYView.- Parameters:
aRegisterInstance- if true, registers the view withTLcdBeanManager- See Also:
-
TLcdGXYViewPanel
Constructs a new, emptyPanel-basedILcdGXYView, based on theILcdTreeLayeredaTreeLayered. Auto-update is activated by default, no background layers are cached, and no default user interaction is provided.After construction, a world coordinate system needs to be set using
setXYWorldReference(com.luciad.view.ILcdXYWorldReference).- Parameters:
aTreeLayeredSupport- an instance ofILcdTreeLayeredSupportused to store the layers
-
-
Method Details
-
setClassTraceOn
public static void setClassTraceOn(boolean aClassTraceOn) Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for all instances of this class. If the argument istruethen all log messages are recorded, otherwise only the informative, warning and error messages are recorded.- Parameters:
aClassTraceOn- if true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
-
setTraceOn
public void setTraceOn(boolean aTraceOn) Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for this class instance. Calling this method with eithertrueorfalseas argument automatically turns off tracing for all other class instances for whichsetTraceOnhas not been called. If the argument isfalsethen only the informative, warning and error log messages are recorded.- Parameters:
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.
-
isTraceOn
public boolean isTraceOn()Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Returnstrueif tracing is enabled for this class.- Returns:
- true if tracing is enabled for this class, false otherwise.
-
paint
Calls paintGXYView( aGraphics ). -
pan
public void pan(int aDeltaX, int aDeltaY, boolean aRepaint) Description copied from interface:ILcdGXYViewChanges the view and/or world origin of the view so that the view contents are panned by the specified AWT delta. Implementations of this method are allowed to only repaint newly exposed areas, hence this method is preferred over simply changing the world origin.- Specified by:
panin interfaceILcdGXYView- Parameters:
aDeltaX- the shift in the X direction in screen coordinatesaDeltaY- the shift in the Y direction in screen coordinatesaRepaint- iftrue, will trigger a repaint of the view's contents. Depending on the implementation, only the newly exposed areas may be painted. If false, the view is not repainted.
-
paintGXYView
Description copied from interface:ILcdGXYViewPaints the view on the givenGraphics. The painted image contains the following:- a background color;
- the bodies of each contained layer's models. Each layer is asked to paint itself, from bottom to top;
- the labels of each contained layer's models.
Typically labels are painted on top of any bodies.
The labels are painted by the layer itself, or by a
view label painter, if it is set; - the selected bodies of each contained layer's models. Typically selections are painted on top of bodies and labels.
- the selected labels of each contained layer's models. The labels are painted by the layer itself, or by a view label painter, if it is set;
- corner icons, if any;
- the controller handling user interaction.
invalidatemethods.- Specified by:
paintGXYViewin interfaceILcdGXYView- Parameters:
aGraphics- theGraphicsto paint the contents of this view on- See Also:
-
update
CallspaintGXYView(aGraphics). -
print
OverridesComponent.print(java.awt.Graphics)for unbuffered printing. -
processEvent
- Overrides:
processEventin classContainer
-
registerInstance
protected void registerInstance()Deprecated.TLcdBeanManagerregistration is no longer used.Registers the view withTLcdBeanManager -
asGXYView
Deprecated.Cast the object toILcdGXYViewinstead.Returns the view as a pureILcdGXYView.- Returns:
- this view
-
setDisplayName
Sets the name of the view for display purposes. The display name can be used to make the user differentiate different views.- Parameters:
newDisplayName- the new name of the view- See Also:
-
getDisplayName
Returns the name of the view for display purposes. The display name can be used to make the user differentiate different views.- Returns:
- the name of the view
- See Also:
-
addNotify
public void addNotify() -
isDoubleBuffered
public boolean isDoubleBuffered()- Overrides:
isDoubleBufferedin classComponent
-
addModel
AddsaModelto be displayed in thisILcdView.This method creates an
ILcdGXYLayercontaining the model and adds it to the view. For this to work, a layer factory supporting the given model must be set on the view.- Specified by:
addModelin interfaceILcdView- Throws:
IllegalArgumentException- if the model isnull, if no layer factory is set, or if the layer factory cannot create a layer for the given model- See Also:
-
removeModel
Removes theILcdGXYLayercontaining the model from the view. Removes a single representation of the specified model from this view, if it is present in the view.- Specified by:
removeModelin interfaceILcdView- See Also:
-
addLayeredListener
Registers the givenILcdLayeredListenerto be notified when layers are added, removed or moved in the flat list.- Specified by:
addLayeredListenerin interfaceILcdLayered- Specified by:
addLayeredListenerin interfaceILcdTreeLayered- Parameters:
aLayeredListener- the listener that from now on will be notified of all changes to the flat list.- See Also:
-
removeLayeredListener
Unregisters the givenILcdLayeredListenerfrom receiving layered events for the flat list.- Specified by:
removeLayeredListenerin interfaceILcdLayered- Specified by:
removeLayeredListenerin interfaceILcdTreeLayered- Parameters:
aLayeredListener- the listener that will no longer be notified of changes in the flat list.- See Also:
-
layerCount
public int layerCount()Description copied from interface:ILcdTreeLayeredReturns the number of layers in the flat list representation of the hierarchical layer structure. This does not include the root node.
- Specified by:
layerCountin interfaceILcdLayered- Specified by:
layerCountin interfaceILcdTreeLayered- Returns:
- the number of layers in the flat list. Does not include the root node.
-
layers
Description copied from interface:ILcdTreeLayeredReturns an
Enumerationof all theILcdLayers currently in the flat list representation of the hierarchical layer structure, starting from the bottom layer to the top layer. This does not include the root node.- Specified by:
layersin interfaceILcdLayered- Specified by:
layersin interfaceILcdTreeLayered- Returns:
- an
Enumerationof all theILcdLayers currently in the flat list, starting from the bottom layer to the top layer. Does not include the root node.
-
layersBackwards
Description copied from interface:ILcdTreeLayeredReturns an
Enumerationof all theILcdLayers currently in the flat list representation of the hierarchical layer structure, starting from the top layer to the bottom layer. This does not include the root node.- Specified by:
layersBackwardsin interfaceILcdLayered- Specified by:
layersBackwardsin interfaceILcdTreeLayered- Returns:
- an
Enumerationof all theILcdLayers currently in the flat list, starting from the top layer to the bottom layer. Does not include the root node.
-
getLayer
Description copied from interface:ILcdTreeLayeredReturns the
ILcdLayerwith indexaIndexin the flat list representation of the hierarchical layer structure.- Specified by:
getLayerin interfaceILcdLayered- Specified by:
getLayerin interfaceILcdTreeLayered- Parameters:
aIndex- the position of the layer to retrieve in the flat list representation.- Returns:
- the
ILcdLayerwith indexaIndexin the flat list representation - Throws:
ArrayIndexOutOfBoundsException- if the given index is invalid
-
layerOf
Description copied from interface:ILcdTreeLayeredReturns theILcdLayerof the flat list that contains the givenILcdModel.- Specified by:
layerOfin interfaceILcdLayered- Specified by:
layerOfin interfaceILcdTreeLayered- Parameters:
aModel- the model to check for in the flat list- Returns:
- the
ILcdLayerof the flat list that contains the givenILcdModel. - Throws:
NoSuchElementException- if there is no layer containing the given model
-
indexOf
Description copied from interface:ILcdTreeLayeredReturns the index of the given layer
aLayerin the flat list representation of the hierarchical structure.- Specified by:
indexOfin interfaceILcdLayered- Specified by:
indexOfin interfaceILcdTreeLayered- Parameters:
aLayer- the layer whose index to return- Returns:
- the index of
aLayerin the flat list representation - Throws:
NoSuchElementException- ifaLayeris not in the flat list
-
moveLayerAt
public void moveLayerAt(int aIndex, ILcdLayer aLayer) throws NoSuchElementException, ArrayIndexOutOfBoundsException Description copied from interface:ILcdLayeredMoves the given layer (which is already inILcdLayered) to the existing index aIndex. When a layer is moved down, all layers in between the previous and future position of the given layer (including the layer at index aIndex) are moved one position up. When a layer is moved up, all layers in between the previous and future position of the given layer (including the layer at index aIndex) are moved one position down.More formally, let previousIndex be the index of
aLayerbefore the move. If previousIndex < aIndex, then the index of allILcdLayerobjects in from previousIndex + 1 to aIndex is decremented with 1. If previousIndex > aIndex, then the index of allILcdLayerobjects in from aIndex to previousIndex -1 is incremented with 1.- Specified by:
moveLayerAtin interfaceILcdLayered- Parameters:
aIndex- the index of the position where to move the layer.aLayer- the layer to move.- Throws:
NoSuchElementException- ifaLayeris not in thisILcdLayered.ArrayIndexOutOfBoundsException- ifaIndexis not an index of one of the layers of thisILcdLayered.
-
removeLayer
Description copied from interface:ILcdTreeLayeredRemoves a layer from both the hierarchical layer structure and the flat list representation. When removing an
ILcdLayerTreeNodeall of its children will also be removed. An event will then be generated for every layer that has been removed (one for the node and one for each of its child layers).It is not possible to remove the root node
- Specified by:
removeLayerin interfaceILcdLayered- Specified by:
removeLayerin interfaceILcdTreeLayered- Parameters:
aLayer- the layer to remove. If the layer is not in the flat list, this method has no effect.
-
removeAllLayers
public void removeAllLayers()Description copied from interface:ILcdTreeLayeredRemove all the layers from the hierarchical layer structure and the flat list representation. An event will be fired for every layer that has been removed. This will not remove the root node.
- Specified by:
removeAllLayersin interfaceILcdLayered- Specified by:
removeAllLayersin interfaceILcdTreeLayered
-
containsLayer
Description copied from interface:ILcdTreeLayeredReturns whether the flat list representation of the hierarchical layer structure contains the given layer. More formally, returns
trueif and only if the flat list representation contains at least one layerlsuch that (aLayer==null ? l==null : aLayer.equals(l)).Calling this method with the root node will return
false, since the root node is not a part of the flat list representation.- Specified by:
containsLayerin interfaceILcdLayered- Specified by:
containsLayerin interfaceILcdTreeLayered- Parameters:
aLayer- the layer to check whether it is in the flat list representation- Returns:
truewhen the flat list representation contains the given layer,falseotherwise
-
putCornerIcon
Sets anILcdIconto be painted at the given corner of this view. Only the last set icon for the given position is painted.- Specified by:
putCornerIconin interfaceILcdGXYView- Parameters:
aCornerIcon- theILcdIconto be painted at the given corner ornullto unregister the iconaPosition- one ofILcdGXYView.UPPERLEFT,ILcdGXYView.UPPERRIGHT,ILcdGXYView.LOWERRIGHT,ILcdGXYView.LOWERLEFT- See Also:
-
getCornerIcon
Returns theILcdIconto be painted at the given corner of the view.- Parameters:
aPosition- one ofILcdGXYView.UPPERLEFT,ILcdGXYView.UPPERRIGHT,ILcdGXYView.LOWERRIGHT,ILcdGXYView.LOWERLEFT- Returns:
- the
ILcdIconto be painted at the given corner ornullwhen no icon has to be painted at the given corner - See Also:
-
addGXYLayer
Description copied from interface:ILcdGXYViewAdds the givenILcdGXYLayerto thisILcdGXYView. The layer is normally added to the top of the view's layers, but that is implementation specific. The view will be repainted depending on the result ofisAutoUpdate. No action is performed if the given layer is already contained in the list.- Specified by:
addGXYLayerin interfaceILcdGXYView- Parameters:
aLayer- the layer to add to this view- Returns:
trueif the layer was added successfully,falseif the view already contained the layer- See Also:
-
addGXYLayer
Description copied from interface:ILcdGXYViewAdds the givenILcdGXYLayerto thisILcdGXYView, forcing a repaint if desired. The layer is normally added to the top of the view's layers, but that is implementation specific. No action is performed if the given layer is already contained in the list.- Specified by:
addGXYLayerin interfaceILcdGXYView- Parameters:
aLayer- the layer to add to this viewaRepaint- if true, the view is repainted. If false, the view is not repainted.- Returns:
trueif the layer was added successfully,falseif the view already contained the layer- See Also:
-
getNumberOfCachedBackgroundLayers
public int getNumberOfCachedBackgroundLayers()Returns the number of layers whose combined representation is cached across repaints. The layers are always the bottommost layer objects; they are regarded as background layers. If more than one layer contain the model, the bottommost is returned.- Specified by:
getNumberOfCachedBackgroundLayersin interfaceILcdGXYView- Returns:
- the number of bottommost layers to cache
- See Also:
-
setNumberOfCachedBackgroundLayers
public void setNumberOfCachedBackgroundLayers(int aNumberOfCachedBackgroundLayers) Description copied from interface:ILcdGXYViewSets the number of layers whose combined representation is cached across repaints. The layers are the bottommost layer objects; they are regarded as background layers.Caching background layers is useful when one upper real-time layer needs to be refreshed often, whereas the contents of the background layers seldom change. When a real-time layer changes and needs to be repainted, the cached representation of the background layers is reused, speeding up the paint process. When a background layer changes, all layers need to be repainted to update the view.
- Specified by:
setNumberOfCachedBackgroundLayersin interfaceILcdGXYView- Parameters:
aNumberOfCachedBackgroundLayers- the number of bottommost layers to cache. This number applies to theflat listof layers.- See Also:
-
hasValidImage
public boolean hasValidImage()Deprecated.getImage() always returns a valid imageReturnstrueif the view has a valid image.- Specified by:
hasValidImagein interfaceILcdGXYView- Returns:
true- See Also:
-
getImage
Description copied from interface:ILcdGXYViewReturns anImageof this view. The image has not been painted on by the controller. This method is guaranteed to return an up-to-date image: if the view has been invalidated in some way (e.g. when a layer has been removed) then this method first updates the view before returning an image. To improve performance and conserve memory, the view is allowed to cache, reuse and overwrite the image in subsequent repaints. NOTE: While using High DPI mode, this method will return an image which is bigger than the view dimensions reported bygetWidth()andgetHeight()methods.- Specified by:
getImagein interfaceILcdGXYView- Returns:
- an image containing the representation of this view
-
getWidth
public int getWidth()Description copied from interface:ILcdGXYViewReturns the view's current width in AWT pixels.- Specified by:
getWidthin interfaceILcdGXYView- Overrides:
getWidthin classComponent- Returns:
- the view's current width in AWT pixels
-
getHeight
public int getHeight()Description copied from interface:ILcdGXYViewReturns the view's current height in AWT pixels.- Specified by:
getHeightin interfaceILcdGXYView- Overrides:
getHeightin classComponent- Returns:
- the view's current height in AWT pixels
-
getPreferredSize
Description copied from interface:ILcdGXYViewReturns the preferred size of the view. This interface does not specify a functionality for this property.- Specified by:
getPreferredSizein interfaceILcdGXYView- Overrides:
getPreferredSizein classContainer- Returns:
- the preferred size of the view in AWT pixels
-
setPreferredSize
- Overrides:
setPreferredSizein classComponent
-
getMaximumSize
- Overrides:
getMaximumSizein classContainer
-
setMaximumSize
- Overrides:
setMaximumSizein classComponent
-
getMinimumSize
- Overrides:
getMinimumSizein classContainer
-
setMinimumSize
- Overrides:
setMinimumSizein classComponent
-
setBackground
Sets the background color of the view. This is the color that appears when no objects are painted on top of it.The default color is the color returned by SystemColor.control. Note that the alpha channel of the Color is not taken into account.
- Specified by:
setBackgroundin interfaceILcdGXYView- Overrides:
setBackgroundin classComponent- Parameters:
aColor- the color which appears at a location where no data is painted.- See Also:
-
getBackground
Returns the background color of the view. This is the color that appears when no objects are painted on top of it.The default color is the color returned by SystemColor.control. Note that the alpha channel of the Color is not taken into account.
- Specified by:
getBackgroundin interfaceILcdGXYView- Overrides:
getBackgroundin classComponent- Returns:
- the background color of the view
- See Also:
-
setScale
public void setScale(double aScale) Description copied from interface:ILcdGXYViewSets the scale of this view, repainting the view according toisAutoUpdate. The scale corresponds to the number of pixels per world unit, as determined by theILcdXYWorldReference. Hence, increasing the scale zooms in, and decreasing the scale zooms out. A view displaying geographical data usually employs a scale in pixels per meter. As an example, to fit the world on a view that is 1000 pixels wide, a scale of about 1000 pixels/40.000km, or 1.0/40.000 is needed. For most use cases, we recommended setting theunitless map scaleinstead.- Specified by:
setScalein interfaceILcdGXYView- Parameters:
aScale- the new scale of the view. The view is scaled using the world origin as center. The scale is limited so that it does not exceed the interval defined by the minimum and maximum scales.- See Also:
-
setScale
public void setScale(double aScale, boolean aRepaint) Description copied from interface:ILcdGXYViewSets the scale of this view, optionally repainting the view. The scale corresponds to the number of pixels per world unit, as determined by theILcdXYWorldReference. Hence, increasing the scale zooms in, and decreasing the scale zooms out. A view displaying geographical data usually employs a scale in pixels per meter. As an example, to fit the world on a view that is 1000 pixels wide, a scale of about 1000 pixels/40.000km, or 1.0/40.000 is needed. For most use cases, we recommended setting theunitless map scaleinstead.- Specified by:
setScalein interfaceILcdGXYView- Parameters:
aScale- the new scale of the view. The view is scaled using the world origin as center. The scale is limited so that it does not exceed the interval defined by the minimum and maximum scales.aRepaint- iftrue, the view is repainted. If false, the view is not repainted.- See Also:
-
setScale
public void setScale(double aScale, boolean aRepaint, boolean aAdjusting) Description copied from interface:ILcdGXYViewSets the scale of this view, optionally indicating subsequent property changes. The scale corresponds to the number of pixels per world unit, as determined by theILcdXYWorldReference. Hence, increasing the scale zooms in, and decreasing the scale zooms out. A view displaying geographical data usually employs a scale in pixels per meter. As an example, to fit the world on a view that is 1000 pixels wide, a scale of about 1000 pixels/40.000km, or 1.0/40.000 is needed. For most use cases, we recommended setting theunitless map scaleinstead.- Specified by:
setScalein interfaceILcdGXYView- Parameters:
aScale- the new scale of the view. The view is scaled using the world origin as center. The scale is limited so that it does not exceed the interval defined by the minimum and maximum scales.aRepaint- iftrue, the view is repainted. If false, the view is not repainted.aAdjusting- iftrue, the caller indicates that he will trigger another property change right after this call. This is reflected in the associated property change event.- See Also:
-
setScale
public void setScale(double aScaleX, double aScaleY, boolean aRepaint, boolean aAdjusting) Description copied from interface:ILcdGXYViewSets the scale along the x-axis and y-axis of this view, repainting the view according toisAutoUpdate.The scale corresponds to the number of pixels per world unit, as determined by the
ILcdXYWorldReference. For example, a view displaying geographical data could use a scale in pixels per meter.The default implementation in this interface sets both scales to the geometric mean of the requested scales. The concrete view implementations do respect the individual scales.
- Specified by:
setScalein interfaceILcdGXYView- Parameters:
aScaleX- the new scale along the x-axis of the view.aScaleY- the new scale along the y-axis of the view.aRepaint- iftrue, the view is repainted. If false, the view is not repainted.aAdjusting- iftrue, the caller indicates that he will trigger another property change right after this call. This is reflected in the associated property change event.- See Also:
-
getScale
public double getScale()Description copied from interface:ILcdGXYViewReturns the scale for which to paint the view contents expressed in toolkit pixels per world unit. The world unit is determined by the view's world reference. Increasing the scale zooms in, and decreasing the scale zooms out. For most use cases, we recommended using theunitless map scaleinstead.- Specified by:
getScalein interfaceILcdGXYView- Returns:
- the scale of this view
- See Also:
-
setMinScale
public void setMinScale(double aMinScale) Description copied from interface:ILcdGXYViewLimits the maximum zoomed out scale of the view. Subsequent calls ofILcdGXYView.setScale(double)orILcdGXYView.setMapScale(com.luciad.view.TLcdMapScale, com.luciad.view.TLcdMapScale.ScaleLocation)will ensure that the scale does not fall below the minimum scale. For most use cases, we recommended using theunitless map scalevariant instead.- Specified by:
setMinScalein interfaceILcdGXYView- Parameters:
aMinScale- the new minimum scale of this view- See Also:
-
getMinScale
public double getMinScale()Description copied from interface:ILcdGXYViewReturns the maximum zoomed out scale of the view. Subsequent calls ofILcdGXYView.setScale(double)orILcdGXYView.setMapScale(com.luciad.view.TLcdMapScale, com.luciad.view.TLcdMapScale.ScaleLocation)will ensure that the scale does not fall below the minimum scale. For most use cases, we recommended using theunitless map scalevariant instead.- Specified by:
getMinScalein interfaceILcdGXYView- Returns:
- the minimum scale of the view
- See Also:
-
setMaxScale
public void setMaxScale(double aMaxScale) Description copied from interface:ILcdGXYViewLimits the maximum zoomed in scale of the view. Subsequent calls ofILcdGXYView.setScale(double)orILcdGXYView.setMapScale(com.luciad.view.TLcdMapScale, com.luciad.view.TLcdMapScale.ScaleLocation)will ensure that the scale does not rise above the maximum scale. For most use cases, we recommended using theunitless map scalevariant instead.- Specified by:
setMaxScalein interfaceILcdGXYView- Parameters:
aMaxScale- the new maximum scale of this view- See Also:
-
getMaxScale
public double getMaxScale()Description copied from interface:ILcdGXYViewReturns the maximum zoomed in scale of the view. Subsequent calls ofILcdGXYView.setScale(double)orILcdGXYView.setMapScale(com.luciad.view.TLcdMapScale, com.luciad.view.TLcdMapScale.ScaleLocation)will ensure that the scale does not rise above the maximum scale. For most use cases, we recommended using theunitless map scalevariant instead.- Specified by:
getMaxScalein interfaceILcdGXYView- Returns:
- the maximum scale of the view
- See Also:
-
setWorldOrigin
Description copied from interface:ILcdGXYViewSets the world origin of the view, repainting the view according toisAutoUpdate. The world origin is a point in world coordinates that maps onto the view origin.- Specified by:
setWorldOriginin interfaceILcdGXYView- Parameters:
aWorldOrigin- the new world origin of this view, expressed in world coordinates. Only the XY coordinates are considered.- See Also:
-
setWorldOrigin
Description copied from interface:ILcdGXYViewSets the world origin of the view, optionally repainting the view. The world origin is a point in world coordinates that maps onto the view origin.- Specified by:
setWorldOriginin interfaceILcdGXYView- Parameters:
aWorldOrigin- the new world origin of this view, expressed in world coordinates. Only the XY coordinates are considered.aRepaint- iftrue, the view is repainted. If false, the view is not repainted.- See Also:
-
setWorldOrigin
Description copied from interface:ILcdGXYViewSets the world origin of the view, optionally indicating subsequent property changes. The world origin is a point in world coordinates that maps onto the view origin.- Specified by:
setWorldOriginin interfaceILcdGXYView- Parameters:
aWorldOrigin- the new world origin of this view, expressed in world coordinates. Only the XY coordinates are considered.aRepaint- iftrue, the view is repainted. If false, the view is not repainted.aAdjusting- iftrue, the caller indicates that he will trigger another property change right after this call. This is reflected in the associated property change event.- See Also:
-
getWorldOrigin
Description copied from interface:ILcdGXYViewReturns the point in world coordinates that maps onto the view origin. Hence, the combination of world origin and view origin determines which part of the world is visible in the view. The points are considered to be 'on top of each other'- Specified by:
getWorldOriginin interfaceILcdGXYView- Returns:
- the world origin of the view, expressed in world coordinates. Only the XY coordinates of the point are relevant.
- See Also:
-
setViewOrigin
Description copied from interface:ILcdGXYViewSets the view origin of the view, repainting the view according toisAutoUpdate. The view origin is a point in AWT pixel coordinates that maps onto the world origin.- Specified by:
setViewOriginin interfaceILcdGXYView- Parameters:
aViewOrigin- the new view origin of this view, expressed in AWT pixel coordinates- See Also:
-
setViewOrigin
Description copied from interface:ILcdGXYViewSets the view origin of the view, optionally repainting the view. The view origin is a point in AWT pixel coordinates that maps onto the world origin.- Specified by:
setViewOriginin interfaceILcdGXYView- Parameters:
aViewOrigin- the new view origin of this view, expressed in AWT pixel coordinatesaRepaint- iftrue, the view is repainted. If false, the view is not repainted.- See Also:
-
setViewOrigin
Description copied from interface:ILcdGXYViewSets the view origin of the view, optionally indicating subsequent property changes. The view origin is a point in AWT pixel coordinates that maps onto the world origin.- Specified by:
setViewOriginin interfaceILcdGXYView- Parameters:
aViewOrigin- the new view origin of this view, expressed in AWT pixel coordinatesaRepaint- iftrue, the view is repainted. If false, the view is not repainted.aAdjusting- iftrue, the caller indicates that he will trigger another property change right after this call. This is reflected in the associated property change event.- See Also:
-
getViewOrigin
Description copied from interface:ILcdGXYViewReturns the point in AWT pixel coordinates that maps onto the world origin. Hence, the combination of world origin and view origin determines which part of the world is visible in the view. The points are considered to be 'on top of each other'.- Specified by:
getViewOriginin interfaceILcdGXYView- Returns:
- the view origin expressed in AWT pixel coordinates
- See Also:
-
getGXYViewXYWorldTransformation
Description copied from interface:ILcdGXYViewXYWorldTransformationProviderReturns a validILcdGXYViewXYWorldTransformationfor anILcdGXYView. Users of the transformation should update their reference when the view'sworld origin,view origin,rotation, orscalechanges.- Specified by:
getGXYViewXYWorldTransformationin interfaceILcdGXYViewXYWorldTransformationProvider- Returns:
- a valid
ILcdGXYViewXYWorldTransformation
-
setXYWorldReference
Description copied from interface:ILcdGXYViewSets the view's 2D world coordinate system, repainting the view according toisAutoUpdate.- Specified by:
setXYWorldReferencein interfaceILcdGXYView- Parameters:
aXYWorldReference- the newILcdXYWorldReferenceassociated to this view- See Also:
-
setXYWorldReference
Description copied from interface:ILcdGXYViewSets the view's 2D world coordinate system, optionally repainting the view.- Specified by:
setXYWorldReferencein interfaceILcdGXYView- Parameters:
aXYWorldReference- the newILcdXYWorldReferenceassociated to this viewaRepaint- iftrue, the view is repainted. If false, the view is not repainted.- See Also:
-
setXYWorldReference
public void setXYWorldReference(ILcdXYWorldReference aXYWorldReference, boolean aRepaint, boolean aAdjusting) Description copied from interface:ILcdGXYViewSets the view's 2D world coordinate system, optionally indicating subsequent property changes.- Specified by:
setXYWorldReferencein interfaceILcdGXYView- Parameters:
aXYWorldReference- the newILcdXYWorldReferenceassociated to this viewaRepaint- iftrue, the view is repainted. If false, the view is not repainted.aAdjusting- iftrue, the caller indicates that he will trigger another property change right after this call. This is reflected in the associated property change event.- See Also:
-
getXYWorldReference
Description copied from interface:ILcdGXYViewReturns the view's 2D world coordinate system.- Specified by:
getXYWorldReferencein interfaceILcdGXYView- Returns:
- the view's 2D world coordinate system
- See Also:
-
setGXYController
Makes the given
ILcdGXYControllerhandle the user interaction of the view. The view calls the controller'sstartInteractionmethod to make the controller aware of this fact, and calls the previous controller'sterminateInteractionmethod, if any.Implementations of this method can direct input events to the controller by checking, for example, if the controller implements AWT input interfaces such as
KeyListenerandMouseListener. This view implementation recognizes the following listener interfaces, making sure to forward the relevant events:ComponentListenerKeyListenerMouseListenerMouseMotionListenerMouseWheelListener
ILcdAWTEventListener. If this is the case, the view dispatch all events usingILcdAWTEventListener. For example, a mouse drag event is only delivered to the controller'shandleAWTEvent, not itsmouseDraggedmethod. The listeners are automatically removed.- Specified by:
setGXYControllerin interfaceILcdGXYView- Parameters:
aGXYViewController- the new controller of this view, ornullif no controller is to be used- See Also:
-
getGXYController
Description copied from interface:ILcdGXYViewReturns theILcdGXYControllerhandling the user interaction of the view.- Specified by:
getGXYControllerin interfaceILcdGXYView- Returns:
- the current controller handling the user interaction, or null if no controller is present
- See Also:
-
getDefaultPen
Deprecated.Use the relevant layer's pen instead.Returns anILcdGXYPensupporting editing and painting on the view.- Specified by:
getDefaultPenin interfaceILcdGXYView- Returns:
- the default
ILcdGXYPenof this view - See Also:
-
setDefaultPen
Deprecated.Use the relevant layer's pen instead.Sets anILcdGXYPensupporting editing and painting on the view.- Parameters:
aDefaultPen- the new defaultILcdGXYPenof this view- See Also:
-
setPaintingMode
public void setPaintingMode(int aPaintingMode) Deprecated.This implementation ignores the painting mode setting, always making sure that bodies, labels and selections are painted.Sets the type or types of layer content to display in the ILcdGXYView.- Specified by:
setPaintingModein interfaceILcdGXYView- Parameters:
aPaintingMode- a binary OR of ILcdGXYLayer.BODIES, ILcdGXYLayer.LABELS, ILcdGXYLayer.SELECTION- See Also:
-
getPaintingMode
public int getPaintingMode()Deprecated.This implementation ignores the painting mode setting, always making sure that bodies, labels and selections are painted.Gets the painting mode for this ILcdGXYView.- Specified by:
getPaintingModein interfaceILcdGXYView- Returns:
- a binary OR of ILcdGXYLayer.BODIES, ILcdGXYLayer.LABELS, ILcdGXYLayer.SELECTION
- See Also:
-
invalidate
Description copied from interface:ILcdGXYViewAsks the view to invalidate its content, optionally repainting the content asynchronously. A subsequent repaint will ask (at the least) all layers to draw their bodies, labels and selection. This method is typically called when the entire view needs to be redrawn, for example, after a zoom operation or projection change.- Specified by:
invalidatein interfaceILcdGXYView- Specified by:
invalidatein interfaceILcdView- Parameters:
aRepaint- iftrue, the view is updated immediately, but the method will not wait for the update to finish. If false, the view is updated on the next paint or repaint method call.aSource- class instance calling the method. For tracing purposes.aMessage- a message associated to this method call. For tracing purposes.- See Also:
-
invalidateAndWait
Description copied from interface:ILcdGXYViewAsks the view to invalidate its content, optionally repainting the content synchronously. A subsequent repaint will ask (at the least) all layers to draw their bodies, labels and selection. This method is typically called when the entire view needs to be redrawn, for example, after a zoom operation or projection change.- Specified by:
invalidateAndWaitin interfaceILcdGXYView- Parameters:
aRepaint- iftruethe ILcdGXYView will be updated immediately, and the method will block until the update is complete. If false, the view is updated on the next paint or repaint method call.aSource- class instance calling the method. For tracing purposes.aMessage- a message associated to this method call. For tracing purposes.- See Also:
-
invalidateRegion
Description copied from interface:ILcdGXYViewAsks the view to invalidate the content in the given AWT clip, optionally repainting the content asynchronously. A subsequent repaint will ask (at the least) all layers to draw their bodies, labels and selection in the given clip, and may reuse earlier generated imagery for the rest of the view. This method is typically called when a small portion of the view needs to be redrawn, for example, when the objects in that area have changed.- Specified by:
invalidateRegionin interfaceILcdGXYView- Parameters:
aClip- the clip to invalidateaRepaint- iftrue, the view is updated immediately, but the method will not wait for the update to finish. If false, the view is updated on the next paint or repaint method call.aSource- class instance calling the method. For tracing purposes.aMessage- a message associated to this method call. For tracing purposes.- See Also:
-
invalidateRegionAndWait
public void invalidateRegionAndWait(Rectangle aClip, boolean aRepaint, Object aSource, String aMessage) Description copied from interface:ILcdGXYViewAsks the view to invalidate the content in the given AWT clip, optionally repainting the content synchronously. A subsequent repaint will ask (at the least) all layers to draw their bodies, labels and selection in the given clip, and may reuse earlier generated imagery for the rest of the view. This method is typically called when a small portion of the view needs to be redrawn, for example, when the objects in that area have changed.- Specified by:
invalidateRegionAndWaitin interfaceILcdGXYView- Parameters:
aClip- the clip to invalidateaRepaint- iftruethe ILcdGXYView will be updated immediately, and the method will block until the update is complete. If false, the view is updated on the next paint or repaint method call.aSource- class instance calling the method. For tracing purposes.aMessage- a message associated to this method call. For tracing purposes.- See Also:
-
invalidateGXYLayer
public void invalidateGXYLayer(ILcdGXYLayer aGXYLayer, boolean aRepaint, Object aSource, String aMessage) Description copied from interface:ILcdGXYViewAsks the view to invalidate the content of the givenILcdGXYLayer, optionally repainting the content asynchronously. A subsequent repaint will (at the least) ask the given layer to draw its bodies, labels and selection, and may reuse earlier generated imagery for the other layers. This method is typically called when a single layer needs to be redrawn, for example, when its painter settings change.- Specified by:
invalidateGXYLayerin interfaceILcdGXYView- Parameters:
aGXYLayer- the layer to invalidateaRepaint- iftrue, the view is updated immediately, but the method will not wait for the update to finish. If false, the view is updated on the next paint or repaint method call.aSource- class instance calling the method. For tracing purposes.aMessage- a message associated to this method call. For tracing purposes.
-
invalidateGXYLayerAndWait
public void invalidateGXYLayerAndWait(ILcdGXYLayer aGXYLayer, boolean aRepaint, Object aSource, String aMessage) Description copied from interface:ILcdGXYViewAsks the view to invalidate the content of the givenILcdGXYLayer, optionally repainting the content synchronously. A subsequent repaint will (at the least) ask the given layer to draw its bodies, labels and selection, and may reuse earlier generated imagery for the other layers. This method is typically called when a single layer needs to be redrawn, for example, when its painter settings change.- Specified by:
invalidateGXYLayerAndWaitin interfaceILcdGXYView- Parameters:
aGXYLayer- the layer to invalidateaRepaint- iftruethe ILcdGXYView will be updated immediately, and the method will block until the update is complete. If false, the view is updated on the next paint or repaint method call.aSource- class instance calling the method. For tracing purposes.aMessage- a message associated to this method call. For tracing purposes.- See Also:
-
invalidateSelection
Description copied from interface:ILcdGXYViewAsks the ILcdGXYView to invalidate its selection, optionally repainting the content asynchronously. A subsequent repaint will ask (at the least) all layers to draw their selection, and may reuse earlier generated imagery for the bodies and labels. This method is typically called when the selection needs to be redrawn, for example, when changing the selection.- Specified by:
invalidateSelectionin interfaceILcdGXYView- Parameters:
aRepaint- iftrue, the view is updated immediately, but the method will not wait for the update to finish. If false, the view is updated on the next paint or repaint method call.aSource- class instance calling the method. For tracing purposes.aMessage- a message associated to this method call. For tracing purposes.- See Also:
-
invalidateSelectionAndWait
Description copied from interface:ILcdGXYViewAsks the ILcdGXYView to invalidate its selection, optionally repainting the content synchronously. A subsequent repaint will ask (at the least) all layers to draw their selection, and may reuse earlier generated imagery for the bodies and labels. This method is typically called when the selection needs to be redrawn, for example, when changing the selection.- Specified by:
invalidateSelectionAndWaitin interfaceILcdGXYView- Parameters:
aRepaint- iftruethe ILcdGXYView will be updated immediately, and the method will block until the update is complete. If false, the view is updated on the next paint or repaint method call.aSource- class instance calling the method. For tracing purposes.aMessage- a message associated to this method call. For tracing purposes.- See Also:
-
invalidateRegionSelection
public void invalidateRegionSelection(Rectangle aClip, boolean aRepaint, Object aSource, String aMessage) Description copied from interface:ILcdGXYViewAsks the ILcdGXYView to invalidate its selection in the given AWT clip, optionally repainting the content asynchronously. A subsequent repaint will ask (at the least) all layers to draw their selection in the given clip, and may reuse earlier generated imagery for the bodies, labels, and rest of the view. This method is typically called when the selection of a small portion of the view needs to be redrawn, for example, when changing the selection in that area.- Specified by:
invalidateRegionSelectionin interfaceILcdGXYView- Parameters:
aClip- the clip to invalidateaRepaint- iftrue, the view is updated immediately, but the method will not wait for the update to finish. If false, the view is updated on the next paint or repaint method call.aSource- class instance calling the method. For tracing purposes.aMessage- a message associated to this method call. For tracing purposes.- See Also:
-
invalidateRegionSelectionAndWait
public void invalidateRegionSelectionAndWait(Rectangle aClip, boolean aRepaint, Object aSource, String aMessage) Description copied from interface:ILcdGXYViewAsks the ILcdGXYView to invalidate its selection in the given AWT clip, optionally repainting the content synchronously. A subsequent repaint will ask (at the least) all layers to draw their selection in the given clip, and may reuse earlier generated imagery for the bodies, labels, and rest of the view. This method is typically called when the selection of a small portion of the view needs to be redrawn, for example, when changing the selection in that area.- Specified by:
invalidateRegionSelectionAndWaitin interfaceILcdGXYView- Parameters:
aClip- the clip to invalidateaRepaint- iftruethe ILcdGXYView will be updated immediately, and the method will block until the update is complete. If false, the view is updated on the next paint or repaint method call.aSource- class instance calling the method. For tracing purposes.aMessage- a message associated to this method call. For tracing purposes.- See Also:
-
setAutoUpdate
public void setAutoUpdate(boolean aAutoUpdate) Sets whether to update the view's representation automatically to keep it in sync with its state and the state of its models.When switching the autoUpdate property from
falsetotrue, a repaint will be triggered.- Specified by:
setAutoUpdatein interfaceILcdView- Parameters:
aAutoUpdate- iftrue, the view automatically updates its representation on reception of any event that might require an update (e.g. when its properties change, when anObjectin a model has changed, or when a model has been added/removed). If false, the view must be repainted manually.- See Also:
-
isAutoUpdate
public boolean isAutoUpdate()Description copied from interface:ILcdViewReturns whether the view's contents are automatically updated when necessary.- Specified by:
isAutoUpdatein interfaceILcdView- Returns:
trueif the view automatically updates its representation on reception of any event that might require an update (e.g. when its properties change, when anObjectin a model has changed, or when a model has been added/removed).falseif the view must be repainted manually.- See Also:
-
setDrawOffScreenImageOnPaint
public void setDrawOffScreenImageOnPaint(boolean aDrawOffScreenImageOnPaint) Description copied from interface:ILcdGXYViewSets whether the entire view's content is displayed, or only the current controller's representation. The controller can use this method to temporarily override the view's contents. The effect is visible upon the next repaint.- Specified by:
setDrawOffScreenImageOnPaintin interfaceILcdGXYView- Parameters:
aDrawOffScreenImageOnPaint-trueto make the view paint itself when one of the paint methods is called. False if only the current controller is painted.- See Also:
-
isDrawOffScreenImageOnPaint
public boolean isDrawOffScreenImageOnPaint()Description copied from interface:ILcdGXYViewReturns whether the entire view's content is displayed, or only the controller's representation.- Specified by:
isDrawOffScreenImageOnPaintin interfaceILcdGXYView- Returns:
trueif the view paints itself when one of the paint methods is called. False if only the current controller is painted.- See Also:
-
setUpdateLabelsOnSelectionChanged
public void setUpdateLabelsOnSelectionChanged(boolean aUpdateLabelsOnSelectionChanged) Deprecated.This property is not used.Sets whether the labels are forced to be updated if a selection change occurs.- Parameters:
aUpdateLabelsOnSelectionChanged- whether to force a label update upon selection changes- See Also:
-
isUpdateLabelsOnSelectionChanged
public boolean isUpdateLabelsOnSelectionChanged()Deprecated.This property is not taken into account anymore.Returns whether the labels are forced to be updated if a selection change occurs.- Returns:
- whether to force a label update upon selection changes
- See Also:
-
addPropertyChangeListener
Registers a listener to be notified of component and view property changes.- Specified by:
addPropertyChangeListenerin interfaceILcdPropertyChangeSource- Overrides:
addPropertyChangeListenerin classContainer- Parameters:
aPropertyChangeListener- the listener to notify of changes to this view as a component, and as a view- See Also:
-
removePropertyChangeListener
Unregisters the givenPropertyChangeListenerfrom receiving property change events for this view.- Specified by:
removePropertyChangeListenerin interfaceILcdPropertyChangeSource- Overrides:
removePropertyChangeListenerin classComponent- Parameters:
aPropertyChangeListener- the listener that should no longer be notified of property changes for the view as a component, nor as a view- See Also:
-
setGXYViewLabelPainter
Sets the label painter algorithm for thisILcdGXYView. A view label painter handles the labels of all the view's layers. When the view label painter is null, the layers are asked to paint their labels themselves. This will override any configured view label placer.Note that it is recommended to use
setGXYViewLabelPlacerinstead. Label placers offer better decluttering behavior, more algorithm choices, support for asynchronous label placement, and easier customization.- Parameters:
aGXYViewLabelPainter- the painter handling this view's labels, or null- See Also:
-
getGXYViewLabelPainter
Description copied from interface:ILcdGXYViewReturns the label painting algorithm for this view. A view label painter handles the labels of all the view's layers. Hence, the layers are not asked to paint their labels if the view label painter is not null. The view label painter can be used for decluttering labels across all layers. To do this, it can select the objects that need a label and delegate the actual painting to the relevant layer'sILcdGXYLabelPainter.- Specified by:
getGXYViewLabelPainterin interfaceILcdGXYView- Returns:
- the painter handling this view's labels, or null
- See Also:
-
getGXYViewLabelPlacer
Description copied from interface:ILcdGXYViewReturns the label placer for this view. A view label placer handles the labels of all the view's layers. The layers are only responsible for painting their labels while the label placer declutters the labels.- Specified by:
getGXYViewLabelPlacerin interfaceILcdGXYView- Returns:
- the label placer handling this view's labels, or
null. - See Also:
-
setGXYViewLabelPlacer
Description copied from interface:ILcdGXYViewThis method sets anILcdGXYViewLabelPlacerto use for global labeling.This will override any configured view label painter.
- Specified by:
setGXYViewLabelPlacerin interfaceILcdGXYView- Parameters:
aGXYViewLabelPlacer- a view label placer.- See Also:
-
setGXYLayerFactory
Sets the layer factory to use when adding models to the view. If null, layers can only be added usingaddGXYLayer(com.luciad.view.gxy.ILcdGXYLayer).- Parameters:
newGXYLayerFactory- the layer factory to use when adding models to the view, or null- See Also:
-
getGXYLayerFactory
Returns the layer factory used when adding models to the view. If null, layers can only be added usingaddGXYLayer(com.luciad.view.gxy.ILcdGXYLayer).- Returns:
- newGXYLayerFactory the layer factory that is used when adding models to the view
- See Also:
-
addStatusListener
Registers the givenILcdStatusListenerto be notified of view status events. The amount, type and order of the status events is subject to change.- Specified by:
addStatusListenerin interfaceILcdGXYView- Specified by:
addStatusListenerin interfaceILcdStatusSource- Parameters:
aStatusListener- the listener that will be informed of status events- See Also:
-
removeStatusListener
Unregisters the givenILcdStatusListenerfrom being notified of view status events.- Specified by:
removeStatusListenerin interfaceILcdGXYView- Specified by:
removeStatusListenerin interfaceILcdStatusSource- Parameters:
aStatusListener- the listener that will no longer be informed of status events- See Also:
-
modelProduced
The produced model is added to the view, provided that a layer factory supporting the model is set.- Specified by:
modelProducedin interfaceILcdModelProducerListener- Parameters:
aModelProducerEvent- the event describing the model production- See Also:
-
addModelListener
Description copied from interface:ILcdGXYViewRegisters the givenILcdModelListenerto be informed ofILcdModelchange events from any layer's model in this view.- Specified by:
addModelListenerin interfaceILcdGXYView- Parameters:
aModelListener- a listener that will be notified ofILcdModelchange events from any layer's model in this view- See Also:
-
removeModelListener
Description copied from interface:ILcdGXYViewUnregisters the givenILcdModelListenerfrom receivingILcdModelchange events from any layer's model in this view.- Specified by:
removeModelListenerin interfaceILcdGXYView- Parameters:
aModelListener- a listener that the view will no longer notify ofILcdModelchange events- See Also:
-
addLayerSelectionListener
Description copied from interface:ILcdGXYViewRegisters the givenILcdSelectionListenerto be informed of selection change events from any layer in this view.- Specified by:
addLayerSelectionListenerin interfaceILcdGXYView- Parameters:
aSelectionListener- a listener that will be notified of selection change events from any layer in this view. The events will have the relevant layer as source.- See Also:
-
removeLayerSelectionListener
Description copied from interface:ILcdGXYViewUnregisters the givenILcdSelectionListenerfrom receiving selection change events from any layer in this view.- Specified by:
removeLayerSelectionListenerin interfaceILcdGXYView- Parameters:
aSelectionListener- a listener that the view will no longer inform of selection change events- See Also:
-
setWaitCursorOn
public void setWaitCursorOn(boolean aWaitCursorOn) Sets whether to display a wait cursor when theILcdGXYViewis repainting. The default isfalse.- Parameters:
aWaitCursorOn- if true, displays a wait cursor while repainting the view- See Also:
-
isWaitCursorOn
public boolean isWaitCursorOn()Returns whether a wait cursor is displayed when theILcdGXYViewis repainting.- Returns:
- true if a wait cursor is displayed while the view is repainting
- See Also:
-
isPaintInBackground
public boolean isPaintInBackground()Deprecated.This method has been deprecated in favor of the approach provided by theILcdGXYAsynchronousLayerWrapperinterface and its implementations, which is more versatile and which generally offers better thread safety.Returns whether the view is painted in a thread other than the event dispatch thread.- Specified by:
isPaintInBackgroundin interfaceILcdGXYView- Returns:
trueif background painting is enabled;falseotherwise
-
setPaintInBackground
public void setPaintInBackground(boolean aUpdateInBackground) Deprecated.This method has been deprecated in favor of the approach provided by theILcdGXYAsynchronousLayerWrapperinterface and its implementations, which is more versatile and which generally offers better thread safety.Enables or disables painting in a thread other than the event dispatch thread. If background painting is not supported by an implementation, this method throws a runtime exception.- Specified by:
setPaintInBackgroundin interfaceILcdGXYView- Parameters:
aUpdateInBackground-trueto enable painting in the background;falseto disable it
-
addViewInvalidationListener
Registers anILcdViewInvalidationListenerto be informed when the view's contents are invalid. This can happen directly (e.g. by callinginvalidateGXYLayer(com.luciad.view.gxy.ILcdGXYLayer, boolean, java.lang.Object, java.lang.String)) or indirectly (e.g. by callingpan(int, int, boolean))- Specified by:
addViewInvalidationListenerin interfaceILcdGXYView- Parameters:
aInvalidationListener- the listener to notify when the view has been invalidated- See Also:
-
removeViewInvalidationListener
Unregisters anILcdViewInvalidationListenerso that it is no longer informed of invalidation events for this view.- Specified by:
removeViewInvalidationListenerin interfaceILcdGXYView- Parameters:
aInvalidationListener- the listener to no longer notify when the view has been invalidated- See Also:
-
getPaintExceptionHandler
Description copied from interface:ILcdGXYViewReturns a handler to report paint exceptions. The view, as well as layers and painters can use this handler if they encounter an exception during painting. Because painting may happen asynchronously, the handler may be called from different threads.- Specified by:
getPaintExceptionHandlerin interfaceILcdGXYView- Returns:
- a handler to report paint exceptions.
-
setPaintExceptionHandler
Sets a handler to report paint exceptions. Layers and/or painters can use this handler if they encounter a problem during painting. Because painting may happen asynchronously, the handler may be called from different threads.- Specified by:
setPaintExceptionHandlerin interfaceILcdGXYView- Parameters:
aPaintExceptionHandler- a handler to report paint exceptions. This handler should never be null.
-
getRootNode
Description copied from interface:ILcdTreeLayeredReturns the root node of the tree structure.
- Specified by:
getRootNodein interfaceILcdTreeLayered- Returns:
- the root node of the tree structure
-
addAWTEventListener
This method registers aILcdAWTEventListener. Dispatching events to the listeners is the responsibility of the implementing class. This view notifies the listeners of the following events:- Specified by:
addAWTEventListenerin interfaceILcdAWTEventSource- Parameters:
aAWTEventListener- the listener to be registered.
-
removeAWTEventListener
Description copied from interface:ILcdAWTEventSourceThis method removes a registeredILcdAWTEventListener, or does nothing if the passed listener wasn't registered.- Specified by:
removeAWTEventListenerin interfaceILcdAWTEventSource- Parameters:
aAWTEventListener- the listener to be unregistered.
-
isAsynchronousAllowed
public boolean isAsynchronousAllowed()Description copied from interface:ILcdGXYViewReturns whether this view allows asynchronous operations. Painters, layers or other parts of a view should not perform asynchronous operations when this method returns
false. If this method returnstrue, they can decide either way.When asynchronous operations are allowed, intermediate results of time-consuming asynchronous operations are displayed in order to provide an interactive user experience. For non-interactive applications, it is useful to disable asynchronous operations, since they can lead to more unpredictable results. Examples are tests, or server side functionality like the OGC WMS protocol which paints the view and returns it as an image. In these cases, you want the view to be painted completely without having to deal with intermediate results.
- Specified by:
isAsynchronousAllowedin interfaceILcdGXYView- Returns:
- whether this view allows asynchronous operations.
-
setAsynchronousAllowed
public void setAsynchronousAllowed(boolean aAsynchronousAllowed) Sets if asynchronous operation are allowed for this view. See
ILcdGXYView.isAsynchronousAllowed()for more information.This method returns
trueby default.Note: it is advised to only modify this flag at construction time, not at runtime.
- Parameters:
aAsynchronousAllowed-trueto allow asynchronous operations.- Since:
- 2017.0
-
isAntiAliased
public boolean isAntiAliased()Description copied from interface:ILcdGXYViewSpecifies if anti-aliasing is enabled or not. Anti-aliasing makes lines and text appear smoother, but slows down rendering a little bit. If this property isfalse, it does not mean anti-aliasing is fully disabled. It only means anti-aliasing is not enabled on the view level, various layers and painters may still decide to enable anti-aliasing for what they render.- Specified by:
isAntiAliasedin interfaceILcdGXYView- Returns:
trueif anti-aliasing is enabled,falseotherwise.
-
setAntiAliased
public void setAntiAliased(boolean aAntiAliased) Changes the anti-aliasing behavior. Please refer toILcdGXYView.isAntiAliased()for more information.- Parameters:
aAntiAliased-trueto enable anti-aliasing,falseto let layers and painters decide.- Since:
- 2017.0
-