public class TLcdMoveLayerAction extends ALcdAction implements ILcdAction
ILcdAction
that changes the position of a given
ILcdLayer
in an ILcdLayered
. The position change
depends on the move command associated with this ILcdAction
.Modifier and Type | Field and Description |
---|---|
static String |
MOVE_BOTTOM
Constant to indicate an action that moves a layer to the bottom of the list.
|
static String |
MOVE_DOWN
Constant to indicate an action that moves a layer one position down in the list.
|
static String |
MOVE_TOP
Constant to indicate an action that moves a layer to the top of the list.
|
static String |
MOVE_UP
Constant to indicate an action that moves a layer one position up in the list.
|
changeSupport
DEFAULT, LONG_DESCRIPTION, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SHOW_ACTION_NAME, SMALL_ICON, VISIBLE
Constructor and Description |
---|
TLcdMoveLayerAction()
Default constructor: an
ILcdLayered , an ILcdLayer
and a MoveCommand still must be set. |
TLcdMoveLayerAction(ILcdLayered aLayered,
ILcdLayer[] aLayers,
String aMoveCommand)
Constructor with an
ILcdLayered , an ILcdLayer array
and a MoveCommand . |
TLcdMoveLayerAction(ILcdLayered aLayered,
ILcdLayer aLayer,
String aMoveCommand)
Constructor with an
ILcdLayered , an ILcdLayer
and a MoveCommand . |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent ae)
Performs this
ILcdAction . |
ILcdLayer |
getLayer()
Gets the first
ILcdLayer associated to this ILcdAction . |
ILcdLayered |
getLayered()
Gets the
ILcdLayered associated to this ILcdAction . |
ILcdLayer[] |
getLayers()
Gets the
ILcdLayer s associated to this ILcdAction |
String |
getMoveCommand()
Gets the
MoveCommand associated with this ILcdAction . |
boolean |
isTraceOn()
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
setLayer(ILcdLayer aLayer)
Sets the
ILcdLayer aLayer to this ILcdAction . |
void |
setLayered(ILcdLayered aLayered)
Sets the
ILcdLayered aLayered to this ILcdAction . |
void |
setLayers(ILcdLayer[] aLayers)
Sets the
ILcdLayer s aLayers to this ILcdAction . |
void |
setMoveCommand(String aMoveCommand)
Sets the
MoveCommand to this ILcdAction . |
void |
setTraceOn(boolean aTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
addPropertyChangeListener, firePropertyChange, getDisplayName, getIcon, getLongDescription, getName, getShortDescription, getValue, isEnabled, putValue, registerInstance, removePropertyChangeListener, setClassTraceOn, setDisplayName, setEnabled, setIcon, setLongDescription, setName, setShortDescription
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getValue, isEnabled, putValue, setEnabled
addPropertyChangeListener, removePropertyChangeListener
public static final String MOVE_TOP
public static final String MOVE_BOTTOM
public static final String MOVE_UP
public static final String MOVE_DOWN
public TLcdMoveLayerAction()
ILcdLayered
, an ILcdLayer
and a MoveCommand
still must be set.public TLcdMoveLayerAction(ILcdLayered aLayered, ILcdLayer aLayer, String aMoveCommand)
ILcdLayered
, an ILcdLayer
and a MoveCommand
.aLayered
- the layered on which actions will be performed.aLayer
- the layer in the layered on which actions will be performed.aMoveCommand
- the action to perform on the layer given.public TLcdMoveLayerAction(ILcdLayered aLayered, ILcdLayer[] aLayers, String aMoveCommand)
ILcdLayered
, an ILcdLayer
array
and a MoveCommand
.aLayered
- the layered on which actions will be performed.aLayers
- the layers in the layered on which actions will be performed.aMoveCommand
- the action to perform on the layers given.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.setTraceOn
in class ALcdAction
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.isTraceOn
in class ALcdAction
public String getMoveCommand()
MoveCommand
associated with this ILcdAction
.setMoveCommand(java.lang.String)
public void setMoveCommand(String aMoveCommand)
MoveCommand
to this ILcdAction
.aMoveCommand
- one of MOVE_TOP, MOVE_BOTTOM, MOVE_UP, MOVE_DOWN.getMoveCommand()
public void setLayer(ILcdLayer aLayer)
ILcdLayer
aLayer
to this ILcdAction
.aLayer
- the layer on which actions will be performed.getLayer()
public void setLayers(ILcdLayer[] aLayers)
ILcdLayer
s aLayers
to this ILcdAction
.aLayers
- the layers on which actions will be performedgetLayers()
public ILcdLayer getLayer()
ILcdLayer
associated to this ILcdAction
.setLayer(com.luciad.view.ILcdLayer)
public ILcdLayer[] getLayers()
ILcdLayer
s associated to this ILcdAction
setLayers(com.luciad.view.ILcdLayer[])
public void setLayered(ILcdLayered aLayered)
ILcdLayered aLayered
to this ILcdAction
.aLayered
- the layered on which actions will be performed.getLayered()
public ILcdLayered getLayered()
ILcdLayered
associated to this ILcdAction
.setLayered(com.luciad.view.ILcdLayered)
public void actionPerformed(ActionEvent ae)
ILcdAction
. A NullPointerException
will be thrown if one of the properties is null
.actionPerformed
in interface ActionListener
setLayer(com.luciad.view.ILcdLayer)
,
setLayered(com.luciad.view.ILcdLayered)
,
setMoveCommand(java.lang.String)