com.tensegrity.skeleton.commands
Class SaveAsCommand

java.lang.Object
  extended bycom.tensegrity.generic.command.BaseCommand
      extended bycom.tensegrity.skeleton.commands.CommonBaseCommand
          extended bycom.tensegrity.skeleton.commands.DocumentCommand
              extended bycom.tensegrity.skeleton.commands.GraphDocumentCommand
                  extended bycom.tensegrity.skeleton.commands.SaveVisualGraphCommand
                      extended bycom.tensegrity.skeleton.commands.SaveAsCommand
All Implemented Interfaces:
Command

public final class SaveAsCommand
extends SaveVisualGraphCommand

Saves the currently active document as a new File.

This class uses a GraphFileChooserDialog to allow users to save the document in a new directory of choice.

Version:
$Id: SaveAsCommand.java,v 1.78 2006/05/12 11:40:50 BurkhardWick Exp $
Author:
Gilles Iachelini

Constructor Summary
SaveAsCommand(ApplicationFrame applicationFrame, java.lang.String command)
          Creates a new SaveAsCommand.
 
Method Summary
protected  GraphFileChooserOption[] buildOptions()
          Returns a map with additional options to be placed to the bottom of the dialog when saving a file.
 boolean isEnabled()
          Overridden to disable save command in applets
 void perform(java.lang.Object args)
          Will show a dialog to set the destination and the format to save the graph to.
 
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

SaveAsCommand

public SaveAsCommand(ApplicationFrame applicationFrame,
                     java.lang.String command)
Creates a new SaveAsCommand.

Parameters:
applicationFrame - Application context for this command.
command - the ID of this command.
Method Detail

isEnabled

public boolean isEnabled()
Overridden to disable save command in applets

Specified by:
isEnabled in interface Command
Overrides:
isEnabled in class SaveVisualGraphCommand
Returns:
false, if the command was disabled or the application is an applet

perform

public void perform(java.lang.Object args)
Will show a dialog to set the destination and the format to save the graph to.

Specified by:
perform in interface Command
Overrides:
perform in class CommonBaseCommand
Parameters:
args - Ignored
See Also:
Command.perform(java.lang.Object)

buildOptions

protected GraphFileChooserOption[] buildOptions()
Returns a map with additional options to be placed to the bottom of the dialog when saving a file.

Returns:
a Map filled with id-text-pairs to represent checkbox'ed options in the filedialog.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.