Class TLcdGXYAsynchronousLayerWrapper

java.lang.Object
com.luciad.view.gxy.asynchronous.TLcdGXYAsynchronousLayerWrapper
All Implemented Interfaces:
ILcdPropertyChangeSource, ILcdSelection<Object>, ILcdGXYAsynchronousLayerWrapper, ILcdGXYLayer, ILcdLayer, Serializable
Direct Known Subclasses:
TLcdGXYAsynchronousEditableLabelsLayerWrapper, TLcdGXYAsynchronousLayerTreeNodeWrapper, TLcdGXYLspAsynchronousLayerWrapper

public class TLcdGXYAsynchronousLayerWrapper extends Object implements ILcdGXYLayer, ILcdGXYAsynchronousLayerWrapper
Implementation of 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:
  • Constructor Details

    • TLcdGXYAsynchronousLayerWrapper

      public TLcdGXYAsynchronousLayerWrapper(ILcdGXYLayer aDecoratedLayer)
      Creates a layer decorator that delegates painting to an asynchronous paint queue. After construction, a paint queue must be set using setGXYAsynchronousPaintQueue(ILcdGXYAsynchronousPaintQueue) For thread safety, the given layers should operate synchronously. Hence, a TLcdGXYAsynchronousLayerWrapper should not wrap another ILcdGXYAsynchronousLayerWrapper.
      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 either true or false as argument automatically turns off tracing for all other class instances for which setTraceOn has not been called. If the argument is false then only the informative, warning and error log messages are recorded.
      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.
      Returns true if tracing is enabled for this class.
      Returns:
      true if tracing is enabled for this class, false otherwise.
    • getGXYAsynchronousPaintQueue

      public ILcdGXYAsynchronousPaintQueue getGXYAsynchronousPaintQueue()
      Description copied from interface: ILcdGXYAsynchronousLayerWrapper
      Returns the paint queue handling the asynchronous paints.
      Specified by:
      getGXYAsynchronousPaintQueue in interface ILcdGXYAsynchronousLayerWrapper
      Returns:
      a paint queue to which the paint requests are delegated
    • getGXYLayer

      public ILcdGXYLayer 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 methods ILcdGXYAsynchronousLayerWrapper.invokeAndWaitOnGXYLayer(ILcdGXYAsynchronousLayerRunnable) and ILcdGXYAsynchronousLayerWrapper.invokeLaterOnGXYLayer(ILcdGXYAsynchronousLayerRunnable) provide safe alternatives.
      Specified by:
      getGXYLayer in interface ILcdGXYAsynchronousLayerWrapper
      Returns:
      the wrapped layer
    • setAsynchronous

      public void setAsynchronous(boolean aAsynchronous) throws InterruptedException
      Description copied from interface: ILcdGXYAsynchronousLayerWrapper
      Disables or enables the asynchronous drawing.
      Specified by:
      setAsynchronous in interface ILcdGXYAsynchronousLayerWrapper
      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 interface ILcdGXYAsynchronousLayerWrapper
      Returns:
      whether the asynchronous drawing is enabled
    • setGXYAsynchronousPaintQueue

      public void setGXYAsynchronousPaintQueue(ILcdGXYAsynchronousPaintQueue aQueue)
      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 interface ILcdGXYAsynchronousLayerWrapper
      Parameters:
      aQueue - the asynchronous paint queue responsible for executing the paint calls.
    • paint

      public void paint(Graphics aGraphics, int aMode, ILcdGXYView aView)
      Paints the layer asynchronously or synchronously, depending on isAsynchronous. Asynchronous painting is delegated to the layer's paint queue.
      Specified by:
      paint in interface ILcdGXYLayer
      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

      public void addSelectionListener(ILcdSelectionListener<Object> aSelectionListener)
      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 this ILcdSelection, you can use a ALcdWeakSelectionListener instance as selection listener.
      Specified by:
      addSelectionListener in interface ILcdSelection<Object>
      Parameters:
      aSelectionListener - the ILcdSelectionListener to be added.
    • removeSelectionListener

      public void removeSelectionListener(ILcdSelectionListener<Object> aSelectionListener)
      Description copied from interface: ILcdSelection
      Removes an ILcdSelectionListener from this ILcdSelection.
      Specified by:
      removeSelectionListener in interface ILcdSelection<Object>
      Parameters:
      aSelectionListener - the ILcdSelectionListener to be removed.
    • addPropertyChangeListener

      public void addPropertyChangeListener(PropertyChangeListener aPropertyChangeListener)
      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 interface ILcdPropertyChangeSource
      Parameters:
      aPropertyChangeListener - The listener to be notified
      See Also:
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener aPropertyChangeListener)
      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 interface ILcdPropertyChangeSource
      Parameters:
      aPropertyChangeListener - the listener that should no longer be notified of changes of this object's properties
      See Also:
    • firePropertyChangeEvent

      protected void firePropertyChangeEvent(PropertyChangeEvent aEvent)
      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 this ILcdLayer, i.e., the selection of this ILcdLayer is empty afterward.
      Specified by:
      clearSelection in interface ILcdLayer
      Parameters:
      aDispatchEventMode - shall be one among ILcdFireEventMode.FIRE_NOW, ILcdFireEventMode.FIRE_LATER, ILcdFireEventMode.NO_EVENT
      See Also:
    • fireCollectedSelectionChanges

      public void fireCollectedSelectionChanges()
      Description copied from interface: ILcdLayer
      Fires a TLcdSelectionChangedEvent that contains all the selection changes appended by successively calling selectObject(Object, boolean, ILcdFireEventMode.FIRE_LATER).
      Specified by:
      fireCollectedSelectionChanges in interface ILcdLayer
    • getSelectionCount

      public int getSelectionCount()
      Description copied from interface: ILcdSelection
      Returns the number of objects in this selection.
      Specified by:
      getSelectionCount in interface ILcdSelection<Object>
      Returns:
      the number of objects in this ILcdSelection.
    • isSelected

      public boolean isSelected(Object aObject)
      Description copied from interface: ILcdSelection
      Checks whether the given Object is currently in the set of selected objects.
      Specified by:
      isSelected in interface ILcdSelection<Object>
      Parameters:
      aObject - the Object to be checked.
      Returns:
      true if the Object is in this ILcdSelection, false otherwise.
    • selectedObjects

      public Enumeration<Object> selectedObjects()
      Description copied from interface: ILcdSelection
      Returns the objects in this selection.
      Specified by:
      selectedObjects in interface ILcdSelection<Object>
      Returns:
      the objects currently in this ILcdSelection.
    • selectObject

      public void selectObject(Object aObject, boolean aSelection, int aDispatchEventMode)
      Description copied from interface: ILcdLayer
      Changes the selection state of any element contained in the ILcdModel this ILcdLayer refers to. This method shall have an effect only if isSelectableSupported and isSelectable return true.
      Specified by:
      selectObject in interface ILcdLayer
      Parameters:
      aObject - the Object 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 among ILcdFireEventMode.FIRE_NOW, ILcdFireEventMode.FIRE_LATER, ILcdFireEventMode.NO_EVENT
      See Also:
    • isSelectableSupported

      public boolean isSelectableSupported()
      Description copied from interface: ILcdLayer
      Returns true if this layer supports selecting objects, false otherwise.
      Specified by:
      isSelectableSupported in interface ILcdLayer
      Returns:
      true if this ILcdLayer supports the selectable property, false otherwise. I.e. if this ILcdLayer 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 interface ILcdGXYLayer
      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 - if true, the ILcdFunction 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

      public ILcdBounds getBounds(int aMode, ILcdGXYView aGXYView) throws TLcdNoBoundsException
      Description copied from interface: ILcdGXYLayer
      Returns the view bounds of this ILcdGXYLayer content, the bounds of all the drawings (for the supplied mode) that represent the Objects contained in the ILcdModel of this ILcdGXYLayer. For this operation, this ILcdGXYLayer is to be considered as part of aGXYView.

      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 interface ILcdGXYLayer
      Parameters:
      aMode - a bitwise combination of ALL or SELECTION and one or more of BODIES and HANDLES. The ILcdGXYLayer.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

      public ILcdGXYPainter getGXYPainter(Object aObject)
      Returns a clone of the wrapped layer's GXYPainter, or the painter itself if the associated paint queue is empty.
      Specified by:
      getGXYPainter in interface ILcdGXYLayer
      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

      public ILcdGXYEditor getGXYEditor(Object aObject)
      Returns a clone of the wrapped layer's GXYEditor, or the editor itself if the associated paint queue is empty.
      Specified by:
      getGXYEditor in interface ILcdGXYLayer
      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

      public ILcdGXYLabelPainter getGXYLabelPainter(Object aObject)
      Returns a clone of the wrapped layer's GXYLabelPainter, or the painter itself if the associated paint queue is empty.
      Specified by:
      getGXYLabelPainter in interface ILcdGXYLayer
      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

      public ILcdModel getModel()
      Specified by:
      getModel in interface ILcdLayer
      Returns:
      the ILcdModel associated to this ILcdLayer
    • isEditableSupported

      public boolean isEditableSupported()
      Description copied from interface: ILcdLayer
      Returns true if the layer supports editing its objects.
      Specified by:
      isEditableSupported in interface ILcdLayer
      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 interface ILcdGXYLayer
      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 specific Thread and needs to be stopped in a safe state from another Thread.
      Specified by:
      stopPainting in interface ILcdGXYLayer
      See Also:
    • getGXYPen

      public ILcdGXYPen 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 interface ILcdGXYLayer
      Returns:
      the pen to use when performing basic painting operations for objects in this layers model.
    • getIcon

      public ILcdIcon 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.
      Specified by:
      getIcon in interface ILcdLayer
      Returns:
      a visual indication of the contents of this layer.
    • getLabel

      public String getLabel()
      Description copied from interface: ILcdLayer
      A short textual representation of this ILcdLayer.
      Specified by:
      getLabel in interface ILcdLayer
      Returns:
      a short textual representation of this ILcdLayer
    • getLabelScaleRange

      public ILcdInterval 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() or view.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 the unitless 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 interface ILcdGXYLayer
      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 by ILcdGXYLayer.getLabelMapScaleRange() The scales are expressed in toolkit pixels/world unit.
      See Also:
    • getLabelMapScaleRange

      public TLcdDimensionInterval<TLcdMapScale> 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 the map 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 the toolkit label scale range: only one of them has a non-null value.

      Specified by:
      getLabelMapScaleRange in interface ILcdGXYLayer
      Returns:
      the minimum and maximum value of map scales for which object labels should be rendered, or null if the scale constraints are determined by ILcdGXYLayer.getScaleRange()
    • getModelXYWorldTransfoClass

      public Class 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 interface ILcdGXYLayer
      Returns:
      the transformation class that to use to transform points and bounds from model space to world space and back.
    • getScaleRange

      public ILcdInterval 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() or view.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 the unitless 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 interface ILcdGXYLayer
      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 by ILcdGXYLayer.getMapScaleRange(). The scales are expressed in toolkit pixels/world unit.
      See Also:
    • getMapScaleRange

      public TLcdDimensionInterval<TLcdMapScale> 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 the toolkit scale range: only one of them has a non-null value.
      Specified by:
      getMapScaleRange in interface ILcdGXYLayer
      Returns:
      the minimum and maximum value of view scales for which objects should be rendered, or null if the scale constraints are determined by ILcdGXYLayer.getScaleRange()
    • setIcon

      public void setIcon(ILcdIcon aIcon)
      Description copied from interface: ILcdLayer
      Sets a visual indication of the contents of this layer.
      Specified by:
      setIcon in interface ILcdLayer
      Parameters:
      aIcon - a visual indication of the contents of this layer.
      See Also:
    • setLabel

      public void setLabel(String aLabel)
      Description copied from interface: ILcdLayer
      Sets the textual representation of this ILcdLayer.
      Specified by:
      setLabel in interface ILcdLayer
      Parameters:
      aLabel - the the textual representation to use for this ILcdLayer.
    • isEditable

      public boolean isEditable()
      Description copied from interface: ILcdLayer
      Returns whether the layer allows editing the content that it visualizes.
      Specified by:
      isEditable in interface ILcdLayer
      Returns:
      true if this ILcdLayer 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. Check isEditableSupported to see if the layer supports editing.
      Specified by:
      setEditable in interface ILcdLayer
      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 when ILcdGXYLayer.isLabeledSupported() returns false.
      Specified by:
      isLabeled in interface ILcdGXYLayer
      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 as ILcdGXYLayer.isLabeledSupported() returns false.
      Specified by:
      setLabeled in interface ILcdGXYLayer
      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 interface ILcdLayer
      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 this ILcdLayer. Check isSelectableSupported to see if the layer supports selection.
      Specified by:
      setSelectable in interface ILcdLayer
      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.
      Specified by:
      isVisible in interface ILcdLayer
      Returns:
      true if the layer is visible, false otherwise.
      See Also:
    • 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 interface ILcdLayer
      Parameters:
      aVisible - true if the layer should be visible, false otherwise.
      See Also:
    • getSynchronousGXYLayerChangeTracker

      public ILcdGXYLayerChangeTracker 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 interface ILcdGXYAsynchronousLayerWrapper
      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

      public ILcdGXYLayerChangeTracker 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 interface ILcdGXYAsynchronousLayerWrapper
      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

      public void invokeLaterOnGXYLayer(ILcdGXYAsynchronousLayerRunnable aInvocation)
      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 interface ILcdGXYAsynchronousLayerWrapper
      Parameters:
      aInvocation - the invocation to run. The invocation will pass the original layer.
    • invokeLaterOnGXYLayerInEDT

      public void invokeLaterOnGXYLayerInEDT(ILcdGXYAsynchronousLayerRunnable aInvocation)
      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 interface ILcdGXYAsynchronousLayerWrapper
      Parameters:
      aInvocation - the invocation to run. The invocation will pass the original layer.
    • invokeNowOnGXYLayer

      public void invokeNowOnGXYLayer(ILcdGXYAsynchronousLayerRunnable aInvocation)
      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 interface ILcdGXYAsynchronousLayerWrapper
      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 interface ILcdGXYAsynchronousLayerWrapper
      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