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
ConstructorsConstructorDescriptionDefault constructor: an array of "slave"ILcdLayered, and an array of "source"ILcdLayeredmust be set. -
Method Summary
Modifier and TypeMethodDescriptionReturns the array ofILcdLayeredthat listen to selection events in the sourceILcdLayeredobjects.getSlaveLayered(int aIndex) Returns theILcdLayeredat the given index in the array ofILcdLayeredthat listen to selection events.Returns the array ofILcdLayeredthat generate selection events.getSourceLayered(int aIndex) Returns theILcdLayeredat the given index in the array ofILcdLayeredthat generate selection events.booleanDeprecated.This method has been deprecated.static voidsetClassTraceOn(boolean aClassTraceOn) Deprecated.This method has been deprecated.voidsetSlaveLayered(int aIndex, ILcdLayered aSlaveLayered) Sets one of theILcdLayeredthat listens to selection events.voidsetSlaveLayered(ILcdLayered[] aSlaveLayeredArray) Sets the array ofILcdLayeredthat listen to selection events in the sourceILcdLayeredobjects.voidsetSourceLayered(int aIndex, ILcdLayered aSourceLayered) Sets one of theILcdLayeredthat generate selection events.voidsetSourceLayered(ILcdLayered[] aSourceLayeredArray) Sets the array ofILcdLayeredthat generate selection events.voidsetTraceOn(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"ILcdLayeredmust 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 istruethen 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 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.
-
setSourceLayered
Sets the array ofILcdLayeredthat generate selection events.- Parameters:
aSourceLayeredArray- the array ofILcdLayeredthat generate selection events.- See Also:
-
getSourceLayered
Returns the array ofILcdLayeredthat generate selection events.- Returns:
- the array of
ILcdLayeredthat generate selection events. - See Also:
-
setSourceLayered
Sets one of theILcdLayeredthat generate selection events.- Parameters:
aIndex- the index of the position where thisILcdLayeredshould be placed in the array ofILcdLayeredthat generate selection events.aSourceLayered- theILcdLayeredto place in the array ofILcdLayeredthat generate selection events.- See Also:
-
getSourceLayered
Returns theILcdLayeredat the given index in the array ofILcdLayeredthat generate selection events.- Parameters:
aIndex- the index of theILcdLayeredto return in the array ofILcdLayeredthat generate selection events.- Returns:
- the
ILcdLayeredat the given index in the array ofILcdLayeredthat generate selection events. - See Also:
-
setSlaveLayered
Sets the array ofILcdLayeredthat listen to selection events in the sourceILcdLayeredobjects.- Parameters:
aSlaveLayeredArray- the array ofILcdLayeredthat listens to selection events.- See Also:
-
getSlaveLayered
Returns the array ofILcdLayeredthat listen to selection events in the sourceILcdLayeredobjects.- Returns:
- the array of
ILcdLayeredthat listen to selection events in the sourceILcdLayeredobjects. - See Also:
-
setSlaveLayered
Sets one of theILcdLayeredthat listens to selection events.- Parameters:
aIndex- the index of the position where thisILcdLayeredshould be placed in the array ofILcdLayeredthat listens to selection events.aSlaveLayered- theILcdLayeredto place in the array ofILcdLayeredthat listens to selection events.- See Also:
-
getSlaveLayered
Returns theILcdLayeredat the given index in the array ofILcdLayeredthat listen to selection events.- Parameters:
aIndex- the index of theILcdLayeredto return in the array ofILcdLayeredthat listen to selection events.- Returns:
- the
ILcdLayeredat the given index in the array ofILcdLayeredthat listen to selection events. - See Also:
-