|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
java.lang.Objectjavax.swing.undo.AbstractUndoableEdit
public class AbstractUndoableEdit
UndoableEdit 的抽象實作,實作對該介面中所有布林方法的簡單回應。
| 欄位摘要 | |
|---|---|
protected static String |
RedoName
由 getRedoPresentationName 返回的字元串;從 Java 2 平臺 v1.3.1 開始,不再使用此段落。 |
protected static String |
UndoName
由 getUndoPresentationName 返回的字元串;從 Java 2 平臺 v1.3.1 開始,不再使用此欄位。 |
| 建構子摘要 | |
|---|---|
AbstractUndoableEdit()
創建一個 AbstractUndoableEdit,其將 hasBeenDone 和 alive 預設為 true。 |
|
| 方法摘要 | |
|---|---|
boolean |
addEdit(UndoableEdit anEdit)
此預設實作返回 false。 |
boolean |
canRedo()
如果此編輯為 alive 並且 hasBeenDone 為 false,則返回 true。 |
boolean |
canUndo()
如果此編輯為 alive 並且 hasBeenDone 為 true,則返回 true。 |
void |
die()
將 alive 設置為 false。 |
String |
getPresentationName()
此預設實作返回 ""。 |
String |
getRedoPresentationName()
檢索預設表中 AbstractUndoableEdit.redoText 鍵的值,並返回該值,後跟一個空格和 getPresentationName。 |
String |
getUndoPresentationName()
檢索預設表中 AbstractUndoableEdit.undoText 鍵的值,並返回該值,後跟一個空格和 getPresentationName。 |
boolean |
isSignificant()
此預設實作返回 true。 |
void |
redo()
如果 canRedo 返回 false,則拋出 CannotRedoException。 |
boolean |
replaceEdit(UndoableEdit anEdit)
此預設實作返回 false。 |
String |
toString()
返回顯示和標識此物件屬性的字元串。 |
void |
undo()
如果 canUndo 返回 false,則拋出 CannotUndoException。 |
| 從類別 java.lang.Object 繼承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 欄位詳細資訊 |
|---|
protected static final String UndoName
getUndoPresentationName 返回的字元串;從 Java 2 平臺 v1.3.1 開始,不再使用此欄位。此值現在已本地化,並且來源於預設表,鍵為 AbstractUndoableEdit.undoText。
UIDefaults,
常數欄位值protected static final String RedoName
getRedoPresentationName 返回的字元串;從 Java 2 平臺 v1.3.1 開始,不再使用此段落。此值現在已本地化,並且來源於預設表,鍵為 AbstractUndoableEdit.redoText。
UIDefaults,
常數欄位值| 建構子詳細資訊 |
|---|
public AbstractUndoableEdit()
AbstractUndoableEdit,其將 hasBeenDone 和 alive 預設為 true。
| 方法詳細資訊 |
|---|
public void die()
alive 設置為 false。注意,這是一種單向操作;終止的編輯不能重新使啟用。將 undo 或 redo 發送到一個終止的編輯將導致拋出異常。
通常,一個編輯與另一編輯的 addEdit 或 replaceEdit 方法合併,或離開 UndoManager 佇列時,該方法會被終止。
UndoableEdit 中的 dieCompoundEdit.die()
public void undo()
throws CannotUndoException
canUndo 返回 false,則拋出 CannotUndoException。將 hasBeenDone 設置為 false。子類別應該覆寫以撤消此編輯所表示的操作。覆寫應該從調用父級類別開始。
UndoableEdit 中的 undoCannotUndoException - 如果 canUndo 返回 falsecanUndo()public boolean canUndo()
alive 並且 hasBeenDone 為 true,則返回 true。
UndoableEdit 中的 canUndoalive 並且 hasBeenDone 為 true,則返回 truedie(),
undo(),
redo()
public void redo()
throws CannotRedoException
canRedo 返回 false,則拋出 CannotRedoException。將 hasBeenDone 設置為 true。子類別應該覆寫以重新執行此編輯所表示的操作。覆寫應該從調用父級類別開始。
UndoableEdit 中的 redoCannotRedoException - 如果 canRedo 返回 false canRedo()public boolean canRedo()
alive 並且 hasBeenDone 為 false,則返回 true。
UndoableEdit 中的 canRedoalive 並且 hasBeenDone 為 false,則返回 truedie(),
undo(),
redo()public boolean addEdit(UndoableEdit anEdit)
UndoableEdit 中的 addEditanEdit - 要添加的編輯
UndoableEdit.addEdit(javax.swing.undo.UndoableEdit)public boolean replaceEdit(UndoableEdit anEdit)
UndoableEdit 中的 replaceEditanEdit - 要替換的編輯
UndoableEdit.replaceEdit(javax.swing.undo.UndoableEdit)public boolean isSignificant()
UndoableEdit 中的 isSignificantUndoableEdit.isSignificant()public String getPresentationName()
getUndoPresentationName 和 getRedoPresentationName 使用以建構它們返回的字元串。子類別應該覆寫以返回此編輯所表示的操作的適當描述。
UndoableEdit 中的 getPresentationNamegetUndoPresentationName(),
getRedoPresentationName()public String getUndoPresentationName()
AbstractUndoableEdit.undoText 鍵的值,並返回該值,後跟一個空格和 getPresentationName。如果 getPresentationName 返回 "",則單獨返回預設值。
UndoableEdit 中的 getUndoPresentationNameAbstractUndoableEdit.undoText 鍵的值,如果 getPresentationName 不為 "",則後跟一個空格和 getPresentationName,否則,單獨返回預設值。getPresentationName()public String getRedoPresentationName()
AbstractUndoableEdit.redoText 鍵的值,並返回該值,後跟一個空格和 getPresentationName。如果 getPresentationName 返回 "",則單獨返回預設值。
UndoableEdit 中的 getRedoPresentationNameAbstractUndoableEdit.redoText 鍵的值,如果 getPresentationName 不為 "",則後跟一個空格和 getPresentationName,否則,只返回預設值。getPresentationName()public String toString()
Object 中的 toString
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。