public class TLcyCreateGXYLayerAction extends ALcyCreateLayersAction<ILcdGXYView,ILcdGXYLayer>
Implementation of ALcyCreateLayersAction
for ILcdGXYLayer
and ILcdGXYView
instances.
Consult the class javadoc of the super class for more information on how to use this class.
changeSupport
DEFAULT, LONG_DESCRIPTION, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SHOW_ACTION_NAME, SMALL_ICON, VISIBLE
Constructor and Description |
---|
TLcyCreateGXYLayerAction(ALcyFormat aFormat,
ILcyMapComponent aMapComponent)
Creates a new action capable of creating and adding an
ILcdGXYLayer of the specified ALcyFormat
to the ILcdGXYView of aMapComponent . |
TLcyCreateGXYLayerAction(ILcyLucyEnv aLucyEnv,
ILcyMapComponent aMapComponent)
Creates a new action capable of creating and adding an
ILcdGXYLayer to the ILcdGXYView of aMapComponent |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent aEvent)
Behaves equivalent to
createAndInsertGXYLayer(java.awt.Component) . |
ILcdGXYLayer |
createAndInsertGXYLayer(Component aParentComponent)
Creates and inserts a new
ILcdGXYLayer into the ILcyMapComponent . |
protected ILcdGXYLayer |
createGXYLayer(Component aParentComponent,
ILcdModel aModel)
Creates the
ILcdGXYLayer . |
protected List<ILcdGXYLayer> |
createLayersForModel(ILcdModel aModel,
Component aParentComponent)
Create a list of layers for
aModel |
ILcyLucyEnv |
getLucyEnv()
Returns the Lucy back-end
|
ILcyMapComponent |
getMapComponent()
Returns the
ILcyGenericMapComponent to which the created layers will be added. |
addUndoableListener, createAndInsertLayers, createModel, fireUndoableHappened, getDefaultModelDescriptorFactory, removeUndoableListener, setDefaultModelDescriptorFactory
addPropertyChangeListener, firePropertyChange, getDisplayName, getIcon, getLongDescription, getName, getShortDescription, getValue, isEnabled, isTraceOn, putValue, registerInstance, removePropertyChangeListener, setClassTraceOn, setDisplayName, setEnabled, setIcon, setLongDescription, setName, setShortDescription, setTraceOn
public TLcyCreateGXYLayerAction(ILcyLucyEnv aLucyEnv, ILcyMapComponent aMapComponent)
ILcdGXYLayer
to the ILcdGXYView
of aMapComponent
aLucyEnv
- The Lucy back-endaMapComponent
- The map component to which the created layers will be addedpublic TLcyCreateGXYLayerAction(ALcyFormat aFormat, ILcyMapComponent aMapComponent)
ILcdGXYLayer
of the specified ALcyFormat
to the ILcdGXYView
of aMapComponent
.aFormat
- The format.
This format should return a single ALcyDefaultModelDescriptorFactory
instance from its ALcyFormat.getDefaultModelDescriptorFactories()
method.aMapComponent
- The map component to which the created layers will be addedpublic ILcyLucyEnv getLucyEnv()
ALcyCreateLayersAction
getLucyEnv
in class ALcyCreateLayersAction<ILcdGXYView,ILcdGXYLayer>
public ILcyMapComponent getMapComponent()
ILcyGenericMapComponent
to which the created layers will be added.getMapComponent
in class ALcyCreateLayersAction<ILcdGXYView,ILcdGXYLayer>
ILcyGenericMapComponent
to which the created layers will be added.public void actionPerformed(ActionEvent aEvent)
createAndInsertGXYLayer(java.awt.Component)
.actionPerformed
in interface ActionListener
actionPerformed
in class ALcyCreateLayersAction<ILcdGXYView,ILcdGXYLayer>
aEvent
- The event object.public ILcdGXYLayer createAndInsertGXYLayer(Component aParentComponent)
ILcdGXYLayer
into the ILcyMapComponent
.
Please refer to the class comment for more details about how the layer is created.aParentComponent
- The parent component, used to parent dialogs.null
if the end-user canceled
the operation.IllegalArgumentException
- If no ALcyDefaultModelDescriptorFactory
could be
found in ILcyLucyEnv
, and none was set. Or if no
ILcdModelFactory
was found, or if no
ILcdGXYLayerFactory
was found.protected List<ILcdGXYLayer> createLayersForModel(ILcdModel aModel, Component aParentComponent)
aModel
This method is just a wrapper around the createGXYLayer(java.awt.Component,
com.luciad.model.ILcdModel)
method which wraps the result in a List
.
createLayersForModel
in class ALcyCreateLayersAction<ILcdGXYView,ILcdGXYLayer>
aModel
- The model to create the layers foraParentComponent
- The parent component, used to parent dialogs.aModel
. This list should not
be empty, nor should it contain null
. Can be null
in case the end-user
cancelled the operation.protected ILcdGXYLayer createGXYLayer(Component aParentComponent, ILcdModel aModel)
ILcdGXYLayer
. Please refer to the class comment for more details about
how the layer is created.aParentComponent
- The parent component, used to parent dialogs.aModel
- The model to create a layer for.ILcdGXYLayer
, or null
if the end-user canceled
the operation.