issrg.utils.gui.xml
Class XMLChangeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by java.awt.AWTEvent
          extended by issrg.utils.gui.xml.XMLChangeEvent
All Implemented Interfaces:
java.io.Serializable

public class XMLChangeEvent
extends java.awt.AWTEvent

An event which indicates that a change has occured in the Document (DOM). This is a low-level event that is generated when a user creates a new policy, or modifies an open policy. The event is passed to every XMLChangeListener object that is registered to receive such events using the component's addXMLChangeListener method.

The object that implements the XMLChangeListener interface gets this XMLChangeEvent when the event occurs.

See Also:
XMLChangeListener, Serialized Form

Field Summary
 
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, MOUSE_WHEEL_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK, WINDOW_FOCUS_EVENT_MASK, WINDOW_STATE_EVENT_MASK
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
XMLChangeEvent(XMLEditor xmled, org.w3c.dom.Element parentNode, org.w3c.dom.Element oldChildNode, org.w3c.dom.Element newChildNode, java.lang.String action)
          Constructs an XMLChangeEvent object.
XMLChangeEvent(XMLEditor xmled, org.w3c.dom.Element childNode, org.w3c.dom.Element parentNode, java.lang.String action)
          Constructs an XMLChangeEvent object.
XMLChangeEvent(XMLEditor xmled, org.w3c.dom.Element childNode, org.w3c.dom.Element parentNode, java.lang.String action, int childIndex)
          Constructs an XMLChangeEvent object.
XMLChangeEvent(XMLEditor xmled, org.w3c.dom.Element childNode, java.lang.String action)
          Constructs an XMLChangeEvent object, which is normally used to delete an Element from a Document.
XMLChangeEvent(XMLEditor xmled, org.w3c.dom.Element parentNode, java.lang.String[] attribNames, java.lang.String[] attribValues, java.lang.String[] oldAttribValues, java.lang.String action)
          Constructs an XMLChangeEvent object, which is normally used to modify some attributes of a particular element.
XMLChangeEvent(XMLEditor xmled, java.lang.String action)
          Constructs an XMLChangeEvent object, which is normally used only to notify that an XML modification was made, and what type.
 
Method Summary
 java.lang.String getAction()
          Returns the type of event.
 java.lang.String[] getAttributeNames()
          Returns a sequential list of attribute names and Element has.
 java.lang.String[] getAttributeValues()
          Returns a sequential list of attributes values of a particular element.
 int getChildIndex()
          Returns an integer value, of the hierarchical level of the child with respect to the parent element
 org.w3c.dom.Element getChildNode()
          Returns the child Element that this event is occuring on.
static int getIndexOfChild(org.w3c.dom.Node parent, org.w3c.dom.Node child)
          Static method that is used to determine the hierarchical level of the child Node with respect to the parent's Node
 org.w3c.dom.Element getNewChildNode()
           
 java.lang.String[] getOldAttribValues()
          Returns a sequential list of attributes values of a particular element that have been modified.
 org.w3c.dom.Element getParentNode()
          Returns the parent Element that this event is occurring on.
 java.util.Set<XMLChangeEvent> getSubEventList()
           
 XMLEditor getXMLEditor()
          Returns the timestamp of when this event occurred.
 void setSubEventList(java.util.Set<XMLChangeEvent> subEventList)
           
 
Methods inherited from class java.awt.AWTEvent
consume, getID, isConsumed, paramString, setSource, toString
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XMLChangeEvent

public XMLChangeEvent(XMLEditor xmled,
                      org.w3c.dom.Element childNode,
                      org.w3c.dom.Element parentNode,
                      java.lang.String action)
Constructs an XMLChangeEvent object.

Parameters:
xmled - the xml Editor reference from which event has occured
childNode - the child Element that the event is occuring on
parentNode - the parent Element that the action is occuring on
action - string identifying the event type

XMLChangeEvent

public XMLChangeEvent(XMLEditor xmled,
                      org.w3c.dom.Element parentNode,
                      org.w3c.dom.Element oldChildNode,
                      org.w3c.dom.Element newChildNode,
                      java.lang.String action)
Constructs an XMLChangeEvent object.

Parameters:
xmled - the xml Editor reference from which event has occured
childNode - the child Element that the event is occuring on
parentNode - the parent Element that the action is occuring on
action - string identifying the event type

XMLChangeEvent

public XMLChangeEvent(XMLEditor xmled,
                      org.w3c.dom.Element childNode,
                      org.w3c.dom.Element parentNode,
                      java.lang.String action,
                      int childIndex)
Constructs an XMLChangeEvent object.

Parameters:
xmled - the xml Editor reference from which event has occured
childNode - the child Element that the event is occuring on
parentNode - the parent Element that the action is occuring on
action - string identifying the event type
childIndex - hierarchical level of the child with respect to the parent

XMLChangeEvent

public XMLChangeEvent(XMLEditor xmled,
                      org.w3c.dom.Element childNode,
                      java.lang.String action)
Constructs an XMLChangeEvent object, which is normally used to delete an Element from a Document.

Parameters:
xmled - the xml Editor reference from which event has occured
childNode - the Element that the event is occuring on
action - string identifying the event type

XMLChangeEvent

public XMLChangeEvent(XMLEditor xmled,
                      org.w3c.dom.Element parentNode,
                      java.lang.String[] attribNames,
                      java.lang.String[] attribValues,
                      java.lang.String[] oldAttribValues,
                      java.lang.String action)
Constructs an XMLChangeEvent object, which is normally used to modify some attributes of a particular element.

Parameters:
xmled - the xml Editor reference from which event has occured
parentNode - the Element that the action is occuring on
attribNames - a sequential array of Names of the Attributes that need to be modified
attribValues - a sequential array of Values that will be placed when modified
oldAttribValues - a sequential array of old Attribute Values
action - string identifying the event type

XMLChangeEvent

public XMLChangeEvent(XMLEditor xmled,
                      java.lang.String action)
Constructs an XMLChangeEvent object, which is normally used only to notify that an XML modification was made, and what type.

Parameters:
xmled - the xml Editor reference from which event has occured
action - string identifying the event type
Method Detail

getIndexOfChild

public static int getIndexOfChild(org.w3c.dom.Node parent,
                                  org.w3c.dom.Node child)
Static method that is used to determine the hierarchical level of the child Node with respect to the parent's Node

Parameters:
parent - parent node
child - child node
Returns:
this Child's Index

getChildNode

public org.w3c.dom.Element getChildNode()
Returns the child Element that this event is occuring on. This is usually an Element that is being added, being deleted, or being modified.

Returns:
this event's Child Element

getParentNode

public org.w3c.dom.Element getParentNode()
Returns the parent Element that this event is occurring on. This is usually an Element that we are adding an element to, deleting an element from, or modifying a Element From.

Returns:
this event's Parent Element

getXMLEditor

public XMLEditor getXMLEditor()
Returns the timestamp of when this event occurred. Because an ActionEvent is a high-level, semantic event, the timestamp is typically the same as an underlying InputEvent.

Returns:
this event's timestamp
Since:
1.4

getAction

public java.lang.String getAction()
Returns the type of event. This can have one of four recognized types:

Further types can be specified later, although they must modify the XMLEditor's way of processing the event.

Returns:
this event's type

getAttributeValues

public java.lang.String[] getAttributeValues()
Returns a sequential list of attributes values of a particular element.

Returns:
a string array of string attribute values

getAttributeNames

public java.lang.String[] getAttributeNames()
Returns a sequential list of attribute names and Element has.

Returns:
a string array of string attribute names

getOldAttribValues

public java.lang.String[] getOldAttribValues()
Returns a sequential list of attributes values of a particular element that have been modified.

Returns:
an old set of attribute values.

getChildIndex

public int getChildIndex()
Returns an integer value, of the hierarchical level of the child with respect to the parent element

Returns:
this Child's Index

getNewChildNode

public org.w3c.dom.Element getNewChildNode()

getSubEventList

public java.util.Set<XMLChangeEvent> getSubEventList()

setSubEventList

public void setSubEventList(java.util.Set<XMLChangeEvent> subEventList)