issrg.utils.gui.xml
Class NodeSelectionEvent

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

public class NodeSelectionEvent
extends java.awt.AWTEvent

An event which indicates that Selection has occured in a listbox. This is event generated when a user performs his selection in the NodeItemList, Listbox Component.

This is useful as the Listbox only stores strings, and not the desired string labels of XML Elements. Therefore when a selection occurs in a listbox, the event is fired to update the corresponding XML Element Selection.

The event is passed to every NodeSelectionListener object that is registered to receive such events using the component's addNodeChangeListener method.

The object that implements the NodeSelectionListener interface gets this NodeSelectionEvent when the event occurs.

Author:
Christian Azzopardi
See Also:
NodeSelectionListener, 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
NodeSelectionEvent(XMLEditor xmlED, java.lang.Object source, org.w3c.dom.Node selectedNode)
          Constructs an NodeSelectionEvent object.
 
Method Summary
 org.w3c.dom.Node getSelectedNode()
          Returns the currently selected Node
 void setSelectedNode(org.w3c.dom.Node selNode)
          Sets the newly selected node.
 
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

NodeSelectionEvent

public NodeSelectionEvent(XMLEditor xmlED,
                          java.lang.Object source,
                          org.w3c.dom.Node selectedNode)
Constructs an NodeSelectionEvent object.

Parameters:
xmlED - the xml Editor reference from which event has occured
source - the object where the event originated
selectedNode - the newly selected Node
Method Detail

setSelectedNode

public void setSelectedNode(org.w3c.dom.Node selNode)
Sets the newly selected node.

Parameters:
selNode - the newly Selected Node to set

getSelectedNode

public org.w3c.dom.Node getSelectedNode()
Returns the currently selected Node

Returns:
the currently selected Node