|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.generic.command.BaseCommand
com.tensegrity.skeleton.commands.CommonBaseCommand
com.tensegrity.skeleton.swt.commands.SwtCommonBaseCommand
com.tensegrity.skeleton.swt.commands.SwtDocumentCommand
com.tensegrity.skeleton.swt.commands.SwtGraphDocumentCommand
This command, to be used within applications in a SWT context, extends the
SwtDocumentCommand in the way
that it is only valid if the active
Document is a instance of
GraphDocument.
Note that instances of SwtGraphDocumentCommand are disabled when no
GraphDocument is selected.
The getGraphDocument() method is provided in order to retrieve the
currently selected GraphDocument.
| Constructor Summary | |
SwtGraphDocumentCommand(ApplicationFrame applicationFrame,
java.lang.String command)
Creates the SwtGraphDocumentCommand. |
|
| Method Summary | |
protected GraphDocument |
getGraphDocument()
Returns the current document as GraphDocument, if it is one, otherwise null. |
VisualGraphView |
getVisualGraphView()
Returns the VisualGraphView of the currently active graph document.
|
boolean |
isEnabled()
Returns false if SwtDocumentCommand.getDocument() returns
null, true otherwise. |
| Methods inherited from class com.tensegrity.skeleton.swt.commands.SwtDocumentCommand |
getDocument |
| Methods inherited from class com.tensegrity.skeleton.swt.commands.SwtCommonBaseCommand |
getGraphApplication, newGraphDocumentFromFactory |
| Methods inherited from class com.tensegrity.skeleton.commands.CommonBaseCommand |
getApplicationFrame, getTitle, perform |
| Methods inherited from class com.tensegrity.generic.command.BaseCommand |
getDescription, getId, getPerformDescription, setEnabled |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SwtGraphDocumentCommand(ApplicationFrame applicationFrame,
java.lang.String command)
SwtGraphDocumentCommand.
applicationFrame - Application context of this command.command - the ID of this command.| Method Detail |
public boolean isEnabled()
SwtDocumentCommandfalse if SwtDocumentCommand.getDocument() returns
null, true otherwise.
isEnabled in interface CommandisEnabled in class SwtDocumentCommandfalse if SwtDocumentCommand.getDocument() returns
null, true otherwise.Command.isEnabled()public VisualGraphView getVisualGraphView()
VisualGraphView of the currently active graph document.
This method returns null either when
DocumentCommand.getDocument() method returns null, or
when the current document is not of type GraphDocument.
VisualGraphView of the current GraphDocument.protected GraphDocument getGraphDocument()
null.
null.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||