|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.EventObject
de.sciss.app.BasicEvent
de.sciss.app.DocumentEvent
public class DocumentEvent
This kind of event is fired
from a DocumentHandler
when
a document as been created, destroyed
or switched.
DocumentHandler.addDocumentListener( DocumentListener )
,
DocumentHandler
,
Document
,
Serialized FormField Summary | |
---|---|
static int |
ADDED
returned by getID() : the document has been added |
static int |
FOCUSSED
returned by getID() : the document has become the active document |
static int |
REMOVED
returned by getID() : the document has been removed |
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
DocumentEvent(java.lang.Object source,
int ID,
long when,
Document doc)
Constructs a new DocumentEvent |
Method Summary | |
---|---|
Document |
getDocument()
Queries the related document |
boolean |
incorporate(BasicEvent oldEvent)
Asks the event to incorporate the action described by another (older) event. |
Methods inherited from class de.sciss.app.BasicEvent |
---|
getID, getWhen |
Methods inherited from class java.util.EventObject |
---|
getSource, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int ADDED
public static final int REMOVED
public static final int FOCUSSED
Constructor Detail |
---|
public DocumentEvent(java.lang.Object source, int ID, long when, Document doc)
DocumentEvent
source
- who originated the actionID
- ADDED
, REMOVED
, or FOCUSSED
when
- system time when the event occureddoc
- the related documentMethod Detail |
---|
public Document getDocument()
public boolean incorporate(BasicEvent oldEvent)
BasicEvent
replaceEdit()
method of the javax.swing.undo.UndoableEdit
interface; a pendant of a symmetric addEdit()
like method is not provided because it seems to
be unnecessary.
Implementation notes : the oldEvent
should
generally only be incorporated if it refers to
the same source object (getSource()
) and has
the same ID (getD()
). the
timestamp of the current event should not be modified.
incorporate
in class BasicEvent
oldEvent
- the most recent event in the queue
which might be incorporated by this
new event.
true
if this object was able to
incorporate the older event. in this
case the oldEvent
is removed from the
event queue. false
states
that the oldEvent
was incompatible and
should remain in the queue.UndoableEdit.replaceEdit( UndoableEdit )
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |