|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.formaria.aria.data.DataModel
org.formaria.aria.data.table.FieldModel
public class FieldModel
Provides a model for table field. The field will have no children. As a Java object the fields and rows indices are zero based in contrast to the JDBC indexing setup.
The class is not intended to be used directly except in rare circumstances, instead most access will be via the model and bindings or via the TableModel class
Copyright (c) Formaria Ltd. 2008
$Revision: 2.2 $ License: see license.txt
| Field Summary | |
|---|---|
protected int |
fieldIdx
|
protected int |
rowIdx
|
protected TableModel |
sourceData
|
| Fields inherited from class org.formaria.aria.data.DataModel |
|---|
parentModel, tagName |
| Constructor Summary | |
|---|---|
FieldModel()
Create a new field model node |
|
FieldModel(TableModel table,
int row,
int field)
Create a new field model node |
|
| Method Summary | |
|---|---|
void |
append(DataModel newObject)
This method is required by the DataModel interface but in this case it is not implemented as it is inappropriate in the context of the class |
java.lang.Object |
append(java.lang.String id)
This method does not nothing it is provided merely as an implementation of the DataModel interface. |
java.lang.Object |
get()
Get the field value |
DataModel |
get(int i)
Not yet implemented - does nothing |
java.lang.String |
getAttribName(int i)
This method is required by the DataModel interface but in this case it is not implemented as it is inappropriate in the context of the class |
int |
getAttribute(java.lang.String attribName)
This method is required by the DataModel interface but in this case it is not implemented as it is inappropriate in the context of the class |
java.lang.Object |
getAttribValue(int i)
This method is required by the DataModel interface but in this case it is not implemented as it is inappropriate in the context of the class |
double |
getAttribValueAsDouble(int i)
Deprecated. use getAttribValueAsDouble( i, decimalSeparator, groupingSeparator ) instead, if the locale is different from the locale used to write the values to the model, then the parsed value may be incorrect. |
double |
getAttribValueAsDouble(int i,
char decimalSeparator,
char groupingSeparator)
Convert the attribute at the specified index to a double and return it |
int |
getAttribValueAsInt(int i)
Gets the field value as an int |
java.lang.String |
getAttribValueAsString(int i)
This method is required by the DataModel interface but in this case it is not implemented as it is inappropriate in the context of the class |
int |
getFieldIndex()
Get the index of this fiels |
java.lang.String |
getId()
This method is required by the DataModel interface but in this case it is not implemented as it is inappropriate in the context of the class |
TableModel |
getTable()
Get the referenced table model |
java.lang.String |
getTagName()
Gets the model element tag name, e.g. |
java.lang.String |
getValue()
Gets the value of the field |
double |
getValueAsDouble(java.lang.String elementName)
This method is required by the DataModel interface but in this case it is not implemented as it is inappropriate in the context of the class |
int |
getValueAsInt(java.lang.String elementName)
This method is required by the DataModel interface but in this case it is not implemented as it is inappropriate in the context of the class |
java.lang.String |
getValueAsString(java.lang.String elementName)
Gets the value attribute of the specified node as a string. |
int |
hashCode()
Returns a hashcode for this node |
void |
remove(DataModel model)
Not yet implemented - does nothing |
void |
set(java.lang.Object s)
Sets the model value |
void |
set(java.lang.String attribName,
java.lang.Object newObject)
Set the value of the DataModel located at the elementName |
void |
setAttribValue(int i,
java.lang.Object value)
Not yet implemented - does nothing |
void |
setAttribValue(int i,
java.lang.String attribName,
java.lang.Object value)
Not yet implemented - does nothing |
void |
setCellReference(TableModel table,
int row,
int field)
Set the reference to the field to which this node will refer |
java.lang.String |
toString()
Gets the value as a string |
| Methods inherited from class org.formaria.aria.data.DataModel |
|---|
addModelListener, clear, fireModelUpdated, get, getNumAttributes, getNumChildren, getParent, hasAutoId, hasAutoId, prefixOutputPath, removeChildren, reset, resetAttributes, setId, setNumAttributes, setNumChildren, setParent, setTagName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int rowIdx
protected int fieldIdx
protected TableModel sourceData
| Constructor Detail |
|---|
public FieldModel()
public FieldModel(TableModel table,
int row,
int field)
table - the table modelrow - the row indexfield - the field index| Method Detail |
|---|
public TableModel getTable()
public int getFieldIndex()
public void setCellReference(TableModel table,
int row,
int field)
table - the table that contains the datarow - the row indexfield - the field indexpublic void append(DataModel newObject)
This method is required by the DataModel interface but in this case it is not implemented as it is inappropriate in the context of the class
append in class DataModelnewObject - ignoredpublic double getValueAsDouble(java.lang.String elementName)
This method is required by the DataModel interface but in this case it is not implemented as it is inappropriate in the context of the class
getValueAsDouble in class DataModelelementName - ignored
public java.lang.String getValue()
public java.lang.Object getAttribValue(int i)
This method is required by the DataModel interface but in this case it is not implemented as it is inappropriate in the context of the class
getAttribValue in class DataModeli - ignored
public java.lang.String getAttribValueAsString(int i)
This method is required by the DataModel interface but in this case it is not implemented as it is inappropriate in the context of the class
getAttribValueAsString in class DataModeli - ignored
public java.lang.String getValueAsString(java.lang.String elementName)
This method is required by the DataModel interface but in this case it is not implemented as it is inappropriate in the context of the class
getValueAsString in class DataModelelementName - ignored
public java.lang.String getId()
This method is required by the DataModel interface but in this case it is not implemented as it is inappropriate in the context of the class
getId in class DataModelpublic java.lang.String getAttribName(int i)
This method is required by the DataModel interface but in this case it is not implemented as it is inappropriate in the context of the class
getAttribName in class DataModeli - ignored
public int getAttribute(java.lang.String attribName)
This method is required by the DataModel interface but in this case it is not implemented as it is inappropriate in the context of the class
getAttribute in class DataModelattribName - ignored
public void set(java.lang.String attribName,
java.lang.Object newObject)
set in class DataModelattribName - The path to the DataModel in the format 'base/foonewObject - The new value of the DataModelpublic void set(java.lang.Object s)
set in class DataModels - the new valuepublic void remove(DataModel model)
model - - ignoredpublic DataModel get(int i)
get in class DataModeli - - ignored
public java.lang.Object append(java.lang.String id)
append in class DataModelid - the node id
public java.lang.String getTagName()
getTagName in class DataModelpublic java.lang.Object get()
get in class DataModelpublic int getValueAsInt(java.lang.String elementName)
This method is required by the DataModel interface but in this case it is not implemented as it is inappropriate in the context of the class
getValueAsInt in class DataModelelementName - ignored
public void setAttribValue(int i,
java.lang.Object value)
setAttribValue in class DataModeli - ignoredvalue - ignored
public void setAttribValue(int i,
java.lang.String attribName,
java.lang.Object value)
setAttribValue in class DataModeli - - ignoredattribName - - ignoredvalue - - ignoredpublic int hashCode()
hashCode in class DataModelpublic int getAttribValueAsInt(int i)
getAttribValueAsInt in class DataModeli - The index of the attributeValues array whose value we want
public double getAttribValueAsDouble(int i)
getAttribValueAsDouble in class DataModeli - The index of the attributeValues array whose value we want
public double getAttribValueAsDouble(int i,
char decimalSeparator,
char groupingSeparator)
getAttribValueAsDouble in class DataModeli - The index of the attributeValues array whose value we wantdecimalSeparator - the decimal separatorgroupingSeparator - the grouping (thousands) separator
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||