Package com.luciad.format.kml22.view
Class ALcdKML22ViewFitAction
java.lang.Object
com.luciad.gui.ALcdAction
com.luciad.format.kml22.view.ALcdKML22ViewFitAction
- All Implemented Interfaces:
ILcdAction
,ILcdPropertyChangeSource
,ActionListener
,Serializable
,EventListener
- Direct Known Subclasses:
TLcdKML22GXYViewFitAction
,TLspKML22ViewFitAction
An abstract class that defines a common interface for fit-to-object actions in KML 2.2
Some KML22 features define a Camera
or a LookAt
element. This view
fit action checks if any of these elements are present. If not, then it will perform a generic
view fit on the feature itself.
- Since:
- 10.0
- 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
ConstructorDescriptionALcdKML22ViewFitAction
(ILcdView aView, String aName) Creates a new instance of this abstract fit action with a given name. -
Method Summary
Modifier and TypeMethodDescriptionabstract void
actionPerformed
(ActionEvent aActionEvent) Performs the view-fit action on the object set by setObjectToFit(Object), in the view set by setView(ILcdView)abstract boolean
canPerformFit
(Object aObject, ILcdView aView) Checks whether this view fit action can perform a fit.Returns the object on which this action should perform view-fit events.getView()
Gets the view this view fit action fits onabstract void
performFit
(Object aObject, ILcdView aView) Performs the fit actionvoid
setObjectToFit
(Object aObjectToFit) Sets the object this view-fit action should fit on.void
Sets the view this view fit action should fit on.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
-
ALcdKML22ViewFitAction
Creates a new instance of this abstract fit action with a given name.- Parameters:
aView
- an ILcdView. Can be nullaName
- a name for the abstract fit action
-
-
Method Details
-
setObjectToFit
Sets the object this view-fit action should fit on.
Note: This method does not actually perform the fit action, it simply changes the object that the next fit action will be performed on.
To fit on an object, use the actionPerformed(java.awt.event.ActionEvent) method
- Parameters:
aObjectToFit
- An object on which this action should fit- See Also:
-
getObjectToFit
Returns the object on which this action should perform view-fit events.- Returns:
- The object on which this action will fit
- See Also:
-
setView
Sets the view this view fit action should fit on.
- Parameters:
aView
- a view to fit on
-
getView
Gets the view this view fit action fits on
- Returns:
- an ILcdView
-
canPerformFit
Checks whether this view fit action can perform a fit.- Parameters:
aObject
- AnObject
to fit on.aView
- An ILcdView to fit on aObject;- Returns:
- true if a fit action can be performed; false otherwise
-
performFit
Performs the fit action- Parameters:
aObject
- AnObject
to fit on.aView
- An ILcdView to fit on aObject;
-
actionPerformed
Performs the view-fit action on the object set by setObjectToFit(Object), in the view set by setView(ILcdView)- Parameters:
aActionEvent
- The action event associated with this action. Can be null.
-