public class AbstractDocument.DefaultDocumentEvent extends CompoundEdit implements DocumentEvent
DocumentEvent.ElementChange, DocumentEvent.EventType
edits
RedoName, UndoName
コンストラクタ | 説明 |
---|---|
DefaultDocumentEvent(int offs, int len, DocumentEvent.EventType type) |
変更レコードを作成します。
|
修飾子と型 | メソッド | 説明 |
---|---|---|
boolean |
addEdit(UndoableEdit anEdit) |
ドキュメント編集を追加します。
|
DocumentEvent.ElementChange |
getChange(Element elem) |
要素の変更を取得します。
|
Document |
getDocument() |
変更イベントの基となったドキュメントを返します。
|
int |
getLength() |
変更の長さを返します。
|
int |
getOffset() |
変更の始点のドキュメント内でのオフセットを返します。
|
String |
getPresentationName() |
変更ログなどで使われる、この編集結果の、判読可能なローカライズされた記述を提供します。
|
String |
getRedoPresentationName() |
次のような、編集結果の再実行可能な形式の判読可能なローカライズ済みの説明を提供します。
|
DocumentEvent.EventType |
getType() |
イベントの型を返します。
|
String |
getUndoPresentationName() |
次のような、この編集結果の取消し可能な形式の判読可能なローカライズ済みの説明を提供します。
|
boolean |
isSignificant() |
DefaultDocumentイベントは重要です。
|
void |
redo() |
変更をやり直します。
|
String |
toString() |
変更イベントの説明文字列を返します。
|
void |
undo() |
変更を元に戻します。
|
canRedo, canUndo, die, end, isInProgress, lastEdit
replaceEdit
public DefaultDocumentEvent(int offs, int len, DocumentEvent.EventType type)
offs
- 変更ドキュメントへのオフセット>= 0len
- 変更の長さ>= 0type
- イベントの型(DocumentEvent.EventType)public String toString()
toString
、クラスCompoundEdit
public boolean addEdit(UndoableEdit anEdit)
addEdit
、インタフェースUndoableEdit
addEdit
、クラスCompoundEdit
anEdit
- ドキュメント編集レコードUndoableEdit.addEdit(javax.swing.undo.UndoableEdit)
public void redo() throws CannotRedoException
redo
、インタフェースUndoableEdit
redo
、クラスCompoundEdit
CannotRedoException
- 変更のやり直しができない場合AbstractUndoableEdit.canRedo()
public void undo() throws CannotUndoException
undo
、インタフェースUndoableEdit
undo
、クラスCompoundEdit
CannotUndoException
- 変更を元に戻せない場合AbstractUndoableEdit.canUndo()
public boolean isSignificant()
isSignificant
、インタフェースUndoableEdit
isSignificant
、クラスCompoundEdit
UndoableEdit.isSignificant()
public String getPresentationName()
getPresentationName
、インタフェースUndoableEdit
getPresentationName
、クラスCompoundEdit
AbstractUndoableEdit.getUndoPresentationName()
, AbstractUndoableEdit.getRedoPresentationName()
public String getUndoPresentationName()
getUndoPresentationName
、インタフェースUndoableEdit
getUndoPresentationName
、クラスCompoundEdit
AbstractUndoableEdit.getPresentationName()
public String getRedoPresentationName()
getRedoPresentationName
、インタフェースUndoableEdit
getRedoPresentationName
、クラスCompoundEdit
AbstractUndoableEdit.getPresentationName()
public DocumentEvent.EventType getType()
getType
、インタフェースDocumentEvent
DocumentEvent.getType()
public int getOffset()
getOffset
、インタフェースDocumentEvent
DocumentEvent.getOffset()
public int getLength()
getLength
、インタフェースDocumentEvent
DocumentEvent.getLength()
public Document getDocument()
getDocument
、インタフェースDocumentEvent
DocumentEvent.getDocument()
public DocumentEvent.ElementChange getChange(Element elem)
getChange
、インタフェースDocumentEvent
elem
- 要素 バグまたは機能を送信
詳細なAPIリファレンスおよび開発者ドキュメントについては、Java SEのドキュメントを参照してください。 そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Documentation Redistribution Policyも参照してください。