|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.data.DataObject
ewe.data.LiveObject
ewe.data.SaveableObject
| Field Summary | |
MenuItem |
chosenMenuItem
|
static int |
ExitAction
|
static int |
NewAction
|
static int |
OpenAction
|
static int |
SaveAction
|
| Constructor Summary | |
SaveableObject()
|
|
| Method Summary | |
void |
Exit_action(Editor ed)
|
protected void |
fileExceptionOccured(int whichFileAction,
Exception e,
FileSaver saver)
This will be called if an exception occured during processing of a File action. |
void |
New_action(Editor ed)
|
void |
newObject()
This is used to reset the Object to a "new" state. |
void |
Open_action(Editor ed)
|
protected void |
openedFrom(File opened)
This is called after a successful open. |
void |
openObject(File source)
This is used to retrieve the Object state from a File. |
void |
Save_action(Editor ed)
|
void |
Save_As_action(Editor ed)
|
protected void |
savedTo(File saved)
This is called after a successful save. |
void |
saveObject(File destination)
This is used to save the Object state. |
boolean |
tryOpen(Object source,
Editor ed)
This attempts to open a file to load this object. |
boolean |
tryOpen(Object source,
Editor ed,
boolean showOpenIfFailed,
boolean showException)
This attempts to open a file to load this object. |
| Methods inherited from class ewe.data.LiveObject |
action, action, addMeToPanel, addObjectToPanel, addToPanel, decode, decoded, decodeFields, enableEditorScrolling, encode, encoded, encodeFields, fieldChanged, fieldChanged, fieldEvent, getEditor, getEditorScroller, getIcon, getName, input, makeNewEditor, runAsApp, textDecode, textEncode |
| Methods inherited from class ewe.data.DataObject |
_getSetField, appendAllFields, compareTo, copied, copyFrom, equals, getCopy, getDeclaredField, getDeclaredFieldValue, getDeclaredFieldValue, getFieldList, getFieldList, getMyFieldList, getNew |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, toString |
| Methods inherited from interface ewe.data.DataUnit |
copyFrom, getNew |
| Methods inherited from interface ewe.util.Copyable |
getCopy |
| Methods inherited from interface ewe.util.Comparable |
compareTo |
| Field Detail |
public MenuItem chosenMenuItem
public static final int NewAction
public static final int OpenAction
public static final int SaveAction
public static final int ExitAction
| Constructor Detail |
public SaveableObject()
| Method Detail |
public void newObject()
public void saveObject(File destination)
throws IOException
IOException
public void openObject(File source)
throws IOException
IOException
protected void fileExceptionOccured(int whichFileAction,
Exception e,
FileSaver saver)
whichFileAction - one of NewAction, OpenAction, SaveAction.e - The exception that occured.public void New_action(Editor ed)
public void Save_action(Editor ed)
public void Save_As_action(Editor ed)
public void Open_action(Editor ed)
public void Exit_action(Editor ed)
protected void savedTo(File saved)
saved - The File the object was saved to.protected void openedFrom(File opened)
public boolean tryOpen(Object source,
Editor ed,
boolean showOpenIfFailed,
boolean showException)
source - The File object or file name String.ed - The editor used to edit the SaveableObject.showOpenIfFailed - If this is true then the FileSaver associated with the editor (if any)
will be displayed to attempt to open a new File instead.showException - If this is true then the full file open error will be displayed if an
error occured opening the file.
public boolean tryOpen(Object source,
Editor ed)
source - The File object or file name String.ed - The editor used to edit the SaveableObject.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||