public static class AbstractDocument.ElementEdit extends AbstractUndoableEdit implements DocumentEvent.ElementChange
RedoName, UndoName
Constructor and Description |
---|
ElementEdit(Element e, int index, Element[] removed, Element[] added)
构建编辑记录。
|
Modifier and Type | Method and Description |
---|---|
Element[] |
getChildrenAdded()
获取添加的子项列表。
|
Element[] |
getChildrenRemoved()
获取已删除的子项列表。
|
Element |
getElement()
返回底层元素。
|
int |
getIndex()
将索引返回到元素列表。
|
void |
redo()
重做一个变化。
|
void |
undo()
撤消更改。
|
addEdit, canRedo, canUndo, die, getPresentationName, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, toString
public Element getElement()
getElement
在界面
DocumentEvent.ElementChange
public int getIndex()
getIndex
在界面
DocumentEvent.ElementChange
public Element[] getChildrenRemoved()
getChildrenRemoved
在界面
DocumentEvent.ElementChange
public Element[] getChildrenAdded()
getChildrenAdded
在接口
DocumentEvent.ElementChange
public void redo() throws CannotRedoException
redo
在界面
UndoableEdit
redo
在
AbstractUndoableEdit
CannotRedoException
- 如果更改无法重做
AbstractUndoableEdit.canRedo()
public void undo() throws CannotUndoException
undo
在界面
UndoableEdit
undo
在
AbstractUndoableEdit
CannotUndoException
- 如果更改无法撤消
AbstractUndoableEdit.canUndo()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.