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 classAlignAction.Eaststatic classAlignAction.Horizontalstatic classAlignAction.Northstatic classAlignAction.Southstatic classAlignAction.Verticalstatic classAlignAction.West -
Field Summary
Fields Modifier and Type Field Description protected org.opentcs.thirdparty.jhotdraw.util.ResourceBundleUtilbundle -
Constructor Summary
Constructors Constructor Description AlignAction(org.jhotdraw.draw.DrawingEditor editor)Creates a new instance. -
Method Summary
Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent e)protected abstract voidalignFigures(java.util.Collection<?> selectedFigures, java.awt.geom.Rectangle2D.Double selectionBounds)protected java.awt.geom.Rectangle2D.DoublegetSelectionBounds()Returns the bounds of the selected figures.protected voidupdateEnabledState()Methods inherited from class org.jhotdraw.draw.action.AbstractSelectedAction
dispose, fireUndoableEditHappened, getDrawing, getEditor, getView, isUpdatEnabledState, setEditor, setUpdateEnabledStateMethods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
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:
updateEnabledStatein classorg.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.
-