com.waveset.object
Class FormItem

java.lang.Object
  extended bycom.waveset.util.AbstractXmlObject
      extended bycom.waveset.object.FormItem
All Implemented Interfaces:
com.sun.idm.debugger.common.Locatable, javax.naming.Referenceable, XmlObject
Direct Known Subclasses:
Form, Form.Expression, Form.Field, Form.FieldMap, Form.Loop, Form.Page, Form.Reference

public abstract class FormItem
extends AbstractXmlObject
implements com.sun.idm.debugger.common.Locatable


Field Summary
 
Fields inherited from class com.waveset.util.AbstractXmlObject
_trace, code_id
 
Constructor Summary
FormItem()
           
 
Method Summary
protected  void addCommonAttributes(java.lang.StringBuffer b)
          Should be called by all child classes of FormItem
 void addItem(FormItem item)
           
 void addItem(int index, FormItem item)
           
 void addItems(java.util.List items)
          Append a list of items.
 void clearItems()
           
 java.lang.String getComments()
           
 Form getForm()
           
protected  java.util.List getItemList()
          Implemented by subclasses, return a non-null List if it wishes to support sub-items.
 java.util.List getItems()
          Form items may also have children.
 com.sun.idm.debugger.common.Location getLocation()
           
 java.lang.String getName()
           
 FormItem getParent()
           
 void link(ExEnvironment env)
          Form items may contain expressions, and at the moment expressions need to be "linked" into an ExEnvironment in order to resolve references to variables and functions.
protected  void parseChild(org.w3c.dom.Element child, ExEnvironment env)
          Parse a common child element that wasn't recognized by the subclass.
protected  void parseCommonAttributes(org.w3c.dom.Element e)
          Should be called by all child classes of FormItem exception Expression
 void setComments(java.lang.String s)
           
 void setItems(java.util.List items)
          Set the list of items.
 void setLocation(com.sun.idm.debugger.common.Location l)
           
 void setName(java.lang.String s)
           
 void setParent(FormItem p)
           
protected  void toXmlChildren(java.lang.StringBuffer b, int indent)
           
 
Methods inherited from class com.waveset.util.AbstractXmlObject
addXmlHeader, cloneObject, dump, dumpFile, getElementName, getReference, println, setTrace, toIdentityString, toVerboseString, toVerboseString, toXml, toXml, toXml, toXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormItem

public FormItem()
Method Detail

getParent

public FormItem getParent()

setParent

public void setParent(FormItem p)

getComments

public java.lang.String getComments()

setComments

public void setComments(java.lang.String s)

getName

public java.lang.String getName()

setName

public void setName(java.lang.String s)

setLocation

public void setLocation(com.sun.idm.debugger.common.Location l)
Specified by:
setLocation in interface com.sun.idm.debugger.common.Locatable

getLocation

public com.sun.idm.debugger.common.Location getLocation()
Specified by:
getLocation in interface com.sun.idm.debugger.common.Locatable

getForm

public Form getForm()

getItems

public java.util.List getItems()
Form items may also have children.


getItemList

protected java.util.List getItemList()
Implemented by subclasses, return a non-null List if it wishes to support sub-items. This is so we can implement the usual item list insertion methods here. UPDATE: We now assume its ok to build the item list, if an item doesn't support sub-items, then the DTD should prevent that from parsing.


addItems

public void addItems(java.util.List items)
Append a list of items.


addItem

public void addItem(FormItem item)

addItem

public void addItem(int index,
                    FormItem item)

clearItems

public void clearItems()

link

public void link(ExEnvironment env)
Form items may contain expressions, and at the moment expressions need to be "linked" into an ExEnvironment in order to resolve references to variables and functions.


setItems

public void setItems(java.util.List items)
Set the list of items.


parseChild

protected void parseChild(org.w3c.dom.Element child,
                          ExEnvironment env)
                   throws WavesetException
Parse a common child element that wasn't recognized by the subclass.

Throws:
WavesetException

toXmlChildren

protected void toXmlChildren(java.lang.StringBuffer b,
                             int indent)

addCommonAttributes

protected void addCommonAttributes(java.lang.StringBuffer b)
Should be called by all child classes of FormItem


parseCommonAttributes

protected void parseCommonAttributes(org.w3c.dom.Element e)
                              throws WavesetException
Should be called by all child classes of FormItem exception Expression

Throws:
WavesetException