ilog.ds
Class TreeItemEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--ilog.ds.AbstractDSEvent
              |
              +--ilog.ds.TreeItemEvent
All Implemented Interfaces:
Serializable

public class TreeItemEvent
extends AbstractDSEvent

Event class used for all events happening on a tree item

See Also:
Serialized Form

Field Summary
protected  boolean _allowsChildren
           
protected  Object _item
           
protected  Object _parent
           
 
Fields inherited from class ilog.ds.AbstractDSEvent
_properties, _type, ADD, REMOVE, UPDATE
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
TreeItemEvent(Object source, Object item)
          Constructor to use when the item is being deleted.
TreeItemEvent(Object source, Object item, Map properties)
          Constructor to use for tree item updates
TreeItemEvent(Object source, Object parent, Object item, boolean allowsChildren, Map properties)
          Constructor to use for tree item creation
 
Method Summary
 boolean getAllowsChildren()
          Use this method to know whether the node is allowed to have children or not.
 Object getItem()
          Gets the item (to be used only as a key).
 Object getParent()
          Gets the parent of the item (to be used only as a key).
 
Methods inherited from class ilog.ds.AbstractDSEvent
getProperties, getType
 
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

_parent

protected Object _parent

_item

protected Object _item

_allowsChildren

protected boolean _allowsChildren
Constructor Detail

TreeItemEvent

public TreeItemEvent(Object source,
                     Object parent,
                     Object item,
                     boolean allowsChildren,
                     Map properties)
Constructor to use for tree item creation
Parameters:
source - The first parameter is the source of the event.
parent - item The owner of the new item. Can be null for a root item.
item - The item itself. Can be anything, as it is only used as a key.
properties - Contains the named properties of the node, that is, all the properties defining the item.

TreeItemEvent

public TreeItemEvent(Object source,
                     Object item,
                     Map properties)
Constructor to use for tree item updates
Parameters:
source - The first parameter is the source of the event.
item - The item itself. Can be anything, as it is only used as a key.
properties - Contains the named properties of the item, that is, all the modified properties.

TreeItemEvent

public TreeItemEvent(Object source,
                     Object item)
Constructor to use when the item is being deleted.
Method Detail

getParent

public Object getParent()
Gets the parent of the item (to be used only as a key). Can return null when the item created is the root item. Also returns null when an item gets updated or deleted.
Returns:
The parent of the item

getItem

public Object getItem()
Gets the item (to be used only as a key).
Returns:
the subject of this event

getAllowsChildren

public boolean getAllowsChildren()
Use this method to know whether the node is allowed to have children or not.
Returns:
true if the node allows children, or false otherwise.