public class SwingSetTokensEdit<T> extends SwingTokenEdit<T>
AlignmentModel.SwingUndoAlignmentModelbeginIndex, sequenceID, tokens| Constructor and Description |
|---|
SwingSetTokensEdit(SwingUndoAlignmentModel<T> model,
java.lang.String sequenceID,
int beginIndex,
java.util.Collection<? extends T> tokens)
Creates a new instance of this class.
|
SwingSetTokensEdit(SwingUndoAlignmentModel<T> provider,
java.lang.String sequenceID,
int index,
T token)
Creates a new instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<T> |
getOldTokens()
Returns a list of the tokens that are replaced when this edit is executed.
|
protected java.lang.String |
getOperationName() |
void |
redo() |
void |
undo() |
getBeginIndex, getPresentationName, getSequenceID, getTokensgetModel, registerDocumentChangeaddEdit, canRedo, canUndo, die, getIsSubedit, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, setIsSubeditpublic SwingSetTokensEdit(SwingUndoAlignmentModel<T> model, java.lang.String sequenceID, int beginIndex, java.util.Collection<? extends T> tokens)
model - the data provider creating this instancesequenceID - the identifier the sequence where the token is containedbeginIndex - the index of the first element to be replaced
(The first element in the sequence has the index 0.)tokens - the new tokens for the specified positionpublic SwingSetTokensEdit(SwingUndoAlignmentModel<T> provider, java.lang.String sequenceID, int index, T token)
provider - the alignment model creating this instancesequenceID - the identifier the sequence where the token is containedindex - the index of the element to be replaced
(The first element in the sequence has the index 0.)token - the new token for the specified positionpublic void redo() throws javax.swing.undo.CannotRedoException
redo in interface javax.swing.undo.UndoableEditredo in class AbstractDocumentEditjavax.swing.undo.CannotRedoExceptionpublic void undo() throws javax.swing.undo.CannotUndoException
undo in interface javax.swing.undo.UndoableEditundo in class AbstractDocumentEditjavax.swing.undo.CannotUndoExceptionpublic java.util.Collection<T> getOldTokens()
protected java.lang.String getOperationName()
getOperationName in class SwingTokenEdit<T>