uk.ac.essex.xul.castor
Class Xul

java.lang.Object
  extended by uk.ac.essex.xul.castor.Xul
All Implemented Interfaces:
java.io.Serializable

public class Xul
extends java.lang.Object
implements java.io.Serializable

Class Xul.

See Also:
Serialized Form

Constructor Summary
Xul()
           
 
Method Summary
 void addPanel(int index, Panel vPanel)
           
 void addPanel(Panel vPanel)
           
 java.util.Enumeration<? extends Panel> enumeratePanel()
          Method enumeratePanel.
 Panel[] getPanel()
          Method getPanel.Returns the contents of the collection in an Array.
 Panel getPanel(int index)
          Method getPanel.
 int getPanelCount()
          Method getPanelCount.
 boolean isValid()
          Method isValid.
 java.util.Iterator<? extends Panel> iteratePanel()
          Method iteratePanel.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void removeAllPanel()
           
 boolean removePanel(Panel vPanel)
          Method removePanel.
 Panel removePanelAt(int index)
          Method removePanelAt.
 void setPanel(int index, Panel vPanel)
           
 void setPanel(Panel[] vPanelArray)
           
static Xul unmarshal(java.io.Reader reader)
          Method unmarshal.
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Xul

public Xul()
Method Detail

addPanel

public void addPanel(Panel vPanel)
              throws java.lang.IndexOutOfBoundsException
Parameters:
vPanel -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addPanel

public void addPanel(int index,
                     Panel vPanel)
              throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vPanel -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumeratePanel

public java.util.Enumeration<? extends Panel> enumeratePanel()
Method enumeratePanel.

Returns:
an Enumeration over all possible elements of this collection

getPanel

public Panel getPanel(int index)
               throws java.lang.IndexOutOfBoundsException
Method getPanel.

Parameters:
index -
Returns:
the value of the uk.ac.essex.xul.castor.Panel at the given index
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getPanel

public Panel[] getPanel()
Method getPanel.Returns the contents of the collection in an Array.

Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.

Returns:
this collection as an Array

getPanelCount

public int getPanelCount()
Method getPanelCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

Returns:
true if this object is valid according to the schema

iteratePanel

public java.util.Iterator<? extends Panel> iteratePanel()
Method iteratePanel.

Returns:
an Iterator over all possible elements in this collection

marshal

public void marshal(java.io.Writer out)
             throws org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
out -
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

marshal

public void marshal(org.xml.sax.ContentHandler handler)
             throws java.io.IOException,
                    org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
handler -
Throws:
java.io.IOException - if an IOException occurs during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling

removeAllPanel

public void removeAllPanel()

removePanel

public boolean removePanel(Panel vPanel)
Method removePanel.

Parameters:
vPanel -
Returns:
true if the object was removed from the collection.

removePanelAt

public Panel removePanelAt(int index)
Method removePanelAt.

Parameters:
index -
Returns:
the element removed from the collection

setPanel

public void setPanel(int index,
                     Panel vPanel)
              throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vPanel -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setPanel

public void setPanel(Panel[] vPanelArray)
Parameters:
vPanelArray -

unmarshal

public static Xul unmarshal(java.io.Reader reader)
                     throws org.exolab.castor.xml.MarshalException,
                            org.exolab.castor.xml.ValidationException
Method unmarshal.

Parameters:
reader -
Returns:
the unmarshaled uk.ac.essex.xul.castor.Xul
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

validate

public void validate()
              throws org.exolab.castor.xml.ValidationException
Throws:
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema