swingwtx.swing.text
Class AbstractDocument.DefaultDocumentEvent

java.lang.Object
  extended byswingwtx.swing.undo.AbstractUndoableEdit
      extended byswingwtx.swing.undo.CompoundEdit
          extended byswingwtx.swing.text.AbstractDocument.DefaultDocumentEvent
All Implemented Interfaces:
DocumentEvent, UndoableEdit
Enclosing class:
AbstractDocument

public class AbstractDocument.DefaultDocumentEvent
extends CompoundEdit
implements DocumentEvent


Nested Class Summary
 
Nested classes inherited from class swingwtx.swing.event.DocumentEvent
DocumentEvent.ElementChange, DocumentEvent.EventType
 
Field Summary
protected  int len
           
protected  int offset
           
protected  DocumentEvent.EventType type
           
 
Fields inherited from class swingwtx.swing.undo.CompoundEdit
edits
 
Fields inherited from class swingwtx.swing.undo.AbstractUndoableEdit
RedoName, UndoName
 
Constructor Summary
AbstractDocument.DefaultDocumentEvent(int offs, int len, DocumentEvent.EventType type)
           
 
Method Summary
 boolean addEdit(UndoableEdit anEdit)
          Default implementations do nothing.
 DocumentEvent.ElementChange getChange(Element elem)
           
 Document getDocument()
           
 int getLength()
           
 int getOffset()
           
 java.lang.String getPresentationName()
           
 java.lang.String getRedoPresentationName()
           
 DocumentEvent.EventType getType()
           
 java.lang.String getUndoPresentationName()
           
 boolean isSignificant()
           
 void redo()
           
 java.lang.String toString()
           
 void undo()
           
 
Methods inherited from class swingwtx.swing.undo.CompoundEdit
canRedo, canUndo, die, end, isInProgress, lastEdit
 
Methods inherited from class swingwtx.swing.undo.AbstractUndoableEdit
replaceEdit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

protected DocumentEvent.EventType type

offset

protected int offset

len

protected int len
Constructor Detail

AbstractDocument.DefaultDocumentEvent

public AbstractDocument.DefaultDocumentEvent(int offs,
                                             int len,
                                             DocumentEvent.EventType type)
Method Detail

toString

public java.lang.String toString()

addEdit

public boolean addEdit(UndoableEdit anEdit)
Description copied from class: AbstractUndoableEdit
Default implementations do nothing. Override in implementing classes

Specified by:
addEdit in interface UndoableEdit
Overrides:
addEdit in class CompoundEdit

redo

public void redo()
          throws CannotRedoException
Specified by:
redo in interface UndoableEdit
Overrides:
redo in class CompoundEdit
Throws:
CannotRedoException

undo

public void undo()
          throws CannotUndoException
Specified by:
undo in interface UndoableEdit
Overrides:
undo in class CompoundEdit
Throws:
CannotUndoException

isSignificant

public boolean isSignificant()
Specified by:
isSignificant in interface UndoableEdit
Overrides:
isSignificant in class CompoundEdit

getPresentationName

public java.lang.String getPresentationName()
Specified by:
getPresentationName in interface UndoableEdit
Overrides:
getPresentationName in class CompoundEdit

getUndoPresentationName

public java.lang.String getUndoPresentationName()
Specified by:
getUndoPresentationName in interface UndoableEdit
Overrides:
getUndoPresentationName in class CompoundEdit

getRedoPresentationName

public java.lang.String getRedoPresentationName()
Specified by:
getRedoPresentationName in interface UndoableEdit
Overrides:
getRedoPresentationName in class CompoundEdit

getType

public DocumentEvent.EventType getType()
Specified by:
getType in interface DocumentEvent

getOffset

public int getOffset()
Specified by:
getOffset in interface DocumentEvent

getLength

public int getLength()
Specified by:
getLength in interface DocumentEvent

getDocument

public Document getDocument()
Specified by:
getDocument in interface DocumentEvent

getChange

public DocumentEvent.ElementChange getChange(Element elem)
Specified by:
getChange in interface DocumentEvent