public class AbstractUndoableEdit extends Object implements UndoableEdit, Serializable
UndoableEdit的抽象实现,实现简单,界面反应的布尔方法。
| Modifier and Type | Field and Description |
|---|---|
protected static String |
RedoName
通过
getRedoPresentationName返回的字符串;作为这一领域的java 2平台用的是不再使用。
|
protected static String |
UndoName
通过
getUndoPresentationName返回的字符串;作为这一领域的java 2平台用的是不再使用。
|
| Constructor and Description |
|---|
AbstractUndoableEdit()
创建一个
AbstractUndoableEdit默认
hasBeenDone和
alive到
true。
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addEdit(UndoableEdit anEdit)
此默认实现返回错误。
|
boolean |
canRedo()
返回
true如果编辑
alive和
hasBeenDone是
false。
|
boolean |
canUndo()
返回true如果编辑
alive和
hasBeenDone是
true。
|
void |
die()
集
alive假。
|
String |
getPresentationName()
此默认实现返回“”。
|
String |
getRedoPresentationName()
retreives值缺省值表与关键
AbstractUndoableEdit.redoText和返回值后面加一个空格,其次是
getPresentationName。
|
String |
getUndoPresentationName()
retreives值缺省值表与关键
AbstractUndoableEdit.undoText和返回值后面加一个空格,其次是
getPresentationName。
|
boolean |
isSignificant()
此默认实现返回真实。
|
void |
redo()
如果把
CannotRedoException
canRedo返回false。
|
boolean |
replaceEdit(UndoableEdit anEdit)
此默认实现返回错误。
|
String |
toString()
返回显示并标识该对象属性的字符串。
|
void |
undo()
如果把
CannotUndoException
canUndo返回
false。
|
protected static final String UndoName
getUndoPresentationName返回的字符串;作为这一领域的java 2平台用的是不再使用。这是我们的价值定位和来自默认表与关键
AbstractUndoableEdit.undoText。
UIDefaults,
Constant Field Values
protected static final String RedoName
getRedoPresentationName返回的字符串;作为这一领域的java 2平台用的是不再使用。这是我们的价值定位和来自默认表与关键
AbstractUndoableEdit.redoText。
UIDefaults,
Constant Field Values
public AbstractUndoableEdit()
AbstractUndoableEdit默认
hasBeenDone和
alive到
true。
public void die()
alive假。请注意,这是一一路运行;死编辑不能复活。
undo或
redo发送一个死编辑结果将抛出一个异常。
通常一个编辑被杀害时,它是由另一个编辑的addEdit或replaceEdit方法合并,或当它是一个UndoManager出列。
die 接口
UndoableEdit
CompoundEdit.die()
public void undo()
throws CannotUndoException
CannotUndoException
canUndo返回
false。集
hasBeenDone到
false。子类应重写撤消操作由本编辑。重写应该以对超级的调用开始。
undo 接口
UndoableEdit
CannotUndoException -如果
canUndo返回
false
canUndo()
public boolean canUndo()
alive和
hasBeenDone是
true。
canUndo 接口
UndoableEdit
alive和
hasBeenDone是
true编辑
die(),
undo(),
redo()
public void redo()
throws CannotRedoException
CannotRedoException
canRedo返回false。集
hasBeenDone到
true。子类应重写重做此编辑所表示的操作。重写应该以对超级的调用开始。
redo 接口
UndoableEdit
CannotRedoException -如果
canRedo返回
false
canRedo()
public boolean canRedo()
true如果编辑
alive和
hasBeenDone是
false。
canRedo 接口
UndoableEdit
true编辑
alive和
hasBeenDone是
false
die(),
undo(),
redo()
public boolean addEdit(UndoableEdit anEdit)
addEdit 接口
UndoableEdit
anEdit -编辑要添加
UndoableEdit.addEdit(javax.swing.undo.UndoableEdit)
public boolean replaceEdit(UndoableEdit anEdit)
replaceEdit 接口
UndoableEdit
anEdit -编辑替换
UndoableEdit.replaceEdit(javax.swing.undo.UndoableEdit)
public boolean isSignificant()
isSignificant 接口
UndoableEdit
UndoableEdit.isSignificant()
public String getPresentationName()
getUndoPresentationName和
getRedoPresentationName用来构建字符串返回。子类应重写返回一个对这个编辑表示的操作的适当的描述。
getPresentationName 接口
UndoableEdit
getUndoPresentationName(),
getRedoPresentationName()
public String getUndoPresentationName()
AbstractUndoableEdit.undoText和返回值后面加一个空格,其次是
getPresentationName。如果
getPresentationName返回”,则默认值是一个人回来。
getUndoPresentationName 接口
UndoableEdit
AbstractUndoableEdit.undoText,紧随其后的是一个空间,其次是
getPresentationName除非
getPresentationName是”在这种情况下,默认值是一个人回来。
getPresentationName()
public String getRedoPresentationName()
AbstractUndoableEdit.redoText和返回值后面加一个空格,其次是
getPresentationName。如果
getPresentationName返回”,则默认值是一个人回来。
getRedoPresentationName 接口
UndoableEdit
AbstractUndoableEdit.redoText,紧随其后的是一个空间,其次是
getPresentationName除非
getPresentationName是”在这种情况下,默认值是一个人回来。
getPresentationName()
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.