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
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). |
_parent
protected Object _parent
_item
protected Object _item
_allowsChildren
protected boolean _allowsChildren
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.
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.