Class TLcdFitGXYLayerInViewClipAction

java.lang.Object
com.luciad.gui.ALcdAction
com.luciad.view.gxy.TLcdFitGXYLayerInViewClipAction
All Implemented Interfaces:
ILcdAction, ILcdPropertyChangeSource, ActionListener, Serializable, EventListener

public class TLcdFitGXYLayerInViewClipAction extends ALcdAction implements ILcdAction
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:
  • Constructor Details

    • TLcdFitGXYLayerInViewClipAction

      public TLcdFitGXYLayerInViewClipAction()
  • Method Details

    • setGXYLayer

      public void setGXYLayer(ILcdGXYLayer aGXYLayer)
    • getGXYLayer

      public ILcdGXYLayer getGXYLayer()
    • setGXYView

      public void setGXYView(ILcdGXYView aGXYView)
    • getGXYView

      public ILcdGXYView getGXYView()
    • setBounds

      public void setBounds(ILcdBounds aBounds)
      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

      public ILcdBounds 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

      public void actionPerformed(ActionEvent e)
      Performs the ILcdAction. Calls the static method doFit with its 3 properties.
      Specified by:
      actionPerformed in interface ActionListener
    • doFit

      public static void doFit(ILcdGXYLayer aGXYLayer, ILcdGXYView aGXYView, ILcdBounds aBounds)
      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. 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.