public class CompoundEdit extends AbstractUndoableEdit
Modifier and Type | Field and Description |
---|---|
protected Vector<UndoableEdit> |
edits
对
UndoableEdit s集合全体撤消/重做这个
CompoundEdit 。
|
RedoName, UndoName
Constructor and Description |
---|
CompoundEdit() |
Modifier and Type | Method and Description |
---|---|
boolean |
addEdit(UndoableEdit anEdit)
如果这是
inProgress 编辑,接受
anEdit 返回true。
|
boolean |
canRedo()
如果
isInProgress 或者超返回返回FALSE。
|
boolean |
canUndo()
如果
isInProgress 或者超返回返回FALSE。
|
void |
die()
发送
die 每任副编辑,在反向的命令,他们说。
|
void |
end()
集
inProgress 假。
|
String |
getPresentationName()
返回
getPresentationName 从去年
UndoableEdit 加入
edits 。
|
String |
getRedoPresentationName()
返回
getRedoPresentationName 从去年
UndoableEdit 加入
edits 。
|
String |
getUndoPresentationName()
返回
getUndoPresentationName 从去年
UndoableEdit 加入
edits 。
|
boolean |
isInProgress()
如果这个编辑正在进行中,也就是说,它没有收到结束。
|
boolean |
isSignificant()
返回true,如果任何的
UndoableEdit s在
edits 做。
|
protected UndoableEdit |
lastEdit()
返回
edits 最后
UndoableEdit ,或
null 如果
edits 是空的。
|
void |
redo()
发送
redo 所有包含
UndoableEdit s在秩序中,他们补充说。
|
String |
toString()
返回显示并标识该对象属性的字符串。
|
void |
undo()
发送
undo 所有包含
UndoableEdits 在它们的顺序添加反向。
|
replaceEdit
protected Vector<UndoableEdit> edits
UndoableEdit
s撤消/重做这个
CompoundEdit
全体集合。
public void undo() throws CannotUndoException
undo
所有包含
UndoableEdits
在它们的顺序添加反向。
undo
接口
UndoableEdit
undo
方法重写,继承类
AbstractUndoableEdit
CannotUndoException
-如果
canUndo
返回
false
AbstractUndoableEdit.canUndo()
public void redo() throws CannotRedoException
redo
所有包含
UndoableEdit
s在秩序中,他们补充说。
redo
接口
UndoableEdit
redo
方法重写,继承类
AbstractUndoableEdit
CannotRedoException
-如果
canRedo
返回
false
AbstractUndoableEdit.canRedo()
protected UndoableEdit lastEdit()
edits
最后
UndoableEdit
,或
null
如果
edits
是空的。
public void die()
die
每任副编辑,在反向的命令,他们说。
die
接口
UndoableEdit
die
方法重写,继承类
AbstractUndoableEdit
die()
public boolean addEdit(UndoableEdit anEdit)
inProgress
编辑,接受
anEdit
返回true。
最后编辑说这CompoundEdit
是机会addEdit(anEdit)
。如果它拒绝(false),anEdit
是机会replaceEdit
最后编辑。如果anEdit
返回false,它被添加到edits
。
addEdit
接口
UndoableEdit
addEdit
方法重写,继承类
AbstractUndoableEdit
anEdit
-编辑要添加
inProgress
真;否则返回假
UndoableEdit.addEdit(javax.swing.undo.UndoableEdit)
public boolean canUndo()
isInProgress
或者超返回返回FALSE。
canUndo
接口
UndoableEdit
canUndo
方法重写,继承类
AbstractUndoableEdit
alive
和
hasBeenDone
是
true
编辑
isInProgress()
public boolean canRedo()
isInProgress
或者超返回返回FALSE。
canRedo
接口
UndoableEdit
canRedo
方法重写,继承类
AbstractUndoableEdit
true
编辑
alive
和
hasBeenDone
是
false
isInProgress()
public boolean isInProgress()
end()
public boolean isSignificant()
UndoableEdit
s在
edits
做。如果他们都返回假,则返回假。
isSignificant
接口
UndoableEdit
isSignificant
方法重写,继承类
AbstractUndoableEdit
UndoableEdit.isSignificant()
public String getPresentationName()
getPresentationName
从去年
UndoableEdit
加入
edits
。如果
edits
是空的,称为超。
getPresentationName
接口
UndoableEdit
getPresentationName
方法重写,继承类
AbstractUndoableEdit
AbstractUndoableEdit.getUndoPresentationName()
,
AbstractUndoableEdit.getRedoPresentationName()
public String getUndoPresentationName()
getUndoPresentationName
从去年
UndoableEdit
加入
edits
。如果
edits
是空的,称为超。
getUndoPresentationName
接口
UndoableEdit
getUndoPresentationName
方法重写,继承类
AbstractUndoableEdit
AbstractUndoableEdit.undoText
,紧随其后的是一个空间,其次是
getPresentationName
除非
getPresentationName
是”在这种情况下,默认值是一个人回来。
AbstractUndoableEdit.getPresentationName()
public String getRedoPresentationName()
getRedoPresentationName
从去年
UndoableEdit
加入
edits
。如果
edits
是空的,称为超。
getRedoPresentationName
接口
UndoableEdit
getRedoPresentationName
方法重写,继承类
AbstractUndoableEdit
AbstractUndoableEdit.redoText
,紧随其后的是一个空间,其次是
getPresentationName
除非
getPresentationName
是”在这种情况下,默认值是一个人回来。
AbstractUndoableEdit.getPresentationName()
public String toString()
toString
方法重写,继承类
AbstractUndoableEdit
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.