public class TLspKML22ViewFitAction extends ALcdKML22ViewFitAction
A view fit action for KML features in a ILspView
.
This action allows you to fit an ILspView view onto
a KML element. The action takes into consideration the TLcdKML22AbstractView element
of the given object. If the object does not have such an element (or if the ILspView
is 2D), it will fit onto the
bounds of the feature.
changeSupport
DEFAULT, LONG_DESCRIPTION, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SHOW_ACTION_NAME, SMALL_ICON, VISIBLE
Constructor and Description |
---|
TLspKML22ViewFitAction()
Creates a camera change action without a view attached.
|
TLspKML22ViewFitAction(ILspView aView)
Creates a camera change action for a given view.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent aActionEvent)
Performs the view-fit action on the object set by ALcdKML22ViewFitAction.setObjectToFit(Object)
|
boolean |
canPerformFit(Object aObject,
ILcdView aView)
Checks whether this view fit action can perform a fit.
|
void |
performFit(Object aObject,
ILcdView aView)
Performs the fit action
|
getObjectToFit, getView, setObjectToFit, setView
addPropertyChangeListener, firePropertyChange, getDisplayName, getIcon, getLongDescription, getName, getShortDescription, getValue, isEnabled, isTraceOn, putValue, registerInstance, removePropertyChangeListener, setClassTraceOn, setDisplayName, setEnabled, setIcon, setLongDescription, setName, setShortDescription, setTraceOn
public TLspKML22ViewFitAction()
public TLspKML22ViewFitAction(ILspView aView)
Creates a camera change action for a given view.
By default, the height provider from the view is used.
aView
- The view for which this camera change action must function.public boolean canPerformFit(Object aObject, ILcdView aView)
ALcdKML22ViewFitAction
canPerformFit
in class ALcdKML22ViewFitAction
aObject
- An Object
to fit on.aView
- An ILcdView to fit on aObject;public void performFit(Object aObject, ILcdView aView)
ALcdKML22ViewFitAction
performFit
in class ALcdKML22ViewFitAction
aObject
- An Object
to fit on.aView
- An ILcdView to fit on aObject;public void actionPerformed(ActionEvent aActionEvent)
actionPerformed
in interface ActionListener
actionPerformed
in class ALcdKML22ViewFitAction
aActionEvent
- The action event associated with this action. Can be null.