|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface must be implemented for every Xotics Object representing an XML element which can have children elements.
Method Summary | |
int |
addXoChild(XoObject child,
int index)
Adds an XO Object as child, at index specified by index param. |
void |
addXoContainerListener(XoContainerListener l)
Adds a listener of XoContainerEvent . |
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()
Returns this children Content Model. |
boolean |
isXoObjectWelcome(XoObject maybeChild,
int index)
This method can be called before adding an XO object to know if it can be added at the specified index. |
XoObject |
removeXoChild(int index)
Removes the child at the index position from the list of children. |
void |
removeXoContainerListener(XoContainerListener l)
Removes a listener of XoContainerEvent previously added by corresponding add method. |
Methods inherited from interface com.virtualweaver.xotics.datamodel.XoObject |
addPropertyChangeListener, addVetoableChangeListener, checkXoValidity, clone, equalsXoObject, getLocale, getXmlLocalName, getXmlNameSpace, getXmlWhiteSpace, getXoDMInstance, getXoParent, isXoPropertyToWrite, removePropertyChangeListener, removeVetoableChangeListener, setIntegrated, setLocale, setXmlLocalName, setXmlNameSpace, setXmlWhiteSpace, setXoDMInstance, setXoParent |
Method Detail |
public int addXoChild(XoObject child, int index) throws XoException
index
param. It is allowed for index to be
equal to -1 or getXoChildrenCount()
: these both values indicate to append child
at the end of current children list.
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 :
public XoObject removeXoChild(int index) throws java.lang.ArrayIndexOutOfBoundsException
index
- position where the child to remove resides
java.lang.ArrayIndexOutOfBoundsException
- if there is no child at the specified indexpublic int getXoChildrenCount()
public XoObject[] getXoChildren()
XoObject
array.
public XoObject getXoChildren(int index) throws java.lang.ArrayIndexOutOfBoundsException
index
- the position where resides the object to get
java.lang.ArrayIndexOutOfBoundsException
- when the index param is invalidpublic XoContentModel getXoContentModel()
XoContentModel
root or null if content model must be got from Data-Model definitionXoContentModel
public boolean isXoObjectWelcome(XoObject maybeChild, int index)
XoException
when directly adding an XO object.
This method must not be confused with XoObject.checkXoValidity()
; isXoObjectWelcome()
should only perform a few checks about validity of index and XO object params from implementation point
of view : for example, if the child to add is of a particular Java class, or if the index has a valid value.
maybeChild
- the object to check whether it can be addedindex
- the index where willing to add maybeChild
public void addXoContainerListener(XoContainerListener l)
XoContainerEvent
. Such event is fired by an XoDMInstance
after a complete add/remove child process.
l
- a listener of type XoContainerListener
to addXoContainerListener
public void removeXoContainerListener(XoContainerListener l)
XoContainerEvent
previously added by corresponding add method.
l
- a listener of type XoContainerListener
to removeXoContainerListener
public XoContainerListener[] getXoContainerListeners()
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.
XoContainerEvent
registered for this containerXoContainerListener
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |