Package com.luciad.lucy.map.action
Class TLcyCreateGXYLayerAction
java.lang.Object
com.luciad.gui.ALcdAction
com.luciad.lucy.map.action.ALcyCreateLayersAction<ILcdGXYView,ILcdGXYLayer>
com.luciad.lucy.map.action.TLcyCreateGXYLayerAction
- All Implemented Interfaces:
ILcdAction
,ILcdUndoableSource
,ILcdPropertyChangeSource
,ActionListener
,Serializable
,EventListener
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.
- See Also:
-
Field Summary
Fields inherited from class com.luciad.gui.ALcdAction
changeSupport
Fields inherited from interface com.luciad.gui.ILcdAction
DEFAULT, LONG_DESCRIPTION, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SHOW_ACTION_NAME, SMALL_ICON, VISIBLE
-
Constructor Summary
ConstructorDescriptionTLcyCreateGXYLayerAction
(ALcyFormat aFormat, ILcyMapComponent aMapComponent) Creates a new action capable of creating and adding anILcdGXYLayer
of the specifiedALcyFormat
to theILcdGXYView
ofaMapComponent
.TLcyCreateGXYLayerAction
(ILcyLucyEnv aLucyEnv, ILcyMapComponent aMapComponent) Creates a new action capable of creating and adding anILcdGXYLayer
to theILcdGXYView
ofaMapComponent
-
Method Summary
Modifier and TypeMethodDescriptionvoid
actionPerformed
(ActionEvent aEvent) Behaves equivalent tocreateAndInsertGXYLayer(java.awt.Component)
.createAndInsertGXYLayer
(Component aParentComponent) Creates and inserts a newILcdGXYLayer
into theILcyMapComponent
.protected ILcdGXYLayer
createGXYLayer
(Component aParentComponent, ILcdModel aModel) Creates theILcdGXYLayer
.protected List
<ILcdGXYLayer> createLayersForModel
(ILcdModel aModel, Component aParentComponent) Create a list of layers foraModel
Returns the Lucy back-endReturns theILcyGenericMapComponent
to which the created layers will be added.Methods inherited from class com.luciad.lucy.map.action.ALcyCreateLayersAction
addUndoableListener, createAndInsertLayers, createModel, fireUndoableHappened, getDefaultModelDescriptorFactory, removeUndoableListener, setDefaultModelDescriptorFactory
Methods inherited from class com.luciad.gui.ALcdAction
addPropertyChangeListener, firePropertyChange, getDisplayName, getIcon, getLongDescription, getName, getShortDescription, getValue, isEnabled, isTraceOn, putValue, registerInstance, removePropertyChangeListener, setClassTraceOn, setDisplayName, setEnabled, setIcon, setLongDescription, setName, setShortDescription, setTraceOn
-
Constructor Details
-
TLcyCreateGXYLayerAction
Creates a new action capable of creating and adding anILcdGXYLayer
to theILcdGXYView
ofaMapComponent
- Parameters:
aLucyEnv
- The Lucy back-endaMapComponent
- The map component to which the created layers will be added
-
TLcyCreateGXYLayerAction
Creates a new action capable of creating and adding anILcdGXYLayer
of the specifiedALcyFormat
to theILcdGXYView
ofaMapComponent
.- Parameters:
aFormat
- The format. This format should return a singleALcyDefaultModelDescriptorFactory
instance from itsALcyFormat.getDefaultModelDescriptorFactories()
method.aMapComponent
- The map component to which the created layers will be added- Since:
- 2019.0
-
-
Method Details
-
getLucyEnv
Description copied from class:ALcyCreateLayersAction
Returns the Lucy back-end- Overrides:
getLucyEnv
in classALcyCreateLayersAction<ILcdGXYView,
ILcdGXYLayer> - Returns:
- the Lucy back-end
-
getMapComponent
Returns theILcyGenericMapComponent
to which the created layers will be added.- Overrides:
getMapComponent
in classALcyCreateLayersAction<ILcdGXYView,
ILcdGXYLayer> - Returns:
- the
ILcyGenericMapComponent
to which the created layers will be added.
-
actionPerformed
Behaves equivalent tocreateAndInsertGXYLayer(java.awt.Component)
.- Specified by:
actionPerformed
in interfaceActionListener
- Overrides:
actionPerformed
in classALcyCreateLayersAction<ILcdGXYView,
ILcdGXYLayer> - Parameters:
aEvent
- The event object.
-
createAndInsertGXYLayer
Creates and inserts a newILcdGXYLayer
into theILcyMapComponent
. Please refer to the class comment for more details about how the layer is created.- Parameters:
aParentComponent
- The parent component, used to parent dialogs.- Returns:
- The layer that was created and inserted, or
null
if the end-user canceled the operation. - Throws:
IllegalArgumentException
- If noALcyDefaultModelDescriptorFactory
could be found inILcyLucyEnv
, and none was set. Or if noILcdModelFactory
was found, or if noILcdGXYLayerFactory
was found.
-
createLayersForModel
Create a list of layers foraModel
This method is just a wrapper around the
createGXYLayer(java.awt.Component, com.luciad.model.ILcdModel)
method which wraps the result in aList
.- Specified by:
createLayersForModel
in classALcyCreateLayersAction<ILcdGXYView,
ILcdGXYLayer> - Parameters:
aModel
- The model to create the layers foraParentComponent
- The parent component, used to parent dialogs.- Returns:
- A list containing the layers that were created for
aModel
. This list should not be empty, nor should it containnull
. Can benull
in case the end-user cancelled the operation.
-
createGXYLayer
Creates theILcdGXYLayer
. Please refer to the class comment for more details about how the layer is created.- Parameters:
aParentComponent
- The parent component, used to parent dialogs.aModel
- The model to create a layer for.- Returns:
- The created
ILcdGXYLayer
, ornull
if the end-user canceled the operation.
-