edu.princeton.swing.text
public class HighlightedDocument.UndoableEdit extends java.lang.Object implements javax.swing.undo.UndoableEdit
Modifier | Constructor and Description |
---|---|
protected |
HighlightedDocument.UndoableEdit(int offset,
int length,
java.lang.StringBuffer newText,
boolean mergable)
Creates a new UndoableEdit.
|
protected |
HighlightedDocument.UndoableEdit(int offset,
java.lang.StringBuffer oldText,
java.lang.StringBuffer newText,
boolean mergable) |
Modifier and Type | Method and Description |
---|---|
boolean |
addEdit(javax.swing.undo.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.
|
java.lang.String |
getPresentationName()
Returns a string describing the edit.
|
java.lang.String |
getRedoPresentationName()
Returns a string describing the edit.
|
java.lang.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(javax.swing.undo.UndoableEdit anEdit)
Returns false (this edit should never replace another).
|
java.lang.String |
toString()
Returns a string describing the edit.
|
void |
undo()
Undoes this edit.
|
protected HighlightedDocument.UndoableEdit(int offset, java.lang.StringBuffer oldText, java.lang.StringBuffer newText, boolean mergable)
protected HighlightedDocument.UndoableEdit(int offset, int length, java.lang.StringBuffer newText, boolean mergable)
public boolean addEdit(javax.swing.undo.UndoableEdit edit)
addEdit
in interface javax.swing.undo.UndoableEdit
public boolean canRedo()
canRedo
in interface javax.swing.undo.UndoableEdit
public boolean canUndo()
canUndo
in interface javax.swing.undo.UndoableEdit
public void die()
die
in interface javax.swing.undo.UndoableEdit
public java.lang.String getPresentationName()
getPresentationName
in interface javax.swing.undo.UndoableEdit
public java.lang.String getRedoPresentationName()
getRedoPresentationName
in interface javax.swing.undo.UndoableEdit
public java.lang.String getUndoPresentationName()
getUndoPresentationName
in interface javax.swing.undo.UndoableEdit
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isSignificant()
isSignificant
in interface javax.swing.undo.UndoableEdit
public void redo()
redo
in interface javax.swing.undo.UndoableEdit
public boolean replaceEdit(javax.swing.undo.UndoableEdit anEdit)
replaceEdit
in interface javax.swing.undo.UndoableEdit
public void undo()
undo
in interface javax.swing.undo.UndoableEdit