Package com.luciad.view
Class TLcdSelectionMediator
java.lang.Object
com.luciad.view.TLcdSelectionMediator
- All Implemented Interfaces:
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
ConstructorDescriptionDefault constructor: an array of "slave"ILcdLayered
, and an array of "source"ILcdLayered
must be set. -
Method Summary
Modifier and TypeMethodDescriptionReturns the array ofILcdLayered
that listen to selection events in the sourceILcdLayered
objects.getSlaveLayered
(int aIndex) Returns theILcdLayered
at the given index in the array ofILcdLayered
that listen to selection events.Returns the array ofILcdLayered
that generate selection events.getSourceLayered
(int aIndex) Returns theILcdLayered
at the given index in the array ofILcdLayered
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 theILcdLayered
that listens to selection events.void
setSlaveLayered
(ILcdLayered[] aSlaveLayeredArray) Sets the array ofILcdLayered
that listen to selection events in the sourceILcdLayered
objects.void
setSourceLayered
(int aIndex, ILcdLayered aSourceLayered) Sets one of theILcdLayered
that generate selection events.void
setSourceLayered
(ILcdLayered[] aSourceLayeredArray) Sets the array ofILcdLayered
that generate selection events.void
setTraceOn
(boolean aTraceOn) Deprecated.This method has been deprecated.
-
Constructor Details
-
TLcdSelectionMediator
public TLcdSelectionMediator()Default constructor: an array of "slave"ILcdLayered
, and an array of "source"ILcdLayered
must be set.- See Also:
-
-
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 istrue
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 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.
-
setSourceLayered
Sets the array ofILcdLayered
that generate selection events.- Parameters:
aSourceLayeredArray
- the array ofILcdLayered
that generate selection events.- See Also:
-
getSourceLayered
Returns the array ofILcdLayered
that generate selection events.- Returns:
- the array of
ILcdLayered
that generate selection events. - See Also:
-
setSourceLayered
Sets one of theILcdLayered
that generate selection events.- Parameters:
aIndex
- the index of the position where thisILcdLayered
should be placed in the array ofILcdLayered
that generate selection events.aSourceLayered
- theILcdLayered
to place in the array ofILcdLayered
that generate selection events.- See Also:
-
getSourceLayered
Returns theILcdLayered
at the given index in the array ofILcdLayered
that generate selection events.- Parameters:
aIndex
- the index of theILcdLayered
to return in the array ofILcdLayered
that generate selection events.- Returns:
- the
ILcdLayered
at the given index in the array ofILcdLayered
that generate selection events. - See Also:
-
setSlaveLayered
Sets the array ofILcdLayered
that listen to selection events in the sourceILcdLayered
objects.- Parameters:
aSlaveLayeredArray
- the array ofILcdLayered
that listens to selection events.- See Also:
-
getSlaveLayered
Returns the array ofILcdLayered
that listen to selection events in the sourceILcdLayered
objects.- Returns:
- the array of
ILcdLayered
that listen to selection events in the sourceILcdLayered
objects. - See Also:
-
setSlaveLayered
Sets one of theILcdLayered
that listens to selection events.- Parameters:
aIndex
- the index of the position where thisILcdLayered
should be placed in the array ofILcdLayered
that listens to selection events.aSlaveLayered
- theILcdLayered
to place in the array ofILcdLayered
that listens to selection events.- See Also:
-
getSlaveLayered
Returns theILcdLayered
at the given index in the array ofILcdLayered
that listen to selection events.- Parameters:
aIndex
- the index of theILcdLayered
to return in the array ofILcdLayered
that listen to selection events.- Returns:
- the
ILcdLayered
at the given index in the array ofILcdLayered
that listen to selection events. - See Also:
-