com.virtualweaver.xotics.datamodel.event
Class XoContainerEvent

java.lang.Object
  extended byjava.util.EventObject
      extended bycom.virtualweaver.xotics.datamodel.event.XoContainerEvent
All Implemented Interfaces:
java.io.Serializable

public final class XoContainerEvent
extends java.util.EventObject

The event fired on XO container's children movements.

Version:
4.1
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
XoContainerEvent(XoContainer parent, XoObject child, int index)
          The constructor
 
Method Summary
 XoObject getChild()
          Returns the child involved in the add/remove process
 int getChildIndex()
          Returns the index of the child added or removed.
 XoContainer getContainer()
          Returns the container source of the event firing.
 
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
 

Constructor Detail

XoContainerEvent

public XoContainerEvent(XoContainer parent,
                        XoObject child,
                        int index)
The constructor

Parameters:
parent - the parent container responsible of firing this event. Method getSource() returns this object.
child - the child removed/added
index - the child index (new or old)
Method Detail

getChild

public XoObject getChild()
Returns the child involved in the add/remove process

Returns:
the child added or removed

getChildIndex

public int getChildIndex()
Returns the index of the child added or removed.

Returns:
the index where the child is added or removed

getContainer

public XoContainer getContainer()
Returns the container source of the event firing. The same object can be retrieved by calling getSource().

Returns:
the XO container currently or previously parent of the child