org.formaria.editor.builder
Class FormInfoTreeTableAdapter

java.lang.Object
  extended by org.formaria.aria.data.DataModel
      extended by org.formaria.editor.builder.FormInfoTreeTableAdapter

public class FormInfoTreeTableAdapter
extends DataModel


Field Summary
 
Fields inherited from class org.formaria.aria.data.DataModel
parentModel, tagName
 
Constructor Summary
FormInfoTreeTableAdapter(java.util.List<java.lang.String> aPropertyList, java.util.Map<java.lang.String,java.lang.Object> aFieldProperties)
           
 
Method Summary
 void append(DataModel arg0)
          Append a node
 java.lang.Object append(java.lang.String arg0)
          Append a new node with the specified name.
 java.lang.Object get()
          gets the value attribute
 DataModel get(int idx)
          Get the DataModel at element i
 java.lang.String getAttribName(int idx)
          Retrieve the name of the attribute at the specified index
 int getAttribute(java.lang.String arg0)
          returns the index of the attribiteNames array whose value is the same as the attribName
 java.lang.Object getAttribValue(int idx)
          Retrieve the value of the attribute at the specified index and return it.
 double getAttribValueAsDouble(int arg0)
          Retrieve the value of the attribute at the specified index, convert it to a double and return it.
 double getAttribValueAsDouble(int arg0, char arg1, char arg2)
          Convert the attribute at the specified index to a double and return it
 int getAttribValueAsInt(int arg0)
          Retrieve the value of the attribute at the specified index, convert it to an int and return it.
 java.lang.String getAttribValueAsString(int idx)
          Retrieve the value of the attribute at the specified index, convert it to a String and return it.
 java.lang.String getId()
          Gets the value of the ID attribute
 int getNumAttributes()
          Gets the number of attributes of this node
 int getNumChildren()
          Gets the number of immediate children of this node
 double getValueAsDouble(java.lang.String arg0)
          Retrieve the named child, convert it's value to a double and return it.
 int getValueAsInt(java.lang.String arg0)
          Retrieve the named child, convert it's value to an int and return it.
 java.lang.String getValueAsString(java.lang.String arg0)
          Retrieve the named child, convert it's value to a String and return it.
 int hashCode()
          Get a hash code for the node.
 void set(java.lang.Object arg0)
          Sets the model value
 void set(java.lang.String arg0, java.lang.Object arg1)
          Set the named attribute value of this DataModel node.
 void setAttribValue(int idx, java.lang.Object value)
          Sets the attribute value
 void setAttribValue(int arg0, java.lang.String arg1, java.lang.Object arg2)
          Sets the attribute name and value
 
Methods inherited from class org.formaria.aria.data.DataModel
addModelListener, clear, fireModelUpdated, get, getParent, getTagName, hasAutoId, hasAutoId, prefixOutputPath, removeChildren, reset, resetAttributes, setId, setNumAttributes, setNumChildren, setParent, setTagName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormInfoTreeTableAdapter

public FormInfoTreeTableAdapter(java.util.List<java.lang.String> aPropertyList,
                                java.util.Map<java.lang.String,java.lang.Object> aFieldProperties)
Method Detail

getId

public java.lang.String getId()
Description copied from class: DataModel
Gets the value of the ID attribute

Specified by:
getId in class DataModel
Returns:
the ID attribute

set

public void set(java.lang.String arg0,
                java.lang.Object arg1)
Description copied from class: DataModel
Set the named attribute value of this DataModel node. If the attribName is null then this node's value is updated.

Specified by:
set in class DataModel
Parameters:
arg0 - The path to the DataModel in the format 'base/foo
arg1 - The new value of the DataModel

getAttribute

public int getAttribute(java.lang.String arg0)
Description copied from class: DataModel
returns the index of the attribiteNames array whose value is the same as the attribName

Specified by:
getAttribute in class DataModel
Parameters:
arg0 - The name of the attribute we are trying to locate
Returns:
The index of the attributeNames array containg the name

getAttribValueAsString

public java.lang.String getAttribValueAsString(int idx)
Description copied from class: DataModel
Retrieve the value of the attribute at the specified index, convert it to a String and return it.

Specified by:
getAttribValueAsString in class DataModel
Parameters:
idx - The index of the attributeValues array whose value we want
Returns:
The string value of the attributeValues array at position i

setAttribValue

public void setAttribValue(int idx,
                           java.lang.Object value)
Description copied from class: DataModel
Sets the attribute value

Specified by:
setAttribValue in class DataModel
Parameters:
idx - The index of the attributeValues array whose value we want
value - the value object

getAttribValue

public java.lang.Object getAttribValue(int idx)
Description copied from class: DataModel
Retrieve the value of the attribute at the specified index and return it.

Specified by:
getAttribValue in class DataModel
Parameters:
idx - The index of the attributeValues array whose value we want
Returns:
The string value of the attributeValues array at position i

setAttribValue

public void setAttribValue(int arg0,
                           java.lang.String arg1,
                           java.lang.Object arg2)
Description copied from class: DataModel
Sets the attribute name and value

Specified by:
setAttribValue in class DataModel
Parameters:
arg0 - The index of the attributeValues array whose value we want
arg1 - the name of the attribute
arg2 - the value object

get

public DataModel get(int idx)
Description copied from class: DataModel
Get the DataModel at element i

Specified by:
get in class DataModel
Parameters:
idx - The index of the values array
Returns:
The DataModel at location i

getNumChildren

public int getNumChildren()
Description copied from class: DataModel
Gets the number of immediate children of this node

Overrides:
getNumChildren in class DataModel
Returns:
the number of child nodes

get

public java.lang.Object get()
Description copied from class: DataModel
gets the value attribute

Specified by:
get in class DataModel
Returns:
the value of the model

set

public void set(java.lang.Object arg0)
Description copied from class: DataModel
Sets the model value

Specified by:
set in class DataModel
Parameters:
arg0 - the new value

getAttribName

public java.lang.String getAttribName(int idx)
Description copied from class: DataModel
Retrieve the name of the attribute at the specified index

Specified by:
getAttribName in class DataModel
Parameters:
idx - The index of the attributeNames array whose value we want
Returns:
The string value of the attributeNames array at position i

getNumAttributes

public int getNumAttributes()
Description copied from class: DataModel
Gets the number of attributes of this node

Overrides:
getNumAttributes in class DataModel
Returns:
the number of attributes

getAttribValueAsDouble

public double getAttribValueAsDouble(int arg0)
Description copied from class: DataModel
Retrieve the value of the attribute at the specified index, convert it to a double and return it.

Specified by:
getAttribValueAsDouble in class DataModel
Parameters:
arg0 - The index of the attributeValues array whose value we want
Returns:
The double value of the attributeValues array at position i

getAttribValueAsDouble

public double getAttribValueAsDouble(int arg0,
                                     char arg1,
                                     char arg2)
Description copied from class: DataModel
Convert the attribute at the specified index to a double and return it

Specified by:
getAttribValueAsDouble in class DataModel
Parameters:
arg0 - The index of the attributeValues array whose value we want
arg1 - the decimal separator
arg2 - the grouping (thousands) separator
Returns:
The double value of the attributeValues array at position i

getAttribValueAsInt

public int getAttribValueAsInt(int arg0)
Description copied from class: DataModel
Retrieve the value of the attribute at the specified index, convert it to an int and return it.

Specified by:
getAttribValueAsInt in class DataModel
Parameters:
arg0 - The index of the attributeValues array whose value we want
Returns:
The int value of the attributeValues array at position i

getValueAsDouble

public double getValueAsDouble(java.lang.String arg0)
Description copied from class: DataModel
Retrieve the named child, convert it's value to a double and return it.

Specified by:
getValueAsDouble in class DataModel
Parameters:
arg0 - The name of the child whose value is required
Returns:
the value as a double

getValueAsInt

public int getValueAsInt(java.lang.String arg0)
Description copied from class: DataModel
Retrieve the named child, convert it's value to an int and return it.

Specified by:
getValueAsInt in class DataModel
Parameters:
arg0 - The name of the child to be retrieved
Returns:
the value as an int

getValueAsString

public java.lang.String getValueAsString(java.lang.String arg0)
Description copied from class: DataModel
Retrieve the named child, convert it's value to a String and return it.

Specified by:
getValueAsString in class DataModel
Parameters:
arg0 - The name of the child whose value is required
Returns:
the value as a string

hashCode

public int hashCode()
Description copied from class: DataModel
Get a hash code for the node.

Specified by:
hashCode in class DataModel
Returns:
the node's hash code

append

public void append(DataModel arg0)
Description copied from class: DataModel
Append a node

Specified by:
append in class DataModel
Parameters:
arg0 - the child node

append

public java.lang.Object append(java.lang.String arg0)
Description copied from class: DataModel
Append a new node with the specified name. This method does not replace any existing nodes.

Specified by:
append in class DataModel
Parameters:
arg0 - The immediate path to the DataModel required
Returns:
The value of the DataModel or the attribute