|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jfig.commands.Command jfig.commands.OpenCompoundCommand
open a compound object for editing. This command pushes the current FIG drawing onto a stack and substitutes the drawing with the contents of the selected compound object. It also creates a non-modal dialog window that allows the user to close the compound object and resume working on the parent drawing.
Field Summary | |
(package private) FigCompound |
compound
|
(package private) ModularEditor |
editor
|
(package private) ModularEditorState |
state
|
Fields inherited from class jfig.commands.Command |
objectCanvas, ready |
Constructor Summary | |
OpenCompoundCommand(FigBasicEditor _editor,
FigCanvas objectCanvas)
|
Method Summary | |
void |
cancel()
cancel the current editor command |
static void |
closeAllCompounds()
|
static void |
closeOneCompound()
closeOneCompound: add all current editor objects to an compound, restore the editor to its previous state, then add our new compound to the restored editor's object list. |
void |
execute()
execute: the user has selected a FigCompound object to be opened. |
java.lang.String |
getDescription()
one-line description of this command |
FigObject[] |
getModifiedObjects()
return an array-wrapped reference to the compound object (to be) opened by this command. |
boolean |
isReady()
check whether this command is completed/ready, or not |
void |
mousePressed(FigCanvasEvent evt)
react to a mouse click on the editor canvas |
void |
showAllCompounds()
|
java.lang.String |
toString()
return a (possibly verbose) description of this OpenCompoundCommand object |
void |
undo()
undo this command |
Methods inherited from class jfig.commands.Command |
message, notifyEditor, statusMessage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
FigCompound compound
ModularEditor editor
ModularEditorState state
Constructor Detail |
public OpenCompoundCommand(FigBasicEditor _editor, FigCanvas objectCanvas)
Method Detail |
public FigObject[] getModifiedObjects()
getModifiedObjects
in class Command
public void cancel()
Command
cancel and cleanup the current command. Note that this method is empty for class Command, but might be implemented by subclasses.
cancel
in class Command
public void execute()
execute
in class Command
public void undo()
Try to undo this command as far as possible. Don't try to undo() a command that has never been execute()d before. This method is NOT YET IMPLEMENTED for class OpenCompoundCommand.
undo
in class Command
public void mousePressed(FigCanvasEvent evt)
Command
This method provides the central callback from the editor to its current command object. Passing a FigCanvasEvent parameter, the editor provides information both about the screen coordinates and the world coordinates of the mouse event.
Naturally, mouse presses are ignored for class Command.
mousePressed
in class Command
public boolean isReady()
isReady
in class Command
public void showAllCompounds()
public static void closeOneCompound()
public static void closeAllCompounds()
public java.lang.String getDescription()
getDescription
in class Command
public java.lang.String toString()
toString
in class Command
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |