|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.util.Observable
|
+--mvp.Model
|
+--jdraw.edit.Edit
Class Edit is the Model class for editing options: Undo, Redo, Cut, Copy, Paste, Duplicate, Delete, SelectAll, Flip Horizontal, Flip Vertical, Rotate 90 degrees Clockwise, Rotate 90 degrees Counter-Clockwise, Precise Move, Precise Scale, Precise Rotate.
| Field Summary | |
protected static java.util.Vector |
graphicsBuffer
A Vector in which to store graphics temporarily. |
protected static JDraw |
jdraw
A local reference to the top-level JDraw object. |
| Fields inherited from class mvp.Model |
view |
| Constructor Summary | |
Edit(mvp.View view,
JDraw jdraw)
Construct this with the given View object. |
|
| Method Summary | |
static void |
copy()
Copy the selected graphic(s) into the buffer. |
static void |
cut()
Cut the selected graphic(s) into the buffer, removing it/them from the picture. |
static void |
delete()
Remove the selected graphic(s) from the Canvas. |
static void |
duplicate()
Create a copy of the selected graphic(s) and paste it/them onto the active Canvas. |
static void |
flipHorizontal()
Flip the active picture Horizontally. |
static void |
flipVertical()
Flip the currently selected graphics on the Active Canvas Vertically. |
static java.awt.Rectangle |
getBoundingRectangle(java.util.Vector graphics,
java.util.Vector selectedIndices)
Returns the smallest Rectangle which contains all selected graphics. |
static void |
paste()
Paste the buffered graphic(s) onto the active Canvas. |
static void |
preciseMove(int deltaX,
int deltaY)
Bring up a dialog to select move parameters. |
static void |
preciseRotate(int deltaDegrees)
Bring up a dialog to select rotate parameters. |
static void |
preciseScale()
Bring up a dialog to select scale parameters. |
static void |
redo()
Redo the last undone action. |
static void |
redrawActiveCanvasWindow()
Calls the redrawPage method of the currently active CanvasWindow. |
static void |
rotateClockwise()
Rotate the active picture 90 degrees Clockwise. |
static void |
rotateCounter()
Rotate the active picture 90 degress counter-clockwise. |
static void |
saveActiveWindowState()
Saves the state of the Active Canvas. |
static void |
selectAll()
Set all graphics in the current Canvas as Selected. |
static void |
undo()
Undo last action. |
| 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 |
protected static JDraw jdraw
protected static java.util.Vector graphicsBuffer
| Constructor Detail |
public Edit(mvp.View view,
JDraw jdraw)
view - - The View object to be passed to parent constructor.| Method Detail |
public static void undo()
public static void redo()
public static void cut()
public static void copy()
public static void paste()
public static void duplicate()
public static void delete()
public static void selectAll()
public static void flipHorizontal()
public static void flipVertical()
public static void rotateClockwise()
public static void rotateCounter()
public static void preciseMove(int deltaX,
int deltaY)
public static void preciseScale()
public static void preciseRotate(int deltaDegrees)
public static void redrawActiveCanvasWindow()
public static void saveActiveWindowState()
public static java.awt.Rectangle getBoundingRectangle(java.util.Vector graphics,
java.util.Vector selectedIndices)
graphics - - The Vector containing all the graphic objects.selectedIndices - - The Vector containing the indices of all selected
graphics.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||