jdraw.align
Class Align

java.lang.Object
  |
  +--java.util.Observable
        |
        +--mvp.Model
              |
              +--jdraw.align.Align
All Implemented Interfaces:
java.io.Serializable

public class Align
extends mvp.Model

Class Align is the Model class for graphic and group alignment operations such as ...

See Also:
Serialized Form

Field Summary
protected  JDraw jdraw
          A local reference to the top-level JDraw object.
 
Fields inherited from class mvp.Model
view
 
Constructor Summary
Align(mvp.View view, JDraw jdraw)
          Construct this with the given View object.
 
Method Summary
 void alignBottoms()
          Align the bottom edges of the selected group(s), graphic(s).
 void alignBottomToTop()
          Align the selected group(s), graphic(s) Botttom Edge to Top Edge.
 void alignCenters()
          Align the centers of the selected group(s), graphic(s).
 void alignHorizontalCenters()
          Align the horizontal centers of the selected group(s), graphic(s).
 void alignLeftSides()
          Align the left sides of the selected group(s), graphic(s).
 void alignLeftToRight()
          Align the selected group(s), graphic(s) Left Edge to Right Edge.
 void alignRightSides()
          Align the right sides of the selected group(s), graphic(s).
 void alignRightToLeft()
          Align the selected group(s), graphic(s) Right Edge to Left Edge.
static void alignToGrid()
          Align the selected group(s), graphic(s) to the current grid.
 void alignTops()
          Align the top edges of the selected group(s), graphic(s).
 void alignTopToBottom()
          Align the selected group(s), graphic(s) Top Edge to Bottom Edge.
 void alignVerticalCenters()
          Align the vertical centers of the selected group(s), graphic(s).
 java.awt.Rectangle getBoundingRectangle(java.util.Vector graphics, java.util.Vector selectedIndices)
           
 void redrawActiveCanvasWindow()
          Calls the redrawPage method of the currently active CanvasWindow.
 void saveActiveWindowState()
          Saves the state of the Active Canvas.
 
Methods inherited from class mvp.Model
getView, setView
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jdraw

protected JDraw jdraw
A local reference to the top-level JDraw object.
Constructor Detail

Align

public Align(mvp.View view,
             JDraw jdraw)
Construct this with the given View object.
Parameters:
view - - The View object to be passed to the parent constructor.
jdraw - - The JDraw object to the set as this.jdraw.
Method Detail

alignLeftSides

public void alignLeftSides()
Align the left sides of the selected group(s), graphic(s).

alignRightSides

public void alignRightSides()
Align the right sides of the selected group(s), graphic(s).

alignBottoms

public void alignBottoms()
Align the bottom edges of the selected group(s), graphic(s).

alignTops

public void alignTops()
Align the top edges of the selected group(s), graphic(s).

alignVerticalCenters

public void alignVerticalCenters()
Align the vertical centers of the selected group(s), graphic(s).

alignHorizontalCenters

public void alignHorizontalCenters()
Align the horizontal centers of the selected group(s), graphic(s).

alignCenters

public void alignCenters()
Align the centers of the selected group(s), graphic(s).

alignLeftToRight

public void alignLeftToRight()
Align the selected group(s), graphic(s) Left Edge to Right Edge.

alignRightToLeft

public void alignRightToLeft()
Align the selected group(s), graphic(s) Right Edge to Left Edge.

alignBottomToTop

public void alignBottomToTop()
Align the selected group(s), graphic(s) Botttom Edge to Top Edge.

alignTopToBottom

public void alignTopToBottom()
Align the selected group(s), graphic(s) Top Edge to Bottom Edge.

redrawActiveCanvasWindow

public void redrawActiveCanvasWindow()
Calls the redrawPage method of the currently active CanvasWindow.

saveActiveWindowState

public void saveActiveWindowState()
Saves the state of the Active Canvas.

alignToGrid

public static void alignToGrid()
Align the selected group(s), graphic(s) to the current grid. (Top and Left Edges).

getBoundingRectangle

public java.awt.Rectangle getBoundingRectangle(java.util.Vector graphics,
                                               java.util.Vector selectedIndices)