Java プラットフォーム 1.2

javax.swing.undo
クラス CompoundEdit

java.lang.Object
  |
  +--javax.swing.undo.AbstractUndoableEdit
        |
        +--javax.swing.undo.CompoundEdit
直接の既知のサブクラス:
AbstractDocument.DefaultDocumentEvent, UndoManager

public class CompoundEdit
extends AbstractUndoableEdit

AbstractUndoableEdit の具象サブクラスで、小さい UndoableEdit をまとめて大きなものに組み立てます。

関連項目:
直列化された形式

フィールドの概要
protected  Vector edits
          CompoundEdit によってひとまとめに、元に戻す/再実行する処理を実行された UndoableEdit のコレクションです。
 
クラス javax.swing.undo.AbstractUndoableEdit から継承したフィールド
RedoName, UndoName
 
コンストラクタの概要
CompoundEdit()
           
 
メソッドの概要
 boolean addEdit(UndoableEdit anEdit)
          この編集結果が進行中の場合、anEdit を受け付けて true を返します。
 boolean canRedo()
          isInProgress が true を返す場合や、スーパークラスが行う場合に、false を返します。
 boolean canUndo()
          isInProgresss が true を返す場合や、スーパークラスが行う場合に、false を返します。
 void die()
          各編集結果に対して、それが追加されたときと逆の順序で非生存状態化メッセージを送ります。
 void end()
          進行中フラグを false に設定します。
 String getPresentationName()
          edits に追加された最後の UndoableEdit から getPresentationName を返します。
 String getRedoPresentationName()
          edits に追加された最後の UndoableEdit から getRedoPresentationName を返します。
 String getUndoPresentationName()
          edits に追加された最後の UndoableEdit から getUndoPresentationName を返します。
 boolean isInProgress()
          この編集結果が進行中の場合、つまり、まだ終了指示を受け取っていない場合に、true を返します。
 boolean isSignificant()
          edits 内の UndoableEdit のどれかが true を返した場合に true を返します。
protected  UndoableEdit lastEdit()
          edits 内の最後の UndoableEdit を返します。
 void redo()
          格納されているすべての UndoableEdit に、追加した順序で redo() を送ります。
 String toString()
          このオブジェクトのプロパティを表示または識別する文字列を返します。
 void undo()
          格納されているすべての UndoableEdit に、追加したときと逆の順序で undo() を送ります。
 
クラス javax.swing.undo.AbstractUndoableEdit から継承したメソッド
replaceEdit
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

edits

protected Vector edits
CompoundEdit によってひとまとめに、元に戻す/再実行する処理を実行された UndoableEdit のコレクションです。
コンストラクタの詳細

CompoundEdit

public CompoundEdit()
メソッドの詳細

undo

public void undo()
          throws CannotUndoException
格納されているすべての UndoableEdit に、追加したときと逆の順序で undo() を送ります。
オーバーライド:
クラス AbstractUndoableEdit 内の undo

redo

public void redo()
          throws CannotRedoException
格納されているすべての UndoableEdit に、追加した順序で redo() を送ります。
オーバーライド:
クラス AbstractUndoableEdit 内の redo

lastEdit

protected UndoableEdit lastEdit()
edits 内の最後の UndoableEdit を返します。ただし、edits が空の場合は null を返します。

die

public void die()
各編集結果に対して、それが追加されたときと逆の順序で非生存状態化メッセージを送ります。
オーバーライド:
クラス AbstractUndoableEdit 内の die

addEdit

public boolean addEdit(UndoableEdit anEdit)
この編集結果が進行中の場合、anEdit を受け付けて true を返します。

この CompoundEdit に追加された最後の編集結果は、addEdit(anEdit) を実行する機会を与えられます。その編集結果が拒否すると (false を返すと)、anEdit が最後の編集結果に対して replaceEdit を実行する機会を与えられます。anEdit がここで false を返すと、edits に追加されます。

オーバーライド:
クラス AbstractUndoableEdit 内の addEdit

end

public void end()
進行中フラグを false に設定します。
関連項目:
canUndo(), canRedo()

canUndo

public boolean canUndo()
isInProgresss が true を返す場合や、スーパークラスが行う場合に、false を返します。
オーバーライド:
クラス AbstractUndoableEdit 内の canUndo
関連項目:
isInProgress()

canRedo

public boolean canRedo()
isInProgress が true を返す場合や、スーパークラスが行う場合に、false を返します。
オーバーライド:
クラス AbstractUndoableEdit 内の canRedo
関連項目:
isInProgress()

isInProgress

public boolean isInProgress()
この編集結果が進行中の場合、つまり、まだ終了指示を受け取っていない場合に、true を返します。これは通常、edits がまだ追加中であることを意味します。
関連項目:
end()

isSignificant

public boolean isSignificant()
edits 内の UndoableEdit のどれかが true を返した場合に true を返します。すべてが false を返した場合、false を返します。
オーバーライド:
クラス AbstractUndoableEdit 内の isSignificant

getPresentationName

public String getPresentationName()
edits に追加された最後の UndoableEdit から getPresentationName を返します。edits が空の場合、スーパークラスを呼び出します。
オーバーライド:
クラス AbstractUndoableEdit 内の getPresentationName

getUndoPresentationName

public String getUndoPresentationName()
edits に追加された最後の UndoableEdit から getUndoPresentationName を返します。edits が空の場合、スーパークラスを呼び出します。
オーバーライド:
クラス AbstractUndoableEdit 内の getUndoPresentationName

getRedoPresentationName

public String getRedoPresentationName()
edits に追加された最後の UndoableEdit から getRedoPresentationName を返します。edit が空の場合、スーパークラスを呼び出します。
オーバーライド:
クラス AbstractUndoableEdit 内の getRedoPresentationName

toString

public String toString()
このオブジェクトのプロパティを表示または識別する文字列を返します。
戻り値:
このオブジェクトの String 表現
オーバーライド:
クラス AbstractUndoableEdit 内の toString

Java プラットフォーム 1.2

バグや機能要求の報告
新しい javadoc の表示についてのコメントやご提案
Java は、米国およびその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.