|
|||||||||||
| 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.commands.DocumentCommand
com.tensegrity.skeleton.commands.GraphDocumentCommand
com.tensegrity.skeleton.commands.SaveVisualGraphCommand
com.tensegrity.skeleton.swt.commands.SwtSaveAsCommand
This command, to be used within applications in a SWT context, brings up a
SwtGraphFileChooserDialog
asking the user where he wants to save a copy of the currently active
GraphDocument.
| Constructor Summary | |
SwtSaveAsCommand(ApplicationFrame applicationFrame,
java.lang.String command)
Creates a new SwtSaveAsCommand. |
|
| Method Summary | |
protected void |
doSave(ExportSettings expSettings,
int type,
org.eclipse.swt.graphics.Image image,
SwtGraphPanel sgp,
GraphDocument gDoc,
java.io.File file)
This routines performs the saving of the passed document or image depending on type.
|
GraphDocument |
getDocumentToSaveAs()
Returns the GraphDocument which has to be saved as ... |
protected GraphFileChooser |
getFileChooser(org.eclipse.swt.widgets.Shell parent)
Returns the file chooser which should be used for the save as dialog. |
java.lang.String |
getNewName()
Return the new name for the copy |
void |
perform(java.lang.Object args)
Will show a dialog to set the destination and the format to save the graph to. |
protected void |
postPerform(int type,
GraphDocument docToSaveAs,
GraphDocument copy)
This method gives a chance to subclasses to perform extra actions once the command is performed |
void |
setNewName(java.lang.String newName)
Stores the new name for the copy |
| Methods inherited from class com.tensegrity.skeleton.commands.SaveVisualGraphCommand |
isEnabled |
| Methods inherited from class com.tensegrity.skeleton.commands.GraphDocumentCommand |
getGraphDocument, getVisualGraphView |
| Methods inherited from class com.tensegrity.skeleton.commands.DocumentCommand |
getDocument, getGraphApplication, newGraphDocumentFromFactory |
| Methods inherited from class com.tensegrity.skeleton.commands.CommonBaseCommand |
getApplicationFrame, getTitle |
| 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 SwtSaveAsCommand(ApplicationFrame applicationFrame,
java.lang.String command)
SwtSaveAsCommand.
applicationFrame - Application context for this command.command - the ID of this command.| Method Detail |
public void perform(java.lang.Object args)
perform in interface Commandperform in class CommonBaseCommandargs - IgnoredCommand.perform(java.lang.Object)
protected void postPerform(int type,
GraphDocument docToSaveAs,
GraphDocument copy)
This method gives a chance to subclasses to perform extra actions once the command is performed
type - the type of the copydocToSaveAs - the initial graph documentcopy - the new graph document
protected void doSave(ExportSettings expSettings,
int type,
org.eclipse.swt.graphics.Image image,
SwtGraphPanel sgp,
GraphDocument gDoc,
java.io.File file)
This routines performs the saving of the passed document or image
depending on type.
expSettings - these are the export settings for the new image.type - one of:
GraphFileConstants.TYPE_GRAPHFILE
GraphFileConstants.TYPE_RASTER_BITMAP
GraphFileConstants.TYPE_RASTER_GIF
GraphFileConstants.TYPE_RASTER_JPEG
GraphFileConstants.TYPE_RASTER_PNG
image - the image to save. Can be null if type is
GraphFileConstants.TYPE_RASTER_BITMAP.sgp - the SwtGraphPanelgDoc - the GraphDocumentfile - the File to save.public java.lang.String getNewName()
Return the new name for the copy
public void setNewName(java.lang.String newName)
Stores the new name for the copy
newName - the new name for the copypublic GraphDocument getDocumentToSaveAs()
Returns the GraphDocument which has to be saved as ...
protected GraphFileChooser getFileChooser(org.eclipse.swt.widgets.Shell parent)
parent -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||