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
ConstructorDescriptionTLcdGXYAsynchronousLayerWrapper
(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 TypeMethodDescriptionvoid
addPropertyChangeListener
(PropertyChangeListener aPropertyChangeListener) Registers the givenPropertyChangeListener
to be notified when this object's properties change.void
addSelectionListener
(ILcdSelectionListener<Object> aSelectionListener) Adds a listener to this selection.int
applyOnInteract
(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.void
clearSelection
(int aDispatchEventMode) Deselect all the Objects in thisILcdLayer
, i.e., the selection of thisILcdLayer
is empty afterward.void
Fires aTLcdSelectionChangedEvent
that contains all the selection changes appended by successively callingselectObject(Object, boolean, ILcdFireEventMode.FIRE_LATER)
.protected void
Notifies 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 thisILcdGXYLayer
content, the bounds of all the drawings (for the supplied mode) that represent the Objects contained in theILcdModel
of 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.int
Returns the number of objects in this selection.Returns a state change synchronizer for this wrapper.void
invokeAndWaitOnGXYLayer
(ILcdGXYAsynchronousLayerRunnable aInvocation) Executes the given layer runnable so that the invocation does not interfere with the asynchronous painting.void
invokeLaterOnGXYLayer
(ILcdGXYAsynchronousLayerRunnable aInvocation) Executes the given layer runnable so that the invocation does not interfere with the asynchronous painting.void
Executes the given layer runnable so that the invocation does not interfere with the asynchronous painting.void
invokeNowOnGXYLayer
(ILcdGXYAsynchronousLayerRunnable aInvocation) Executes the given layer runnable so that the invocation does not interfere with state synchronization.boolean
Returns whether the wrapped layer is configured to be painted asynchronously.boolean
Returns whether the layer allows editing the content that it visualizes.boolean
Returnstrue
if the layer supports editing its objects.boolean
Returns whether objects should be represented as text.boolean
Returns whether this layer supports representing objects as text.boolean
Returns whether the layer's objects can be selected, for example, by clicking on them.boolean
Returnstrue
if this layer supports selecting objects,false
otherwise.boolean
isSelected
(Object aObject) Checks whether the givenObject
is currently in the set of selected objects.boolean
Deprecated.This method has been deprecated.boolean
Returns whether or not the layer's content is painted.void
paint
(Graphics aGraphics, int aMode, ILcdGXYView aView) Paints the layer asynchronously or synchronously, depending onisAsynchronous
.void
removePropertyChangeListener
(PropertyChangeListener aPropertyChangeListener) De-registers the givenPropertyChangeListener
from receiving property change events for this object.void
removeSelectionListener
(ILcdSelectionListener<Object> aSelectionListener) Removes anILcdSelectionListener
from thisILcdSelection
.Returns the objects in this selection.void
selectObject
(Object aObject, boolean aSelection, int aDispatchEventMode) Changes the selection state of any element contained in theILcdModel
thisILcdLayer
refers to.void
setAsynchronous
(boolean aAsynchronous) Disables or enables the asynchronous drawing.void
setEditable
(boolean aEditable) Sets whether the layer should allow editing the content that it visualizes.void
Sets the paint queue to delegate asynchronous paint requests to.void
Sets a visual indication of the contents of this layer.void
Sets the textual representation of thisILcdLayer
.void
setLabeled
(boolean aLabeled) Sets whether objects should be represented as text.void
setSelectable
(boolean aSelectable) Sets the Selectable property of thisILcdLayer
.void
setTraceOn
(boolean aTraceOn) Deprecated.This method has been deprecated.void
setVisible
(boolean aVisible) Sets whether or not the layer's content is painted.void
Inform 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, wait
Methods 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, aTLcdGXYAsynchronousLayerWrapper
should 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 eithertrue
orfalse
as argument automatically turns off tracing for all other class instances for whichsetTraceOn
has not been called. If the argument isfalse
then 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.Returnstrue
if tracing is enabled for this class.- Returns:
- true if tracing is enabled for this class, false otherwise.
-
getGXYAsynchronousPaintQueue
Description copied from interface:ILcdGXYAsynchronousLayerWrapper
Returns the paint queue handling the asynchronous paints.- Specified by:
getGXYAsynchronousPaintQueue
in interfaceILcdGXYAsynchronousLayerWrapper
- Returns:
- a paint queue to which the paint requests are delegated
-
getGXYLayer
Description copied from interface:ILcdGXYAsynchronousLayerWrapper
Returns 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:
getGXYLayer
in interfaceILcdGXYAsynchronousLayerWrapper
- Returns:
- the wrapped layer
-
setAsynchronous
Description copied from interface:ILcdGXYAsynchronousLayerWrapper
Disables or enables the asynchronous drawing.- Specified by:
setAsynchronous
in 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:ILcdGXYAsynchronousLayerWrapper
Returns whether the wrapped layer is configured to be painted asynchronously.- Specified by:
isAsynchronous
in interfaceILcdGXYAsynchronousLayerWrapper
- Returns:
- whether the asynchronous drawing is enabled
-
setGXYAsynchronousPaintQueue
Description copied from interface:ILcdGXYAsynchronousLayerWrapper
Sets 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:
setGXYAsynchronousPaintQueue
in 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:
paint
in 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:ILcdSelection
Adds 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 aALcdWeakSelectionListener
instance as selection listener.- Specified by:
addSelectionListener
in interfaceILcdSelection<Object>
- Parameters:
aSelectionListener
- theILcdSelectionListener
to be added.
-
removeSelectionListener
Description copied from interface:ILcdSelection
Removes anILcdSelectionListener
from thisILcdSelection
.- Specified by:
removeSelectionListener
in interfaceILcdSelection<Object>
- Parameters:
aSelectionListener
- theILcdSelectionListener
to be removed.
-
addPropertyChangeListener
Description copied from interface:ILcdPropertyChangeSource
Registers the given
PropertyChangeListener
to 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
ALcdWeakPropertyChangeListener
instance as property change listener.- Specified by:
addPropertyChangeListener
in interfaceILcdPropertyChangeSource
- Parameters:
aPropertyChangeListener
- The listener to be notified- See Also:
-
removePropertyChangeListener
Description copied from interface:ILcdPropertyChangeSource
De-registers the given
PropertyChangeListener
from 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:
removePropertyChangeListener
in 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:ILcdLayer
Deselect all the Objects in thisILcdLayer
, i.e., the selection of thisILcdLayer
is empty afterward.- Specified by:
clearSelection
in 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:ILcdLayer
Fires aTLcdSelectionChangedEvent
that contains all the selection changes appended by successively callingselectObject(Object, boolean, ILcdFireEventMode.FIRE_LATER)
.- Specified by:
fireCollectedSelectionChanges
in interfaceILcdLayer
-
getSelectionCount
public int getSelectionCount()Description copied from interface:ILcdSelection
Returns the number of objects in this selection.- Specified by:
getSelectionCount
in interfaceILcdSelection<Object>
- Returns:
- the number of objects in this
ILcdSelection
.
-
isSelected
Description copied from interface:ILcdSelection
Checks whether the givenObject
is currently in the set of selected objects.- Specified by:
isSelected
in interfaceILcdSelection<Object>
- Parameters:
aObject
- theObject
to be checked.- Returns:
true
if theObject
is in thisILcdSelection
, false otherwise.
-
selectedObjects
Description copied from interface:ILcdSelection
Returns the objects in this selection.- Specified by:
selectedObjects
in interfaceILcdSelection<Object>
- Returns:
- the objects currently in this
ILcdSelection
.
-
selectObject
Description copied from interface:ILcdLayer
Changes the selection state of any element contained in theILcdModel
thisILcdLayer
refers to. This method shall have an effect only if isSelectableSupported and isSelectable return true.- Specified by:
selectObject
in interfaceILcdLayer
- Parameters:
aObject
- theObject
to 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,true
to select,false
to deselect.aDispatchEventMode
- shall be one amongILcdFireEventMode.FIRE_NOW
,ILcdFireEventMode.FIRE_LATER
,ILcdFireEventMode.NO_EVENT
- See Also:
-
isSelectableSupported
public boolean isSelectableSupported()Description copied from interface:ILcdLayer
Returnstrue
if this layer supports selecting objects,false
otherwise.- Specified by:
isSelectableSupported
in interfaceILcdLayer
- Returns:
true
if thisILcdLayer
supports the selectable property,false
otherwise. I.e. if thisILcdLayer
can 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:ILcdGXYLayer
Applies 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
true
for 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:
applyOnInteract
in 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
, theILcdFunction
shall 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:ILcdGXYLayer
Returns the view bounds of thisILcdGXYLayer
content, the bounds of all the drawings (for the supplied mode) that represent the Objects contained in theILcdModel
of thisILcdGXYLayer
. For this operation, thisILcdGXYLayer
is 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:
getBounds
in interfaceILcdGXYLayer
- Parameters:
aMode
- a bitwise combination of ALL or SELECTION and one or more of BODIES and HANDLES. TheILcdGXYLayer.LABELS
mode 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:
getGXYPainter
in 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:
getGXYEditor
in 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:
getGXYLabelPainter
in 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:ILcdLayer
Returnstrue
if the layer supports editing its objects.- Specified by:
isEditableSupported
in interfaceILcdLayer
- Returns:
true
if the layer supports editing,false
otherwise.- See Also:
-
isLabeledSupported
public boolean isLabeledSupported()Description copied from interface:ILcdGXYLayer
Returns whether this layer supports representing objects as text. If not, no effort should be made trying to represent the objects with labels.- Specified by:
isLabeledSupported
in interfaceILcdGXYLayer
- Returns:
- whether this layer supports representing objects as text.
-
stopPainting
public void stopPainting()Description copied from interface:ILcdGXYLayer
Inform the layer that it should terminate the current paint operation. This method can be useful when the paint method is executed in a specificThread
and needs to be stopped in a safe state from another Thread.- Specified by:
stopPainting
in interfaceILcdGXYLayer
- See Also:
-
getGXYPen
Description copied from interface:ILcdGXYLayer
Returns the pen to use when performing basic painting operations for objects in this layers model.- Specified by:
getGXYPen
in interfaceILcdGXYLayer
- Returns:
- the pen to use when performing basic painting operations for objects in this layers model.
-
getIcon
Description copied from interface:ILcdLayer
Returns 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:ILcdLayer
A short textual representation of thisILcdLayer
. -
getLabelScaleRange
Description copied from interface:ILcdGXYLayer
Returns 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 range
instead. This property is mutually exclusive with the label map scale range: only one of them has a non-null
value.- Specified by:
getLabelScaleRange
in interfaceILcdGXYLayer
- Returns:
- an
ILcdInterval
containing the minimum and maximum value of view scales for which labels should be rendered, excluding the maximum.null
if the scale constraints are determined byILcdGXYLayer.getLabelMapScaleRange()
The scales are expressed in toolkit pixels/world unit. - See Also:
-
getLabelMapScaleRange
Description copied from interface:ILcdGXYLayer
Returns 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 range
and 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-null
value.- Specified by:
getLabelMapScaleRange
in interfaceILcdGXYLayer
- Returns:
- the minimum and maximum value of map scales for which object labels should be rendered,
or
null
if the scale constraints are determined byILcdGXYLayer.getScaleRange()
-
getModelXYWorldTransfoClass
Description copied from interface:ILcdGXYLayer
Returns 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:
getModelXYWorldTransfoClass
in 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:ILcdGXYLayer
Returns 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 range
instead. This property is mutually exclusive with the map scale range: only one of them has a non-null
value.- Specified by:
getScaleRange
in interfaceILcdGXYLayer
- Returns:
- an
ILcdInterval
containing the minimum and maximum value of view scales for which objects should be rendered, excluding the maximum.null
if the scale constraints are determined byILcdGXYLayer.getMapScaleRange()
. The scales are expressed in toolkit pixels/world unit. - See Also:
-
getMapScaleRange
Description copied from interface:ILcdGXYLayer
Returns 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-null
value.- Specified by:
getMapScaleRange
in interfaceILcdGXYLayer
- Returns:
- the minimum and maximum value of view scales for which objects should be rendered,
or
null
if the scale constraints are determined byILcdGXYLayer.getScaleRange()
-
setIcon
Description copied from interface:ILcdLayer
Sets a visual indication of the contents of this layer. -
setLabel
Description copied from interface:ILcdLayer
Sets the textual representation of thisILcdLayer
. -
isEditable
public boolean isEditable()Description copied from interface:ILcdLayer
Returns whether the layer allows editing the content that it visualizes.- Specified by:
isEditable
in interfaceILcdLayer
- Returns:
true
if thisILcdLayer
is editable,false
otherwise- See Also:
-
setEditable
public void setEditable(boolean aEditable) Description copied from interface:ILcdLayer
Sets whether the layer should allow editing the content that it visualizes. CheckisEditableSupported
to see if the layer supports editing.- Specified by:
setEditable
in interfaceILcdLayer
- Parameters:
aEditable
- true if the layer content can be edited- See Also:
-
isLabeled
public boolean isLabeled()Description copied from interface:ILcdGXYLayer
Returns whether objects should be represented as text. Note that this property shall not be taken into account whenILcdGXYLayer.isLabeledSupported()
returns false.- Specified by:
isLabeled
in interfaceILcdGXYLayer
- Returns:
- whether objects should be represented as text.
- See Also:
-
setLabeled
public void setLabeled(boolean aLabeled) Description copied from interface:ILcdGXYLayer
Sets 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:
setLabeled
in 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:ILcdLayer
Returns whether the layer's objects can be selected, for example, by clicking on them.- Specified by:
isSelectable
in interfaceILcdLayer
- Returns:
true
if the layer allows selection,false
otherwise.- See Also:
-
setSelectable
public void setSelectable(boolean aSelectable) Description copied from interface:ILcdLayer
Sets the Selectable property of thisILcdLayer
. CheckisSelectableSupported
to see if the layer supports selection.- Specified by:
setSelectable
in interfaceILcdLayer
- Parameters:
aSelectable
-true
if the layer allows selection,false
otherwise.- See Also:
-
isVisible
public boolean isVisible()Description copied from interface:ILcdLayer
Returns whether or not the layer's content is painted. -
setVisible
public void setVisible(boolean aVisible) Description copied from interface:ILcdLayer
Sets whether or not the layer's content is painted.- Specified by:
setVisible
in interfaceILcdLayer
- Parameters:
aVisible
-true
if the layer should be visible,false
otherwise.- See Also:
-
getSynchronousGXYLayerChangeTracker
Description copied from interface:ILcdGXYAsynchronousLayerWrapper
Returns 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:
getSynchronousGXYLayerChangeTracker
in 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:ILcdGXYAsynchronousLayerWrapper
Returns a state change synchronizer for the wrapped layer. The changes will be applied after each asynchronous paint, using the synchronous tracker.- Specified by:
getAsynchronousGXYLayerChangeTracker
in 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:ILcdGXYAsynchronousLayerWrapper
Executes 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:
invokeLaterOnGXYLayer
in interfaceILcdGXYAsynchronousLayerWrapper
- Parameters:
aInvocation
- the invocation to run. The invocation will pass the original layer.
-
invokeLaterOnGXYLayerInEDT
Description copied from interface:ILcdGXYAsynchronousLayerWrapper
Executes 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:
invokeLaterOnGXYLayerInEDT
in interfaceILcdGXYAsynchronousLayerWrapper
- Parameters:
aInvocation
- the invocation to run. The invocation will pass the original layer.
-
invokeNowOnGXYLayer
Description copied from interface:ILcdGXYAsynchronousLayerWrapper
Executes 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:
invokeNowOnGXYLayer
in 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:ILcdGXYAsynchronousLayerWrapper
Executes 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:
invokeAndWaitOnGXYLayer
in 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
-