|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.virtualweaver.xotics.datamodel.XoObjectSupport
com.virtualweaver.xotics.datamodel.XoContainerSupport
This is a default XoContainer
implementation developpers can use, by derivation, to increase productivity
when an XoContainer implementation has no requirement to derive from any specific Java object.
Field Summary | |
protected XoContainerEventSupport |
containerEventSupport
container event support object, usable by derived object from this |
Fields inherited from class com.virtualweaver.xotics.datamodel.XoObjectSupport |
propertyChangeSupport, vetoableChangeSupport |
Constructor Summary | |
XoContainerSupport()
Empty param constructor, as required in JavaBeans specs. |
Method Summary | |
int |
addXoChild(XoObject child,
int index)
Adds an XO Object as child, at index specified by index param. |
void |
addXoContainerListener(XoContainerListener listener)
Adds a listener of XoContainerEvent . |
java.lang.Object |
clone()
Updated from XoObject.clone() to clone this container |
XoObject[] |
getXoChildren()
Returns the XO children objects as an XoObject array. |
XoObject |
getXoChildren(int index)
Returns the XO child object standing at index position. |
int |
getXoChildrenCount()
Returns the number of children of this XO Container. |
XoContainerListener[] |
getXoContainerListeners()
Returns the registered listeners of XoContainerEvent fired for this container.
|
XoContentModel |
getXoContentModel()
This method returns null, as there is no content-model defined here. |
boolean |
isXoObjectWelcome(XoObject maybeChild,
int index)
This method returns allways true and so should be overriden to perform specific checks |
XoObject |
removeXoChild(int index)
Removes the child at the index position from the list of children. |
void |
removeXoContainerListener(XoContainerListener listener)
Removes a listener of XoContainerEvent previously added by corresponding add method. |
Methods inherited from class com.virtualweaver.xotics.datamodel.XoObjectSupport |
addPropertyChangeListener, addVetoableChangeListener, checkXoValidity, clone, equalsXoObject, getLocale, getXmlLocalName, getXmlNameSpace, getXmlWhiteSpace, getXoDMInstance, getXoParent, isXoPropertyToWrite, removePropertyChangeListener, removeVetoableChangeListener, setIntegrated, setLocale, setXmlLocalName, setXmlNameSpace, setXmlWhiteSpace, setXoDMInstance, setXoParent, toString |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.virtualweaver.xotics.datamodel.XoObject |
addPropertyChangeListener, addVetoableChangeListener, checkXoValidity, equalsXoObject, getLocale, getXmlLocalName, getXmlNameSpace, getXmlWhiteSpace, getXoDMInstance, getXoParent, isXoPropertyToWrite, removePropertyChangeListener, removeVetoableChangeListener, setIntegrated, setLocale, setXmlLocalName, setXmlNameSpace, setXmlWhiteSpace, setXoDMInstance, setXoParent |
Field Detail |
protected XoContainerEventSupport containerEventSupport
Constructor Detail |
public XoContainerSupport()
Method Detail |
public XoObject getXoChildren(int index) throws java.lang.ArrayIndexOutOfBoundsException
XoContainer
getXoChildren
in interface XoContainer
index
- the position where resides the object to get
java.lang.ArrayIndexOutOfBoundsException
- when the index param is invalidXoContainer.getXoChildren(int)
public XoObject[] getXoChildren()
XoContainer
XoObject
array.
getXoChildren
in interface XoContainer
XoContainer.getXoChildren()
public XoContentModel getXoContentModel()
getXoContentModel
in interface XoContainer
XoContainer.getXoContentModel()
public int addXoChild(XoObject child, int index) throws XoException
XoContainer
index
param. It is allowed for index to be
equal to -1 or XoContainer.getXoChildrenCount()
: these both values indicate to append child
at the end of current children list.
addXoChild
in interface XoContainer
child
- the XO object to add as new childindex
- position in children list where to add child :
-1 and getXoChildrenCount()
are valid indexes.
XoException
- when :
XoContainer.addXoChild(com.virtualweaver.xotics.datamodel.XoObject, int)
public void addXoContainerListener(XoContainerListener listener)
XoContainer
XoContainerEvent
. Such event is fired by an XoDMInstance
after a complete add/remove child process.
addXoContainerListener
in interface XoContainer
listener
- a listener of type XoContainerListener
to addXoContainer.addXoContainerListener(XoContainerListener)
public void removeXoContainerListener(XoContainerListener listener)
XoContainer
XoContainerEvent
previously added by corresponding add method.
removeXoContainerListener
in interface XoContainer
listener
- a listener of type XoContainerListener
to removeXoContainer.removeXoContainerListener(XoContainerListener)
public XoContainerListener[] getXoContainerListeners()
XoContainer
XoContainerEvent
fired for this container.
The event fire process is managed by XoDMInstance
owner of this container.
So, it needs to get the list of listeners on this container object.
getXoContainerListeners
in interface XoContainer
XoContainerEvent
registered for this containerXoContainer.getXoContainerListeners()
public int getXoChildrenCount()
XoContainer
getXoChildrenCount
in interface XoContainer
XoContainer.getXoChildrenCount()
public boolean isXoObjectWelcome(XoObject maybeChild, int index)
isXoObjectWelcome
in interface XoContainer
maybeChild
- the object to check whether it can be addedindex
- the index where willing to add maybeChild
XoContainer.isXoObjectWelcome(XoObject, int)
public XoObject removeXoChild(int index) throws java.lang.ArrayIndexOutOfBoundsException
XoContainer
removeXoChild
in interface XoContainer
index
- position where the child to remove resides
java.lang.ArrayIndexOutOfBoundsException
- if there is no child at the specified indexXoContainer.removeXoChild(int)
public java.lang.Object clone()
XoObject.clone()
to clone this container
clone
in interface XoObject
clone
in class XoObjectSupport
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |