public abstract class ALcdKML22ViewFitAction extends ALcdAction
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.
changeSupport
DEFAULT, LONG_DESCRIPTION, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SHOW_ACTION_NAME, SMALL_ICON, VISIBLE
Constructor and Description |
---|
ALcdKML22ViewFitAction(ILcdView aView,
String aName)
Creates a new instance of this abstract fit action with a given name.
|
Modifier and Type | Method and Description |
---|---|
abstract 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.
|
Object |
getObjectToFit()
Returns the object on which this action should perform view-fit events.
|
ILcdView |
getView()
Gets the view this view fit action fits on
|
abstract void |
performFit(Object aObject,
ILcdView aView)
Performs the fit action
|
void |
setObjectToFit(Object aObjectToFit)
Sets the object this view-fit action should fit on.
|
void |
setView(ILcdView aView)
Sets the view this view fit action should fit on.
|
addPropertyChangeListener, firePropertyChange, getDisplayName, getIcon, getLongDescription, getName, getShortDescription, getValue, isEnabled, isTraceOn, putValue, registerInstance, removePropertyChangeListener, setClassTraceOn, setDisplayName, setEnabled, setIcon, setLongDescription, setName, setShortDescription, setTraceOn
public void setObjectToFit(Object aObjectToFit)
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
aObjectToFit
- An object on which this action should fitactionPerformed(java.awt.event.ActionEvent)
public Object getObjectToFit()
setObjectToFit(Object)
public void setView(ILcdView aView)
Sets the view this view fit action should fit on.
aView
- a view to fit onpublic abstract boolean canPerformFit(Object aObject, ILcdView aView)
aObject
- An Object
to fit on.aView
- An ILcdView to fit on aObject;public abstract void performFit(Object aObject, ILcdView aView)
aObject
- An Object
to fit on.aView
- An ILcdView to fit on aObject;public abstract void actionPerformed(ActionEvent aActionEvent)
aActionEvent
- The action event associated with this action. Can be null.