org.jhotdraw.draw.action
Class AlignAction
java.lang.Object
  
javax.swing.AbstractAction
      
org.jhotdraw.draw.action.AbstractSelectedAction
          
org.jhotdraw.draw.action.AlignAction
- All Implemented Interfaces: 
 - java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
 
- Direct Known Subclasses: 
 - AlignAction.East, AlignAction.Horizontal, AlignAction.North, AlignAction.South, AlignAction.Vertical, AlignAction.West
 
public abstract class AlignAction
- extends AbstractSelectedAction
 
Aligns the selected figures.
 XXX - Fire edit events
- Version:
 
  - 2.1 2008-02-27 Only align figures which are transformable. 
 
2.0 2006-01-15 Changed to support double precision coordinates.
 
1.0 17. March 2004  Created. 
- Author:
 
  - Werner Randelshofer
 
- See Also:
 - Serialized Form
 
 
 
 
| Fields inherited from class javax.swing.AbstractAction | 
changeSupport, enabled | 
 
| Fields inherited from interface javax.swing.Action | 
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON | 
 
 
| 
Method Summary | 
 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. | 
 void | 
updateEnabledState()
 
            | 
 
 
| 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 | 
 
AlignAction
public AlignAction(DrawingEditor editor)
- Creates a new instance.
 
updateEnabledState
public void updateEnabledState()
- Overrides:
 updateEnabledState in class 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.