|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.codex.CodexEditManager
public class CodexEditManager
Controls the undo stack. However, the most important thing this class does is periodically flush edited CodexResources to disk. It saves every edited CodexResource every ten seconds. Call initialize() to kick off the saver thread.
| Method Summary | |
|---|---|
void |
addCodexUndoListener(CodexUndoListener listener)
|
void |
addListDataListener(javax.swing.event.ListDataListener listener)
|
void |
applyResourceEdit(CodexResourceEdit edit)
Adds it to the undo stack and applies it. |
void |
applyStructuralEdit(CodexStructuralEdit edit)
Adds it to the undo stack and applies it. |
boolean |
canRedo()
|
boolean |
canUndo()
|
void |
flush()
|
int |
getEditIndex(CodexEdit edit)
|
java.util.ArrayList<CodexEdit> |
getEdits()
Please don't modify the array! |
protected java.io.File |
getGraveyard()
|
int |
getLastSave()
The index of the last edit that was saved. |
int |
getLastUndo()
The index of the last edit that was undone. |
void |
redo()
|
void |
removeCodexUndoListener(CodexUndoListener listener)
|
void |
removeListDataListener(javax.swing.event.ListDataListener listener)
|
static CodexEditManager |
singleton()
|
void |
startSaverThread()
|
void |
stopSaverThread()
|
void |
undo()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static CodexEditManager singleton()
protected java.io.File getGraveyard()
public void addCodexUndoListener(CodexUndoListener listener)
public void addListDataListener(javax.swing.event.ListDataListener listener)
public void applyResourceEdit(CodexResourceEdit edit)
edit - public void applyStructuralEdit(CodexStructuralEdit edit)
edit - public boolean canRedo()
public boolean canUndo()
public void flush()
public int getEditIndex(CodexEdit edit)
public java.util.ArrayList<CodexEdit> getEdits()
public int getLastSave()
public int getLastUndo()
public void redo()
java.lang.IllegalStateException - if there is nothing to redo.public void removeCodexUndoListener(CodexUndoListener listener)
public void removeListDataListener(javax.swing.event.ListDataListener listener)
public void startSaverThread()
java.lang.IllegalStateException - if the SaverThread has already been started.public void stopSaverThread()
public void undo()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||