public final class InclusionUpdatedEvent extends DocumentEvent
Inclusion
has been updated, that is, that
a sequence of contiguous included nodes has been replaced by another
sequence of contiguous included nodes.DocumentEvent.Type
source, type
Constructor and Description |
---|
InclusionUpdatedEvent()
Constructs an event intended to be used several times with different
field values.
|
InclusionUpdatedEvent(Object source,
Inclusion inclusion,
Node[] oldChildren,
Node[] newChildren)
Contructs an event.
|
Modifier and Type | Method and Description |
---|---|
Node |
getBeforeChild()
Convenience method: returns child node before which
the replacement of nodes was made.
|
Document |
getDocumentSource()
Convenience method: returns the document containing included nodes.
|
Element |
getElementSource()
Convenience method: returns the element containing included nodes.
|
Inclusion |
getInclusion()
Returns the Inclusion which has been updated.
|
Node[] |
getNewChildren()
Returns replacement child nodes, a possibly empty array.
|
Node[] |
getOldChildren()
Returns replaced child nodes, a possibly empty array.
|
Tree |
getTreeSource()
Returns the tree containing included nodes.
|
void |
initialize(Object source,
Inclusion inclusion,
Node[] oldChildren,
Node[] newChildren)
Initializes this event.
|
String |
toString()
Returns a string representation of this event which can be
used when debugging.
|
copy, getSource, getType, initialize
public InclusionUpdatedEvent()
initialize(java.lang.Object, com.xmlmind.xml.doc.Inclusion, com.xmlmind.xml.doc.Node[], com.xmlmind.xml.doc.Node[])
to initialize its fields.public InclusionUpdatedEvent(Object source, Inclusion inclusion, Node[] oldChildren, Node[] newChildren)
source
- the modified treeinclusion
- the Inclusion which has been updatedoldChildren
- removed or replaced child nodes.
May be null
or an empty array.newChildren
- added or replacement child nodes.
May be null
or an empty array.public void initialize(Object source, Inclusion inclusion, Node[] oldChildren, Node[] newChildren)
source
- the modified treeinclusion
- the Inclusion which has been updatedoldChildren
- removed or replaced child nodes.
May be null
or an empty array.newChildren
- added or replacement child nodes.
May be null
or an empty array.public Tree getTreeSource()
public Element getElementSource()
public Document getDocumentSource()
public Inclusion getInclusion()
public Node[] getOldChildren()
public Node[] getNewChildren()
public Node getBeforeChild()
null
.public String toString()
DocumentEvent
toString
in class DocumentEvent