com.partnersoft.workbench.model
Class AbstractWorkbenchFileEditor

java.lang.Object
  extended by com.partnersoft.workbench.model.AbstractWorkbenchFileEditor
All Implemented Interfaces:
WorkbenchEditor, WorkbenchFileEditor
Direct Known Subclasses:
AbstractHtmlPanelFileEditor, AbstractWorkbenchMapSetFileEditor, BinaryFileEditor, BoxcarFileEditor, CogFormEditor, DatabaseFileEditor, GenericFileEditor, HtmlFileEditor, ImageFileEditor, LogFileEditor, SoundFileEditor, SphericalImageFileEditor, TableEditor, TextFileEditor, ZipFileEditor

public abstract class AbstractWorkbenchFileEditor
extends java.lang.Object
implements WorkbenchFileEditor


Field Summary
protected  ActionBureau actionBureau
           
protected  VfsFile file
           
protected  javax.swing.JComponent gui
           
protected  java.lang.String name
           
protected  WorkbenchApp workbench
           
 
Constructor Summary
AbstractWorkbenchFileEditor()
           
 
Method Summary
 void doAction(java.lang.String actionName)
           
 void doAction(java.lang.String actionName, java.lang.String... args)
          Perform an action with optional arguments.
 VfsFile getFile()
           
 javax.swing.JComponent getGui()
           
 java.lang.String getName()
           
 WorkbenchApp getWorkbench()
           
 Cog loadCog()
          Loads a cog from the current file; assumes it is Cog XML format.
 java.lang.Object loadObject()
          Loads an object from the current file; assumes it is Cog XML format.
 void saveCog(Cog wotnot)
          Saves a cog to the current file, assumes Cog XML format.
 void saveObject(java.lang.Object wotnot)
          Saves an object to the current file, assumes Cog XML format.
 void setFile(VfsFile newFile)
           
 void setWorkbench(WorkbenchApp workbench)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.partnersoft.workbench.model.WorkbenchFileEditor
setLine
 
Methods inherited from interface com.partnersoft.workbench.model.WorkbenchEditor
load, save
 

Field Detail

workbench

protected WorkbenchApp workbench

name

protected java.lang.String name

file

protected VfsFile file

gui

protected javax.swing.JComponent gui

actionBureau

protected ActionBureau actionBureau
Constructor Detail

AbstractWorkbenchFileEditor

public AbstractWorkbenchFileEditor()
Method Detail

getFile

public VfsFile getFile()
Specified by:
getFile in interface WorkbenchFileEditor

getGui

public javax.swing.JComponent getGui()
Specified by:
getGui in interface WorkbenchEditor

getName

public java.lang.String getName()
Specified by:
getName in interface WorkbenchEditor

setFile

public void setFile(VfsFile newFile)
Specified by:
setFile in interface WorkbenchFileEditor

getWorkbench

public WorkbenchApp getWorkbench()
Specified by:
getWorkbench in interface WorkbenchEditor

setWorkbench

public void setWorkbench(WorkbenchApp workbench)
Specified by:
setWorkbench in interface WorkbenchEditor

doAction

public void doAction(java.lang.String actionName)
Specified by:
doAction in interface WorkbenchEditor

doAction

public void doAction(java.lang.String actionName,
                     java.lang.String... args)
Description copied from interface: WorkbenchEditor
Perform an action with optional arguments. The first argument is the name of the action.

Specified by:
doAction in interface WorkbenchEditor

loadObject

public java.lang.Object loadObject()
                            throws java.io.IOException
Loads an object from the current file; assumes it is Cog XML format.

Returns:
Throws:
java.io.IOException

saveObject

public void saveObject(java.lang.Object wotnot)
                throws java.io.IOException
Saves an object to the current file, assumes Cog XML format.

Throws:
java.io.IOException

loadCog

public Cog loadCog()
            throws java.io.IOException
Loads a cog from the current file; assumes it is Cog XML format.

Returns:
Throws:
java.io.IOException

saveCog

public void saveCog(Cog wotnot)
             throws java.io.IOException
Saves a cog to the current file, assumes Cog XML format.

Throws:
java.io.IOException