Class TLcdSelectionMediator

java.lang.Object
com.luciad.view.TLcdSelectionMediator
All Implemented Interfaces:
Serializable

public class TLcdSelectionMediator extends Object implements Serializable
Synchronizes selection among different views.

It operates on an array of source views, of which any selection changes are propagated to the specified target views.

To enable two-way synchronization, simply include all views as both source and target views:

     TLcdSelectionMediator mediator = new TLcdSelectionMediator();
     mediator.setSourceLayered(new ILcdLayered[]{view1, view2});
     mediator.setSlaveLayered(new ILcdLayered[]{view1, view2});
 
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor: an array of "slave" ILcdLayered, and an array of "source" ILcdLayered must be set.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the array of ILcdLayered that listen to selection events in the source ILcdLayered objects.
    getSlaveLayered(int aIndex)
    Returns the ILcdLayered at the given index in the array of ILcdLayered that listen to selection events.
    Returns the array of ILcdLayered that generate selection events.
    getSourceLayered(int aIndex)
    Returns the ILcdLayered at the given index in the array of ILcdLayered that generate selection events.
    boolean
    Deprecated.
    This method has been deprecated.
    static void
    setClassTraceOn(boolean aClassTraceOn)
    Deprecated.
    This method has been deprecated.
    void
    setSlaveLayered(int aIndex, ILcdLayered aSlaveLayered)
    Sets one of the ILcdLayered that listens to selection events.
    void
    setSlaveLayered(ILcdLayered[] aSlaveLayeredArray)
    Sets the array of ILcdLayered that listen to selection events in the source ILcdLayered objects.
    void
    setSourceLayered(int aIndex, ILcdLayered aSourceLayered)
    Sets one of the ILcdLayered that generate selection events.
    void
    setSourceLayered(ILcdLayered[] aSourceLayeredArray)
    Sets the array of ILcdLayered that generate selection events.
    void
    setTraceOn(boolean aTraceOn)
    Deprecated.
    This method has been deprecated.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • setClassTraceOn

      public static void setClassTraceOn(boolean aClassTraceOn)
      Deprecated.
      This method has been deprecated. It is recommended to use the standard Java logging framework directly.
      Enables tracing for all instances of this class. If the argument is true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
      Parameters:
      aClassTraceOn - if true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
    • setTraceOn

      public void setTraceOn(boolean aTraceOn)
      Deprecated.
      This method has been deprecated. It is recommended to use the standard Java logging framework directly.
      Enables tracing for this class instance. Calling this method with 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.
    • setSourceLayered

      public void setSourceLayered(ILcdLayered[] aSourceLayeredArray)
      Sets the array of ILcdLayered that generate selection events.
      Parameters:
      aSourceLayeredArray - the array of ILcdLayered that generate selection events.
      See Also:
    • getSourceLayered

      public ILcdLayered[] getSourceLayered()
      Returns the array of ILcdLayered that generate selection events.
      Returns:
      the array of ILcdLayered that generate selection events.
      See Also:
    • setSourceLayered

      public void setSourceLayered(int aIndex, ILcdLayered aSourceLayered)
      Sets one of the ILcdLayered that generate selection events.
      Parameters:
      aIndex - the index of the position where this ILcdLayered should be placed in the array of ILcdLayered that generate selection events.
      aSourceLayered - the ILcdLayered to place in the array of ILcdLayered that generate selection events.
      See Also:
    • getSourceLayered

      public ILcdLayered getSourceLayered(int aIndex)
      Returns the ILcdLayered at the given index in the array of ILcdLayered that generate selection events.
      Parameters:
      aIndex - the index of the ILcdLayered to return in the array of ILcdLayered that generate selection events.
      Returns:
      the ILcdLayered at the given index in the array of ILcdLayered that generate selection events.
      See Also:
    • setSlaveLayered

      public void setSlaveLayered(ILcdLayered[] aSlaveLayeredArray)
      Sets the array of ILcdLayered that listen to selection events in the source ILcdLayered objects.
      Parameters:
      aSlaveLayeredArray - the array of ILcdLayered that listens to selection events.
      See Also:
    • getSlaveLayered

      public ILcdLayered[] getSlaveLayered()
      Returns the array of ILcdLayered that listen to selection events in the source ILcdLayered objects.
      Returns:
      the array of ILcdLayered that listen to selection events in the source ILcdLayered objects.
      See Also:
    • setSlaveLayered

      public void setSlaveLayered(int aIndex, ILcdLayered aSlaveLayered)
      Sets one of the ILcdLayered that listens to selection events.
      Parameters:
      aIndex - the index of the position where this ILcdLayered should be placed in the array of ILcdLayered that listens to selection events.
      aSlaveLayered - the ILcdLayered to place in the array of ILcdLayered that listens to selection events.
      See Also:
    • getSlaveLayered

      public ILcdLayered getSlaveLayered(int aIndex)
      Returns the ILcdLayered at the given index in the array of ILcdLayered that listen to selection events.
      Parameters:
      aIndex - the index of the ILcdLayered to return in the array of ILcdLayered that listen to selection events.
      Returns:
      the ILcdLayered at the given index in the array of ILcdLayered that listen to selection events.
      See Also: