public class TLcdSelectionMediator extends Object implements Serializable
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});
Constructor and Description |
---|
TLcdSelectionMediator()
Default constructor: an array of "slave"
ILcdLayered ,
and an array of "source" ILcdLayered must be set. |
Modifier and Type | Method and Description |
---|---|
ILcdLayered[] |
getSlaveLayered()
Returns the array of
ILcdLayered that listen to selection events in the source ILcdLayered objects. |
ILcdLayered |
getSlaveLayered(int aIndex)
Returns the
ILcdLayered at the given index in the array of ILcdLayered that listen to selection events. |
ILcdLayered[] |
getSourceLayered()
Returns the array of
ILcdLayered that generate selection events. |
ILcdLayered |
getSourceLayered(int aIndex)
Returns the
ILcdLayered at the given index in the array of ILcdLayered that generate selection events. |
boolean |
isTraceOn()
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
static void |
setClassTraceOn(boolean aClassTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
setSlaveLayered(ILcdLayered[] aSlaveLayeredArray)
Sets the array of
ILcdLayered that listen to selection events in the source ILcdLayered objects. |
void |
setSlaveLayered(int aIndex,
ILcdLayered aSlaveLayered)
Sets one of the
ILcdLayered that listens to selection events. |
void |
setSourceLayered(ILcdLayered[] aSourceLayeredArray)
Sets the array of
ILcdLayered that generate selection events. |
void |
setSourceLayered(int aIndex,
ILcdLayered aSourceLayered)
Sets one of the
ILcdLayered that generate selection events. |
void |
setTraceOn(boolean aTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
public TLcdSelectionMediator()
ILcdLayered
,
and an array of "source" ILcdLayered
must be set.public static void setClassTraceOn(boolean aClassTraceOn)
true
then all log messages are recorded, otherwise only
the informative, warning and error messages are recorded.aClassTraceOn
- if true then all log messages are recorded,
otherwise only the informative, warning and error messages are recorded.public void setTraceOn(boolean aTraceOn)
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.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.public boolean isTraceOn()
true
if tracing is enabled for this class.public void setSourceLayered(ILcdLayered[] aSourceLayeredArray)
ILcdLayered
that generate selection events.aSourceLayeredArray
- the array of ILcdLayered
that generate selection events.getSourceLayered()
public ILcdLayered[] getSourceLayered()
ILcdLayered
that generate selection events.ILcdLayered
that generate selection events.setSourceLayered(com.luciad.view.ILcdLayered[])
public void setSourceLayered(int aIndex, ILcdLayered aSourceLayered)
ILcdLayered
that generate selection events.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.getSourceLayered()
public ILcdLayered getSourceLayered(int aIndex)
ILcdLayered
at the given index in the array of ILcdLayered
that generate selection events.aIndex
- the index of the ILcdLayered
to return in the array of ILcdLayered
that generate selection events.ILcdLayered
at the given index in the array of ILcdLayered
that generate selection events.setSourceLayered(com.luciad.view.ILcdLayered[])
public void setSlaveLayered(ILcdLayered[] aSlaveLayeredArray)
ILcdLayered
that listen to selection events in the source ILcdLayered
objects.aSlaveLayeredArray
- the array of ILcdLayered
that listens to selection events.getSlaveLayered()
public ILcdLayered[] getSlaveLayered()
ILcdLayered
that listen to selection events in the source ILcdLayered
objects.ILcdLayered
that listen to selection events in the source ILcdLayered
objects.setSlaveLayered(com.luciad.view.ILcdLayered[])
public void setSlaveLayered(int aIndex, ILcdLayered aSlaveLayered)
ILcdLayered
that listens to selection events.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.getSlaveLayered()
public ILcdLayered getSlaveLayered(int aIndex)
ILcdLayered
at the given index in the array of ILcdLayered
that listen to selection events.aIndex
- the index of the ILcdLayered
to return in the array of ILcdLayered
that listen to selection events.ILcdLayered
at the given index in the array of ILcdLayered
that listen to selection events.setSlaveLayered(com.luciad.view.ILcdLayered[])