com.jgraph
Class JGraphpadDemo.JGraphpadDemoFileAction
java.lang.Object
javax.swing.AbstractAction
com.jgraph.editor.JGraphEditorAction
com.jgraph.pad.action.JGraphpadFileAction
com.jgraph.JGraphpadDemo.JGraphpadDemoFileAction
- All Implemented Interfaces:
- Action, ActionListener, Cloneable, EventListener, Serializable
- Enclosing class:
- JGraphpadDemo
- public static class JGraphpadDemo.JGraphpadDemoFileAction
- extends JGraphpadFileAction
Replaces file open / save action with different actions.
- See Also:
- Serialized Form
| Fields inherited from class com.jgraph.pad.action.JGraphpadFileAction |
dlgs, editor, KEY_EDGEPROTOTYPE, KEY_MAINWINDOW, KEY_RECENTFILES, KEY_VERTEXPROTOTYPE, lastDirectory, MAX_RECENTFILES, MIME_HTML, MIME_PLAINTEXT, NAME_CLOSE, NAME_CLOSEALL, NAME_DOWNLOAD, NAME_EXIT, NAME_IMPORTCSV, NAME_NEWDIAGRAM, NAME_NEWDOCUMENT, NAME_NEWLIBRARY, NAME_OPEN, NAME_PAGESETUP, NAME_PRINT, NAME_REMOVEDIAGRAM, NAME_RENAMEDIAGRAM, NAME_SAVE, NAME_SAVEALL, NAME_SAVEAS, NAME_SAVEIMAGE, NAME_UPLOADAS |
|
Method Summary |
protected void |
doOpenFile(String filename)
Replaces the saveFile action with an error message. |
void |
doSave(String filename,
byte[] data)
Replaces the open action with an error message. |
protected void |
doSaveFile(JGraphEditorFile file,
boolean forceFilenameDialog,
boolean urlDialog)
Replaces the saveFile action with an error message. |
| Methods inherited from class com.jgraph.pad.action.JGraphpadFileAction |
actionPerformed, convert, doCloseAll, doCloseFile, doExit, doImportCSV, doNewDiagram, doNewDocument, doNewLibrary, doOpenFile, doPageSetup, doPrintDiagramPane, doRemoveDiagram, doRenameDiagram, doSaveAll, doSaveImage, getCellForKey, getFileCount, getFileCount, getPermanentFocusOwnerFile, getPermanentFocusOwnerLibraryPane, importCSVFile, isLibrary, makeMimeForm, post, post, postPlain |
| Methods inherited from class com.jgraph.editor.JGraphEditorAction |
getActiveFrame, getFrame, getJGraphpadPane, getJGraphpadPane, getName, getParentGraph, getPermanentFocusOwner, getPermanentFocusOwnerDiagram, getPermanentFocusOwnerDiagramPane, getPermanentFocusOwnerGraph, getPermanentFocusOwnerOrParent, getString, isSelected, isToggleAction, isVisible, setEnabled, setSelected, setToggleAction, setVisible |
JGraphpadDemo.JGraphpadDemoFileAction
public JGraphpadDemo.JGraphpadDemoFileAction(String name,
JGraphEditor editor)
- Parameters:
name - editor -
doSaveFile
protected void doSaveFile(JGraphEditorFile file,
boolean forceFilenameDialog,
boolean urlDialog)
throws IOException
- Replaces the saveFile action with an error message.
- Overrides:
doSaveFile in class JGraphpadFileAction
- Parameters:
file - The file to be saved.forceFilenameDialog - Whether to display a dialog regardless of the filename.urlDialog - Whether to display an URL dialog to specifiy the filename.
- Throws:
IOException - If the file cannot be saved.- See Also:
JGraphEditorModel.getOutputStream(String),
JGraphpadFileAction.postPlain(URL, String, OutputStream)
doSave
public void doSave(String filename,
byte[] data)
throws Exception
- Replaces the open action with an error message.
- Overrides:
doSave in class JGraphpadFileAction
- Parameters:
filename - The filename of the file to be written.data - The array of bytes to write to the file.
- Throws:
Exception
doOpenFile
protected void doOpenFile(String filename)
throws MalformedURLException,
IOException
- Replaces the saveFile action with an error message.
- Throws:
MalformedURLException
IOException
Copyright (C) 2005 JGraph.com. All rights reserved.