|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.princeton.swing.text.HighlightedDocument.UndoableEdit
public class HighlightedDocument.UndoableEdit
UndoableEdit is a simple implementation of javax.swing.undo.UndoableEdit.
Constructor Summary | |
---|---|
protected |
HighlightedDocument.UndoableEdit(int offset,
int length,
StringBuffer newText,
boolean mergable)
Creates a new UndoableEdit. |
Method Summary | |
---|---|
boolean |
addEdit(UndoableEdit edit)
Attempts to merge another edit with the current edit. |
boolean |
canRedo()
Returns wheter or not this edit is alive. |
boolean |
canUndo()
Returns wheter or not this edit is alive. |
void |
die()
Frees resources associated with an edit. |
String |
getPresentationName()
Returns a string describing the edit. |
String |
getRedoPresentationName()
Returns a string describing the edit. |
String |
getUndoPresentationName()
Returns a string describing the edit. |
boolean |
isSignificant()
Returns true (this edit involved a document mutation). |
void |
redo()
Redoes an edit. |
boolean |
replaceEdit(UndoableEdit anEdit)
Returns false (this edit should never replace another). |
String |
toString()
Returns a string describing the edit. |
void |
undo()
Undoes this edit. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected HighlightedDocument.UndoableEdit(int offset, int length, StringBuffer newText, boolean mergable)
Method Detail |
---|
public boolean addEdit(UndoableEdit edit)
addEdit
in interface UndoableEdit
public boolean canRedo()
canRedo
in interface UndoableEdit
public boolean canUndo()
canUndo
in interface UndoableEdit
public void die()
die
in interface UndoableEdit
public String getPresentationName()
getPresentationName
in interface UndoableEdit
public String getRedoPresentationName()
getRedoPresentationName
in interface UndoableEdit
public String getUndoPresentationName()
getUndoPresentationName
in interface UndoableEdit
public String toString()
toString
in class Object
public boolean isSignificant()
isSignificant
in interface UndoableEdit
public void redo()
redo
in interface UndoableEdit
public boolean replaceEdit(UndoableEdit anEdit)
replaceEdit
in interface UndoableEdit
public void undo()
undo
in interface UndoableEdit
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |