Package com.luciad.view.gxy
Class TLcdFitGXYLayerInViewClipAction
java.lang.Object
com.luciad.gui.ALcdAction
com.luciad.view.gxy.TLcdFitGXYLayerInViewClipAction
- All Implemented Interfaces:
ILcdAction
,ILcdPropertyChangeSource
,ActionListener
,Serializable
,EventListener
When triggered this
ILcdAction
changes the
origin and scale of a given ILcdGXYView
to
either fit to the model bounds set or, in case the bounds set is null to fit to
the combined bounds of all the objects contained in the layer set.
It is similar to TLcdGXYViewFitAction.fitGXYLayer(ILcdGXYLayer, ILcdGXYView)
but allows
fitting on the given model bounds.- 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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Performs theILcdAction
.static void
doFit
(ILcdGXYLayer aGXYLayer, ILcdGXYView aGXYView, ILcdBounds aBounds) Changes the origin and scale of a givenILcdGXYView
to either fit to the model bounds set or, in case the bounds set is null to fit to the combined bounds of all the objects contained in the layer set.Gets the model bounds to fit in.void
setBounds
(ILcdBounds aBounds) Sets the bounds to fit in.void
setGXYLayer
(ILcdGXYLayer aGXYLayer) void
setGXYView
(ILcdGXYView aGXYView) 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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.luciad.gui.ILcdAction
getValue, isEnabled, putValue, setEnabled
Methods inherited from interface com.luciad.util.ILcdPropertyChangeSource
addPropertyChangeListener, removePropertyChangeListener
-
Constructor Details
-
TLcdFitGXYLayerInViewClipAction
public TLcdFitGXYLayerInViewClipAction()
-
-
Method Details
-
setGXYLayer
-
getGXYLayer
-
setGXYView
-
getGXYView
-
setBounds
Sets the bounds to fit in.aBounds
will interpreted as a 2D bounds (i.e. the depth will not be taken into account) expressed in the model reference of the layer set to this action.- Parameters:
aBounds
- the bounds to fit to, expressed in the model reference of the layer set to this action..
-
getBounds
Gets the model bounds to fit in. This view bounds will interpreted as 2D bounds (i.e. the depth will not be taken into account) expressed in the model reference of the layer set to this action.- Returns:
- the bounds to fit to, expressed in the model reference of the layer set to this action..
-
actionPerformed
Performs theILcdAction
. Calls the static method doFit with its 3 properties.- Specified by:
actionPerformed
in interfaceActionListener
-
doFit
Changes the origin and scale of a givenILcdGXYView
to either fit to the model bounds set or, in case the bounds set is null to fit to the combined bounds of all the objects contained in the layer set.aBounds
is interpreted as a 2D bounds (i.e. the depth is not taken into account).- Parameters:
aGXYLayer
- the layer to fit to, if the bounds passed are null.aGXYView
- the view to change the center point and scale of.aBounds
- the bounds to fit to, expressed in the reference of the layer passed.
-