Class AlignAction

java.lang.Object
javax.swing.AbstractAction
org.jhotdraw.draw.action.AbstractSelectedAction
org.opentcs.thirdparty.jhotdraw.application.action.draw.AlignAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action, org.jhotdraw.app.Disposable
Direct Known Subclasses:
AlignAction.East, AlignAction.Horizontal, AlignAction.North, AlignAction.South, AlignAction.Vertical, AlignAction.West

public abstract class AlignAction
extends org.jhotdraw.draw.action.AbstractSelectedAction
Aligns the selected figures. XXX - Fire edit events
See Also:
Serialized Form
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  AlignAction.East  
    static class  AlignAction.Horizontal  
    static class  AlignAction.North  
    static class  AlignAction.South  
    static class  AlignAction.Vertical  
    static class  AlignAction.West  
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected org.opentcs.thirdparty.jhotdraw.util.ResourceBundleUtil bundle  

    Fields inherited from class javax.swing.AbstractAction

    changeSupport, enabled

    Fields inherited from interface javax.swing.Action

    ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
  • Constructor Summary

    Constructors 
    Constructor Description
    AlignAction​(org.jhotdraw.draw.DrawingEditor editor)
    Creates a new instance.
  • Method Summary

    Modifier and Type Method Description
    void actionPerformed​(java.awt.event.ActionEvent e)  
    protected abstract void alignFigures​(java.util.Collection<?> selectedFigures, java.awt.geom.Rectangle2D.Double selectionBounds)  
    protected java.awt.geom.Rectangle2D.Double getSelectionBounds()
    Returns the bounds of the selected figures.
    protected void updateEnabledState()  

    Methods inherited from class org.jhotdraw.draw.action.AbstractSelectedAction

    dispose, fireUndoableEditHappened, getDrawing, getEditor, getView, isUpdatEnabledState, setEditor, setUpdateEnabledState

    Methods inherited from class javax.swing.AbstractAction

    addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface javax.swing.Action

    accept
  • Field Details

    • bundle

      protected org.opentcs.thirdparty.jhotdraw.util.ResourceBundleUtil bundle
  • Constructor Details

    • AlignAction

      public AlignAction​(org.jhotdraw.draw.DrawingEditor editor)
      Creates a new instance.
      Parameters:
      editor - The drawing editor
  • Method Details

    • updateEnabledState

      protected final void updateEnabledState()
      Overrides:
      updateEnabledState in class org.jhotdraw.draw.action.AbstractSelectedAction
    • actionPerformed

      public void actionPerformed​(java.awt.event.ActionEvent e)
    • alignFigures

      protected abstract void alignFigures​(java.util.Collection<?> selectedFigures, java.awt.geom.Rectangle2D.Double selectionBounds)
    • getSelectionBounds

      protected java.awt.geom.Rectangle2D.Double getSelectionBounds()
      Returns the bounds of the selected figures.
      Returns:
      The bounds of the selected figures.