|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.undo.AbstractUndoableEdit
javax.swing.undo.CompoundEdit
javax.swing.text.AbstractDocument.DefaultDocumentEvent
com.inet.html.InetHtmlDocument.ExtendedDocuementEvent
public class InetHtmlDocument.ExtendedDocuementEvent
Extends the DefaultDocumentEvent to support the update events by grouping the changes by paragraph element. This is required to avoid problems with the different structure of view and model.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface javax.swing.event.DocumentEvent |
---|
javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent.EventType |
Constructor Summary | |
---|---|
InetHtmlDocument.ExtendedDocuementEvent(int offs,
int len,
javax.swing.event.DocumentEvent.EventType type,
InetHtmlDocument document)
Generates a Document event. |
|
InetHtmlDocument.ExtendedDocuementEvent(int offs,
int len,
int contentChangeLen,
javax.swing.event.DocumentEvent.EventType type,
InetHtmlDocument document)
Generates a Document event. |
|
InetHtmlDocument.ExtendedDocuementEvent(int offs,
int len,
int contentChangeStart,
int contentChangeLen,
javax.swing.event.DocumentEvent.EventType type,
InetHtmlDocument document)
Generates a Document event. |
Method Summary | |
---|---|
boolean |
addEdit(javax.swing.undo.UndoableEdit anEdit)
|
java.util.ArrayList<javax.swing.undo.UndoableEdit> |
getAllChanges()
Returns a list of all changes registered to this event |
java.util.ArrayList<javax.swing.event.DocumentEvent.ElementChange> |
getEditsFor(javax.swing.text.Element paragraph)
Returns all edits for paragraph |
int |
getLength()
|
int |
getOffset()
|
int |
getStructureChangeLen()
Returns the length of the structural change. |
int |
getStructureChangeStart()
Returns the start of the structural change. |
javax.swing.event.DocumentEvent.EventType |
getType()
|
boolean |
hasEditsFor(javax.swing.text.Element paragraph)
|
void |
redo()
|
void |
undo()
|
Methods inherited from class javax.swing.text.AbstractDocument.DefaultDocumentEvent |
---|
getChange, getDocument, getPresentationName, getRedoPresentationName, getUndoPresentationName, isSignificant, toString |
Methods inherited from class javax.swing.undo.CompoundEdit |
---|
canRedo, canUndo, die, end, isInProgress |
Methods inherited from class javax.swing.undo.AbstractUndoableEdit |
---|
replaceEdit |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public InetHtmlDocument.ExtendedDocuementEvent(int offs, int len, javax.swing.event.DocumentEvent.EventType type, InetHtmlDocument document)
offs
- the offset into the document of the change >= 0len
- the length of the change >= 0type
- the type of event (DocumentEvent.EventType)document
- The enclosing documentpublic InetHtmlDocument.ExtendedDocuementEvent(int offs, int len, int contentChangeLen, javax.swing.event.DocumentEvent.EventType type, InetHtmlDocument document)
offs
- the offset within the document where the structural change startslen
- the length of the change structural >= 0contentChangeLen
- the length of content added/removedtype
- the type of event (DocumentEvent.EventType)document
- The enclosing documentpublic InetHtmlDocument.ExtendedDocuementEvent(int offs, int len, int contentChangeStart, int contentChangeLen, javax.swing.event.DocumentEvent.EventType type, InetHtmlDocument document)
offs
- the offset within the document where the structural change startslen
- the length of the change structural >= 0contentChangeStart
- the length of content added/removedcontentChangeLen
- the length of content added/removedtype
- the type of event (DocumentEvent.EventType)document
- The enclosing documentMethod Detail |
---|
public int getStructureChangeLen()
public int getStructureChangeStart()
public int getLength()
getLength
in interface javax.swing.event.DocumentEvent
getLength
in class javax.swing.text.AbstractDocument.DefaultDocumentEvent
public int getOffset()
getOffset
in interface javax.swing.event.DocumentEvent
getOffset
in class javax.swing.text.AbstractDocument.DefaultDocumentEvent
public boolean addEdit(javax.swing.undo.UndoableEdit anEdit)
addEdit
in interface javax.swing.undo.UndoableEdit
addEdit
in class javax.swing.text.AbstractDocument.DefaultDocumentEvent
public java.util.ArrayList<javax.swing.undo.UndoableEdit> getAllChanges()
public boolean hasEditsFor(javax.swing.text.Element paragraph)
paragraph
- The paragraph to get the edits for
public java.util.ArrayList<javax.swing.event.DocumentEvent.ElementChange> getEditsFor(javax.swing.text.Element paragraph)
paragraph
paragraph
- The paragraph to get the edits for
paragraph
or null if none were registeredpublic javax.swing.event.DocumentEvent.EventType getType()
getType
in interface javax.swing.event.DocumentEvent
getType
in class javax.swing.text.AbstractDocument.DefaultDocumentEvent
public void undo() throws javax.swing.undo.CannotUndoException
undo
in interface javax.swing.undo.UndoableEdit
undo
in class javax.swing.text.AbstractDocument.DefaultDocumentEvent
javax.swing.undo.CannotUndoException
public void redo() throws javax.swing.undo.CannotUndoException
redo
in interface javax.swing.undo.UndoableEdit
redo
in class javax.swing.text.AbstractDocument.DefaultDocumentEvent
javax.swing.undo.CannotUndoException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |