Class TLcdGXYAsynchronousLayerWrapper
- All Implemented Interfaces:
ILcdPropertyChangeSource,ILcdSelection<Object>,ILcdGXYAsynchronousLayerWrapper,ILcdGXYLayer,ILcdLayer,Serializable
- Direct Known Subclasses:
TLcdGXYAsynchronousEditableLabelsLayerWrapper,TLcdGXYAsynchronousLayerTreeNodeWrapper,TLcdGXYLspAsynchronousLayerWrapper
ILcdGXYAsynchronousLayerWrapper for ILcdGXYLayer instances,
wrapping and protecting the latter interface's state.
Note that for ILcdGXYEditableLabelsLayer implementations such as TLcdGXYLayer,
you should use TLcdGXYAsynchronousEditableLabelsLayerWrapper, to allow
LuciadLightspeed to transparently access the labeling functionality of this interface.- Since:
- 7.2
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionTLcdGXYAsynchronousLayerWrapper(ILcdGXYLayer aDecoratedLayer) Creates a layer decorator that delegates painting to an asynchronous paint queue.TLcdGXYAsynchronousLayerWrapper(ILcdGXYLayer aDecoratedLayer, ILcdGXYAsynchronousPaintQueue aPaintQueue) Creates a layer decorator that delegates painting to an asynchronous paint queue. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPropertyChangeListener(PropertyChangeListener aPropertyChangeListener) Registers the givenPropertyChangeListenerto be notified when this object's properties change.voidaddSelectionListener(ILcdSelectionListener<Object> aSelectionListener) Adds a listener to this selection.intapplyOnInteract(ILcdFunction aFunction, Rectangle aBounds, boolean aStrictInteract, ILcdGXYView aGXYView) Applies the function to (at the least) all objects that are contained (partially or completely) in the bounds of the view.voidclearSelection(int aDispatchEventMode) Deselect all the Objects in thisILcdLayer, i.e., the selection of thisILcdLayeris empty afterward.voidFires aTLcdSelectionChangedEventthat contains all the selection changes appended by successively callingselectObject(Object, boolean, ILcdFireEventMode.FIRE_LATER).protected voidNotifies all registered property listeners of the given property change.Returns a state change synchronizer for the wrapped layer.getBounds(int aMode, ILcdGXYView aGXYView) Returns the view bounds of thisILcdGXYLayercontent, the bounds of all the drawings (for the supplied mode) that represent the Objects contained in theILcdModelof thisILcdGXYLayer.Returns the paint queue handling the asynchronous paints.getGXYEditor(Object aObject) Returns a clone of the wrapped layer's GXYEditor, or the editor itself if the associated paint queue is empty.getGXYLabelPainter(Object aObject) Returns a clone of the wrapped layer's GXYLabelPainter, or the painter itself if the associated paint queue is empty.Returns the layer that contains the actual paint logic.getGXYPainter(Object aObject) Returns a clone of the wrapped layer's GXYPainter, or the painter itself if the associated paint queue is empty.Returns the pen to use when performing basic painting operations for objects in this layers model.getIcon()Returns a visual indication of the contents of this layer.getLabel()A short textual representation of thisILcdLayer.Returns the map ratio scale range for which to display labels for elements of the model.Returns the toolkit scale range for which to display labels for elements of the model.Returns the map ratio scale range for which to display elements of the model.getModel()Returns the transformation class that to use to transform points and bounds from model space to world space and back.Returns the toolkit scale range for which to display elements of the model.intReturns the number of objects in this selection.Returns a state change synchronizer for this wrapper.voidinvokeAndWaitOnGXYLayer(ILcdGXYAsynchronousLayerRunnable aInvocation) Executes the given layer runnable so that the invocation does not interfere with the asynchronous painting.voidinvokeLaterOnGXYLayer(ILcdGXYAsynchronousLayerRunnable aInvocation) Executes the given layer runnable so that the invocation does not interfere with the asynchronous painting.voidExecutes the given layer runnable so that the invocation does not interfere with the asynchronous painting.voidinvokeNowOnGXYLayer(ILcdGXYAsynchronousLayerRunnable aInvocation) Executes the given layer runnable so that the invocation does not interfere with state synchronization.booleanReturns whether the wrapped layer is configured to be painted asynchronously.booleanReturns whether the layer allows editing the content that it visualizes.booleanReturnstrueif the layer supports editing its objects.booleanReturns whether objects should be represented as text.booleanReturns whether this layer supports representing objects as text.booleanReturns whether the layer's objects can be selected, for example, by clicking on them.booleanReturnstrueif this layer supports selecting objects,falseotherwise.booleanisSelected(Object aObject) Checks whether the givenObjectis currently in the set of selected objects.booleanDeprecated.This method has been deprecated.booleanReturns whether or not the layer's content is painted.voidpaint(Graphics aGraphics, int aMode, ILcdGXYView aView) Paints the layer asynchronously or synchronously, depending onisAsynchronous.voidremovePropertyChangeListener(PropertyChangeListener aPropertyChangeListener) De-registers the givenPropertyChangeListenerfrom receiving property change events for this object.voidremoveSelectionListener(ILcdSelectionListener<Object> aSelectionListener) Removes anILcdSelectionListenerfrom thisILcdSelection.Returns the objects in this selection.voidselectObject(Object aObject, boolean aSelection, int aDispatchEventMode) Changes the selection state of any element contained in theILcdModelthisILcdLayerrefers to.voidsetAsynchronous(boolean aAsynchronous) Disables or enables the asynchronous drawing.voidsetEditable(boolean aEditable) Sets whether the layer should allow editing the content that it visualizes.voidSets the paint queue to delegate asynchronous paint requests to.voidSets a visual indication of the contents of this layer.voidSets the textual representation of thisILcdLayer.voidsetLabeled(boolean aLabeled) Sets whether objects should be represented as text.voidsetSelectable(boolean aSelectable) Sets the Selectable property of thisILcdLayer.voidsetTraceOn(boolean aTraceOn) Deprecated.This method has been deprecated.voidsetVisible(boolean aVisible) Sets whether or not the layer's content is painted.voidInform the layer that it should terminate the current paint operation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.luciad.util.ILcdSelection
getSelectedObjects
-
Constructor Details
-
TLcdGXYAsynchronousLayerWrapper
Creates a layer decorator that delegates painting to an asynchronous paint queue. After construction, a paint queue must be set usingsetGXYAsynchronousPaintQueue(ILcdGXYAsynchronousPaintQueue)For thread safety, the given layers should operate synchronously. Hence, aTLcdGXYAsynchronousLayerWrappershould not wrap anotherILcdGXYAsynchronousLayerWrapper.- Parameters:
aDecoratedLayer- the synchronous layer to decorate. State changes are propagated to and from the wrapper.
-
TLcdGXYAsynchronousLayerWrapper
public TLcdGXYAsynchronousLayerWrapper(ILcdGXYLayer aDecoratedLayer, ILcdGXYAsynchronousPaintQueue aPaintQueue) Creates a layer decorator that delegates painting to an asynchronous paint queue.- Parameters:
aDecoratedLayer- the layer to decorate. State changes are propagated to and from the wrapper.aPaintQueue- the paint queue that handles the asynchronous paint calls
-
-
Method Details
-
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.
-
getGXYAsynchronousPaintQueue
Description copied from interface:ILcdGXYAsynchronousLayerWrapperReturns the paint queue handling the asynchronous paints.- Specified by:
getGXYAsynchronousPaintQueuein interfaceILcdGXYAsynchronousLayerWrapper- Returns:
- a paint queue to which the paint requests are delegated
-
getGXYLayer
Description copied from interface:ILcdGXYAsynchronousLayerWrapperReturns the layer that contains the actual paint logic. Note that it is generally unsafe to access the layer while it is painting itself, in the painting thread of the paint queue. In addition, the properties of the layer must not yet have been propagated from this layer wrapper. The methodsILcdGXYAsynchronousLayerWrapper.invokeAndWaitOnGXYLayer(ILcdGXYAsynchronousLayerRunnable)andILcdGXYAsynchronousLayerWrapper.invokeLaterOnGXYLayer(ILcdGXYAsynchronousLayerRunnable)provide safe alternatives.- Specified by:
getGXYLayerin interfaceILcdGXYAsynchronousLayerWrapper- Returns:
- the wrapped layer
-
setAsynchronous
Description copied from interface:ILcdGXYAsynchronousLayerWrapperDisables or enables the asynchronous drawing.- Specified by:
setAsynchronousin interfaceILcdGXYAsynchronousLayerWrapper- Parameters:
aAsynchronous- if false, paints synchronously, if true, paints asynchronously- Throws:
InterruptedException- when the thread is interrupted while waiting for the asynchronous paint to complete
-
isAsynchronous
public boolean isAsynchronous()Description copied from interface:ILcdGXYAsynchronousLayerWrapperReturns whether the wrapped layer is configured to be painted asynchronously.- Specified by:
isAsynchronousin interfaceILcdGXYAsynchronousLayerWrapper- Returns:
- whether the asynchronous drawing is enabled
-
setGXYAsynchronousPaintQueue
Description copied from interface:ILcdGXYAsynchronousLayerWrapperSets the paint queue to delegate asynchronous paint requests to. Paint queues can be shared between multiple layer wrappers. This is even advised, as each paint queue uses memory for buffering the asynchronously generated images.- Specified by:
setGXYAsynchronousPaintQueuein interfaceILcdGXYAsynchronousLayerWrapper- Parameters:
aQueue- the asynchronous paint queue responsible for executing the paint calls.
-
paint
Paints the layer asynchronously or synchronously, depending onisAsynchronous. Asynchronous painting is delegated to the layer's paint queue.- Specified by:
paintin interfaceILcdGXYLayer- Parameters:
aGraphics- the Graphics to paint on.aMode- indicates what should be painted and how it should be painted.aView- the view to paint for.- See Also:
-
addSelectionListener
Description copied from interface:ILcdSelectionAdds a listener to this selection. In case you need to register a listener which keeps a reference to an object with a shorter life-time than thisILcdSelection, you can use aALcdWeakSelectionListenerinstance as selection listener.- Specified by:
addSelectionListenerin interfaceILcdSelection<Object>- Parameters:
aSelectionListener- theILcdSelectionListenerto be added.
-
removeSelectionListener
Description copied from interface:ILcdSelectionRemoves anILcdSelectionListenerfrom thisILcdSelection.- Specified by:
removeSelectionListenerin interfaceILcdSelection<Object>- Parameters:
aSelectionListener- theILcdSelectionListenerto be removed.
-
addPropertyChangeListener
Description copied from interface:ILcdPropertyChangeSourceRegisters the given
PropertyChangeListenerto be notified when this object's properties change.In case you need to register a listener which keeps a reference to an object with a shorter life-time than this change source, you can use a
ALcdWeakPropertyChangeListenerinstance as property change listener.- Specified by:
addPropertyChangeListenerin interfaceILcdPropertyChangeSource- Parameters:
aPropertyChangeListener- The listener to be notified- See Also:
-
removePropertyChangeListener
Description copied from interface:ILcdPropertyChangeSourceDe-registers the given
PropertyChangeListenerfrom receiving property change events for this object.If the listener was added more than once, it will be notified one less time after being removed. If the listener is
null, or was never added, no exception is thrown and no action is taken.- Specified by:
removePropertyChangeListenerin interfaceILcdPropertyChangeSource- Parameters:
aPropertyChangeListener- the listener that should no longer be notified of changes of this object's properties- See Also:
-
firePropertyChangeEvent
Notifies all registered property listeners of the given property change.- Parameters:
aEvent- the event describing the property change
-
clearSelection
public void clearSelection(int aDispatchEventMode) Description copied from interface:ILcdLayerDeselect all the Objects in thisILcdLayer, i.e., the selection of thisILcdLayeris empty afterward.- Specified by:
clearSelectionin interfaceILcdLayer- Parameters:
aDispatchEventMode- shall be one amongILcdFireEventMode.FIRE_NOW,ILcdFireEventMode.FIRE_LATER,ILcdFireEventMode.NO_EVENT- See Also:
-
fireCollectedSelectionChanges
public void fireCollectedSelectionChanges()Description copied from interface:ILcdLayerFires aTLcdSelectionChangedEventthat contains all the selection changes appended by successively callingselectObject(Object, boolean, ILcdFireEventMode.FIRE_LATER).- Specified by:
fireCollectedSelectionChangesin interfaceILcdLayer
-
getSelectionCount
public int getSelectionCount()Description copied from interface:ILcdSelectionReturns the number of objects in this selection.- Specified by:
getSelectionCountin interfaceILcdSelection<Object>- Returns:
- the number of objects in this
ILcdSelection.
-
isSelected
Description copied from interface:ILcdSelectionChecks whether the givenObjectis currently in the set of selected objects.- Specified by:
isSelectedin interfaceILcdSelection<Object>- Parameters:
aObject- theObjectto be checked.- Returns:
trueif theObjectis in thisILcdSelection, false otherwise.
-
selectedObjects
Description copied from interface:ILcdSelectionReturns the objects in this selection.- Specified by:
selectedObjectsin interfaceILcdSelection<Object>- Returns:
- the objects currently in this
ILcdSelection.
-
selectObject
Description copied from interface:ILcdLayerChanges the selection state of any element contained in theILcdModelthisILcdLayerrefers to. This method shall have an effect only if isSelectableSupported and isSelectable return true.- Specified by:
selectObjectin interfaceILcdLayer- Parameters:
aObject- theObjectto select or deselect. The object should be in the model of this layer. The implementation of this method is not responsible for checking this.aSelection- the selection state,trueto select,falseto deselect.aDispatchEventMode- shall be one amongILcdFireEventMode.FIRE_NOW,ILcdFireEventMode.FIRE_LATER,ILcdFireEventMode.NO_EVENT- See Also:
-
isSelectableSupported
public boolean isSelectableSupported()Description copied from interface:ILcdLayerReturnstrueif this layer supports selecting objects,falseotherwise.- Specified by:
isSelectableSupportedin interfaceILcdLayer- Returns:
trueif thisILcdLayersupports the selectable property,falseotherwise. I.e. if thisILcdLayercan be put or not in a selectable mode.- See Also:
-
applyOnInteract
public int applyOnInteract(ILcdFunction aFunction, Rectangle aBounds, boolean aStrictInteract, ILcdGXYView aGXYView) Description copied from interface:ILcdGXYLayerApplies the function to (at the least) all objects that are contained (partially or completely) in the bounds of the view.The function shall be applied successively to all objects in the bounds as long as the function returns
truefor an object. This allows developers to indicate a stop condition. Note that the order in which the objects are passed to the function is not specified.When strict interaction is required, only objects whose representation lies within the given bounds, completely or partially, are candidates to be passed to the function. An object whose representation does not interact with the bounds should not be passed to the function. Applying non strict interaction can be useful to avoid heavy computations to determine whether an objects representation lies within the bounds.
This method behaves similar to the paint method, and as such is allowed to omit small or invisible objects for performance reasons.
- Specified by:
applyOnInteractin interfaceILcdGXYLayer- Parameters:
aFunction- the function to apply. When the function returns false, no more objects should be passed to the function.aBounds- all objects who lie partially or completely in this area in the view are candidates to be passed to the function.aStrictInteract- iftrue, theILcdFunctionshall be applied only to the objects interacting with the given bounds. When false is passed, other objects may be taken into account too. When applying the function to an object consumes less time than checking whether an objects representation interacts with the bounds, non-strict interaction is generally faster.aGXYView- the view in whose bounds the objects representations should be in order to be passed to the function.- Returns:
- the number of objects the function was applied on.
-
getBounds
Description copied from interface:ILcdGXYLayerReturns the view bounds of thisILcdGXYLayercontent, the bounds of all the drawings (for the supplied mode) that represent the Objects contained in theILcdModelof thisILcdGXYLayer. For this operation, thisILcdGXYLayeris to be considered as part ofaGXYView.Outside of the layers bounds no interaction with any object of the layer via its representation is possible. Note that these bounds do not necessarily encompass the representation of all objects in the model, only the objects for which there is a representation in the view.
- Specified by:
getBoundsin interfaceILcdGXYLayer- Parameters:
aMode- a bitwise combination of ALL or SELECTION and one or more of BODIES and HANDLES. TheILcdGXYLayer.LABELSmode is not supported.aGXYView- the view in which the layer could be placed. This enables taking into account the views settings, for example the scale.- Returns:
- a bounds (in view coordinates, pixels) that encompasses the representation of all objects that are rendered in a view.
- Throws:
TLcdNoBoundsException- if the layer doesn't have any valid bounds, for example when none of the elements have a representation for the views current settings.
-
getGXYPainter
Returns a clone of the wrapped layer's GXYPainter, or the painter itself if the associated paint queue is empty.- Specified by:
getGXYPainterin interfaceILcdGXYLayer- Parameters:
aObject- the object to find a painter for.- Returns:
- the painter to use to render the object in a view. When null is returned, the object has no representation in the view, as part of this layer.
-
getGXYEditor
Returns a clone of the wrapped layer's GXYEditor, or the editor itself if the associated paint queue is empty.- Specified by:
getGXYEditorin interfaceILcdGXYLayer- Parameters:
aObject- the object to find an editor for.- Returns:
- the editor to use to modify the object via a view. When null is returned, the object cannot be edited via the view.
-
getGXYLabelPainter
Returns a clone of the wrapped layer's GXYLabelPainter, or the painter itself if the associated paint queue is empty.- Specified by:
getGXYLabelPainterin interfaceILcdGXYLayer- Parameters:
aObject- the object to find a label painter for.- Returns:
- the label painter to use to render the objects label in a view. When null is returned, the object does not have a label in the view, as part of this layer.
-
getModel
-
isEditableSupported
public boolean isEditableSupported()Description copied from interface:ILcdLayerReturnstrueif the layer supports editing its objects.- Specified by:
isEditableSupportedin interfaceILcdLayer- Returns:
trueif the layer supports editing,falseotherwise.- See Also:
-
isLabeledSupported
public boolean isLabeledSupported()Description copied from interface:ILcdGXYLayerReturns whether this layer supports representing objects as text. If not, no effort should be made trying to represent the objects with labels.- Specified by:
isLabeledSupportedin interfaceILcdGXYLayer- Returns:
- whether this layer supports representing objects as text.
-
stopPainting
public void stopPainting()Description copied from interface:ILcdGXYLayerInform the layer that it should terminate the current paint operation. This method can be useful when the paint method is executed in a specificThreadand needs to be stopped in a safe state from another Thread.- Specified by:
stopPaintingin interfaceILcdGXYLayer- See Also:
-
getGXYPen
Description copied from interface:ILcdGXYLayerReturns the pen to use when performing basic painting operations for objects in this layers model.- Specified by:
getGXYPenin interfaceILcdGXYLayer- Returns:
- the pen to use when performing basic painting operations for objects in this layers model.
-
getIcon
Description copied from interface:ILcdLayerReturns a visual indication of the contents of this layer. For example, for a grid layer, an icon containing a grid could be used. -
getLabel
Description copied from interface:ILcdLayerA short textual representation of thisILcdLayer. -
getLabelScaleRange
Description copied from interface:ILcdGXYLayerReturns the toolkit scale range for which to display labels for elements of the model. In other words, the paint method will not render any labels for objects in a view when:
view.getScale()<getLabelScaleRange().getMin()orview.getScale()>=getLabelScaleRange().getMax(). This does not imply that labels for all objects in the model should be painted when the scale is inside this range as other restrictions may apply. For example, a layer may decide not to paint any labels for objects whose body is not painted. For most use cases, we recommended using theunitless map scale rangeinstead. This property is mutually exclusive with the label map scale range: only one of them has a non-nullvalue.- Specified by:
getLabelScaleRangein interfaceILcdGXYLayer- Returns:
- an
ILcdIntervalcontaining the minimum and maximum value of view scales for which labels should be rendered, excluding the maximum.nullif the scale constraints are determined byILcdGXYLayer.getLabelMapScaleRange()The scales are expressed in toolkit pixels/world unit. - See Also:
-
getLabelMapScaleRange
Description copied from interface:ILcdGXYLayerReturns the map ratio scale range for which to display labels for elements of the model. The paint method will render labels for objects in a view if the view's map scale is both inside themap scale rangeand inside the given map label scale range. This does not imply that labels for all objects in the model should be painted when the scale is inside this range as other restrictions may apply. For example, a layer may decide not to paint any labels for objects whose body is not painted. This property is mutually exclusive with thetoolkit label scale range: only one of them has a non-nullvalue.- Specified by:
getLabelMapScaleRangein interfaceILcdGXYLayer- Returns:
- the minimum and maximum value of map scales for which object labels should be rendered,
or
nullif the scale constraints are determined byILcdGXYLayer.getScaleRange()
-
getModelXYWorldTransfoClass
Description copied from interface:ILcdGXYLayerReturns the transformation class that to use to transform points and bounds from model space to world space and back. This class has to be conform with the reference of the model of this layer and the reference of the view this layer is part of.- Specified by:
getModelXYWorldTransfoClassin interfaceILcdGXYLayer- Returns:
- the transformation class that to use to transform points and bounds from model space to world space and back.
-
getScaleRange
Description copied from interface:ILcdGXYLayerReturns the toolkit scale range for which to display elements of the model. In other words, the paint method will not render any objects in a view when:
view.getScale()<getScaleRange().getMin()orview.getScale()>=getScaleRange().getMax(). This does not imply that all objects in the model should be painted when the scale is inside this range as other restrictions may apply. For example, a layer may have a filter which defines which objects should be painted. For most use cases, we recommended using theunitless map scale rangeinstead. This property is mutually exclusive with the map scale range: only one of them has a non-nullvalue.- Specified by:
getScaleRangein interfaceILcdGXYLayer- Returns:
- an
ILcdIntervalcontaining the minimum and maximum value of view scales for which objects should be rendered, excluding the maximum.nullif the scale constraints are determined byILcdGXYLayer.getMapScaleRange(). The scales are expressed in toolkit pixels/world unit. - See Also:
-
getMapScaleRange
Description copied from interface:ILcdGXYLayerReturns the map ratio scale range for which to display elements of the model.The paint method won't render objects in a view if the view's map scale is outside the scale range.
This does not imply that all objects in the model should be painted when the scale is inside this range as other restrictions may apply. For example, a layer may have a filter which defines which objects should be painted.
This property is mutually exclusive with thetoolkit scale range: only one of them has a non-nullvalue.- Specified by:
getMapScaleRangein interfaceILcdGXYLayer- Returns:
- the minimum and maximum value of view scales for which objects should be rendered,
or
nullif the scale constraints are determined byILcdGXYLayer.getScaleRange()
-
setIcon
Description copied from interface:ILcdLayerSets a visual indication of the contents of this layer. -
setLabel
Description copied from interface:ILcdLayerSets the textual representation of thisILcdLayer. -
isEditable
public boolean isEditable()Description copied from interface:ILcdLayerReturns whether the layer allows editing the content that it visualizes.- Specified by:
isEditablein interfaceILcdLayer- Returns:
trueif thisILcdLayeris editable,falseotherwise- See Also:
-
setEditable
public void setEditable(boolean aEditable) Description copied from interface:ILcdLayerSets whether the layer should allow editing the content that it visualizes. CheckisEditableSupportedto see if the layer supports editing.- Specified by:
setEditablein interfaceILcdLayer- Parameters:
aEditable- true if the layer content can be edited- See Also:
-
isLabeled
public boolean isLabeled()Description copied from interface:ILcdGXYLayerReturns whether objects should be represented as text. Note that this property shall not be taken into account whenILcdGXYLayer.isLabeledSupported()returns false.- Specified by:
isLabeledin interfaceILcdGXYLayer- Returns:
- whether objects should be represented as text.
- See Also:
-
setLabeled
public void setLabeled(boolean aLabeled) Description copied from interface:ILcdGXYLayerSets whether objects should be represented as text. The value set for this property shall have no effect as long asILcdGXYLayer.isLabeledSupported()returns false.- Specified by:
setLabeledin interfaceILcdGXYLayer- Parameters:
aLabeled- true to have a textual representation of the objects in the model, false to have no such representation.
-
isSelectable
public boolean isSelectable()Description copied from interface:ILcdLayerReturns whether the layer's objects can be selected, for example, by clicking on them.- Specified by:
isSelectablein interfaceILcdLayer- Returns:
trueif the layer allows selection,falseotherwise.- See Also:
-
setSelectable
public void setSelectable(boolean aSelectable) Description copied from interface:ILcdLayerSets the Selectable property of thisILcdLayer. CheckisSelectableSupportedto see if the layer supports selection.- Specified by:
setSelectablein interfaceILcdLayer- Parameters:
aSelectable-trueif the layer allows selection,falseotherwise.- See Also:
-
isVisible
public boolean isVisible()Description copied from interface:ILcdLayerReturns whether or not the layer's content is painted. -
setVisible
public void setVisible(boolean aVisible) Description copied from interface:ILcdLayerSets whether or not the layer's content is painted.- Specified by:
setVisiblein interfaceILcdLayer- Parameters:
aVisible-trueif the layer should be visible,falseotherwise.- See Also:
-
getSynchronousGXYLayerChangeTracker
Description copied from interface:ILcdGXYAsynchronousLayerWrapperReturns a state change synchronizer for this wrapper. The wrapper's changes will be applied to the wrapped layer before each asynchronous paint, using the asynchronous wrapper.- Specified by:
getSynchronousGXYLayerChangeTrackerin interfaceILcdGXYAsynchronousLayerWrapper- Returns:
- a synchronizer tracking changes for this wrapper. To protect this wrapper's state, the tracker should only be used in the synchronous thread, i.e. the event dispatch thread.
-
getAsynchronousGXYLayerChangeTracker
Description copied from interface:ILcdGXYAsynchronousLayerWrapperReturns a state change synchronizer for the wrapped layer. The changes will be applied after each asynchronous paint, using the synchronous tracker.- Specified by:
getAsynchronousGXYLayerChangeTrackerin interfaceILcdGXYAsynchronousLayerWrapper- Returns:
- a synchronizer tracking changes for the wrapped layer. To protect the wrapped layer's state, the tracker should only be used in the asynchronous thread, i.e. the paint thread.
-
invokeLaterOnGXYLayer
Description copied from interface:ILcdGXYAsynchronousLayerWrapperExecutes the given layer runnable so that the invocation does not interfere with the asynchronous painting. The invocation is executed in the asynchronous paint thread if the layer is painted asynchronously, and executed in the current thread otherwise. In the former case, the method returns immediately.The invocation should take care when waiting for another thread: if that thread in turn waits for asynchronous painting to complete, a deadlock will occur.
To avoid concurrency problems with property change listeners, layer property changes will be fired on the event dispatch thread, not on the asynchronous paint thread.
- Specified by:
invokeLaterOnGXYLayerin interfaceILcdGXYAsynchronousLayerWrapper- Parameters:
aInvocation- the invocation to run. The invocation will pass the original layer.
-
invokeLaterOnGXYLayerInEDT
Description copied from interface:ILcdGXYAsynchronousLayerWrapperExecutes the given layer runnable so that the invocation does not interfere with the asynchronous painting. The invocation is executed in the event dispatch thread. The method always returns immediately.- Specified by:
invokeLaterOnGXYLayerInEDTin interfaceILcdGXYAsynchronousLayerWrapper- Parameters:
aInvocation- the invocation to run. The invocation will pass the original layer.
-
invokeNowOnGXYLayer
Description copied from interface:ILcdGXYAsynchronousLayerWrapperExecutes the given layer runnable so that the invocation does not interfere with state synchronization. The invocation is executed in the caller's thread. The method waits until the invocation has stopped. During the invocation, asynchronous painting may occur, so care is advised.- Specified by:
invokeNowOnGXYLayerin interfaceILcdGXYAsynchronousLayerWrapper- Parameters:
aInvocation- the invocation to run. The invocation will pass the original layer.
-
invokeAndWaitOnGXYLayer
public void invokeAndWaitOnGXYLayer(ILcdGXYAsynchronousLayerRunnable aInvocation) throws InterruptedException Description copied from interface:ILcdGXYAsynchronousLayerWrapperExecutes the given layer runnable so that the invocation does not interfere with the asynchronous painting. The invocation is executed in the view's paint thread (typically the EDT). The method waits until the invocation has stopped.- Specified by:
invokeAndWaitOnGXYLayerin interfaceILcdGXYAsynchronousLayerWrapper- Parameters:
aInvocation- the invocation to run. The invocation will pass the original layer.- Throws:
InterruptedException- when the thread is interrupted while waiting for the asynchronous painting to complete
-