|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jfig.commands.Command jfig.commands.CutToClipboardCommand
cut jfig objects to the system clipboard.
CutToClipboardCommand allows the user to copy single or multiple jfig objects to the system clipboard, which are then deleted from the current drawing. To allow for data-exchange with other applications (like xfig and text editors), the objects are written to the clipboard as text data in FIG file format.
The command first collects all objects clicked on (at/near the mouse position), until the user uses a right-click to finish and execute the command.
PasteFromClipboardCommand
Field Summary | |
protected FigCompound |
compound
|
protected boolean |
hasUnfinishedRegion
|
protected java.awt.Point |
P1
|
protected java.awt.Point |
P2
|
Fields inherited from class jfig.commands.Command |
editor, objectCanvas, ready |
Constructor Summary | |
CutToClipboardCommand(FigBasicEditor editor,
FigCanvas objectCanvas)
|
Method Summary | |
void |
execute()
execute the current editor command |
java.lang.String |
getDescription()
one-line description of this command |
FigObject[] |
getModifiedObjects()
return an array-wrapped reference to the compound object which has been (or will be) deleted and transferred to the clipboard. |
void |
mousePressed(FigCanvasEvent evt)
mousePressed: select the objects to copy to the system clipboard |
java.lang.String |
toString()
return a (possibly verbose) description of this Command object |
void |
undo()
undo: instead of providing a direct undo, please use a 'paste from clipboard' command. |
Methods inherited from class jfig.commands.Command |
cancel, isReady, message, notifyEditor, statusMessage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected FigCompound compound
protected java.awt.Point P1
protected java.awt.Point P2
protected boolean hasUnfinishedRegion
Constructor Detail |
public CutToClipboardCommand(FigBasicEditor editor, FigCanvas objectCanvas)
Method Detail |
public FigObject[] getModifiedObjects()
getModifiedObjects
in class Command
public void execute()
Command
This method is empty for class Command.
execute
in class Command
public void undo()
undo
in class Command
PasteFromClipboardCommand
public void mousePressed(FigCanvasEvent evt)
We first collect all objects clicked on (at/near the mouse position), until the user uses a right-click ("meta"+click or "shift+click) to finish and execute the command.
mousePressed
in class Command
public java.lang.String getDescription()
Command
return a one-line desription of this command, e.g. to label the undo/redo buttons, if any
getDescription
in class Command
public java.lang.String toString()
Command
toString
in class Command
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |