|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xoetrope.xui.data.XModel
net.xoetrope.xui.data.table.XFieldModel
public class XFieldModel
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 XTableModel class
Copyright (c) Xoetrope Ltd. 2001-2003
$Revision: 2.2 $ License: see license.txt
| Field Summary | |
|---|---|
protected int |
fieldIdx
|
protected int |
rowIdx
|
protected XTableModel |
sourceData
|
| Fields inherited from class net.xoetrope.xui.data.XModel |
|---|
parentModel, tagName |
| Constructor Summary | |
|---|---|
XFieldModel()
Create a new field model node |
|
XFieldModel(XTableModel table,
int row,
int field)
Create a new field model node |
|
| Method Summary | |
|---|---|
java.lang.Object |
append(java.lang.String id)
This method does not nothing it is provided merely as an implementation of the XModel interface. |
void |
append(XModel newObject)
This method is required by the XModel interface but in this case it is not implemented as it is inappropriate in the context of the class |
java.lang.Object |
get()
Get the field value |
XModel |
get(int i)
Not yet implemented - does nothing |
java.lang.String |
getAttribName(int i)
This method is required by the XModel 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 XModel 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 XModel 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 XModel 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 XModel interface but in this case it is not implemented as it is inappropriate in the context of the class |
XTableModel |
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 XModel 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 XModel 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(XModel 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 XModel 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(XTableModel 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 net.xoetrope.xui.data.XModel |
|---|
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 XTableModel sourceData
| Constructor Detail |
|---|
public XFieldModel()
public XFieldModel(XTableModel table,
int row,
int field)
table - the table modelrow - the row indexfield - the field index| Method Detail |
|---|
public XTableModel getTable()
public int getFieldIndex()
public void setCellReference(XTableModel table,
int row,
int field)
table - the table that contains the datarow - the row indexfield - the field indexpublic void append(XModel newObject)
This method is required by the XModel interface but in this case it is not implemented as it is inappropriate in the context of the class
append in class XModelnewObject - ignoredpublic double getValueAsDouble(java.lang.String elementName)
This method is required by the XModel interface but in this case it is not implemented as it is inappropriate in the context of the class
getValueAsDouble in class XModelelementName - ignored
public java.lang.String getValue()
public java.lang.Object getAttribValue(int i)
This method is required by the XModel interface but in this case it is not implemented as it is inappropriate in the context of the class
getAttribValue in class XModeli - ignored
public java.lang.String getAttribValueAsString(int i)
This method is required by the XModel interface but in this case it is not implemented as it is inappropriate in the context of the class
getAttribValueAsString in class XModeli - ignored
public java.lang.String getValueAsString(java.lang.String elementName)
This method is required by the XModel interface but in this case it is not implemented as it is inappropriate in the context of the class
getValueAsString in class XModelelementName - ignored
public java.lang.String getId()
This method is required by the XModel interface but in this case it is not implemented as it is inappropriate in the context of the class
getId in class XModelpublic java.lang.String getAttribName(int i)
This method is required by the XModel interface but in this case it is not implemented as it is inappropriate in the context of the class
getAttribName in class XModeli - ignored
public int getAttribute(java.lang.String attribName)
This method is required by the XModel interface but in this case it is not implemented as it is inappropriate in the context of the class
getAttribute in class XModelattribName - ignored
public void set(java.lang.String attribName,
java.lang.Object newObject)
set in class XModelattribName - The path to the XModel in the format 'base/foonewObject - The new value of the XModelpublic void set(java.lang.Object s)
set in class XModels - the new valuepublic void remove(XModel model)
model - - ignoredpublic XModel get(int i)
get in class XModeli - - ignored
public java.lang.Object append(java.lang.String id)
append in class XModelid - the node id
public java.lang.String getTagName()
getTagName in class XModelpublic java.lang.Object get()
get in class XModelpublic int getValueAsInt(java.lang.String elementName)
This method is required by the XModel interface but in this case it is not implemented as it is inappropriate in the context of the class
getValueAsInt in class XModelelementName - ignored
public void setAttribValue(int i,
java.lang.Object value)
setAttribValue in class XModeli - ignoredvalue - ignored
public void setAttribValue(int i,
java.lang.String attribName,
java.lang.Object value)
setAttribValue in class XModeli - - ignoredattribName - - ignoredvalue - - ignoredpublic int hashCode()
hashCode in class XModelpublic int getAttribValueAsInt(int i)
getAttribValueAsInt in class XModeli - The index of the attributeValues array whose value we want
public double getAttribValueAsDouble(int i)
getAttribValueAsDouble in class XModeli - The index of the attributeValues array whose value we want
public double getAttribValueAsDouble(int i,
char decimalSeparator,
char groupingSeparator)
getAttribValueAsDouble in class XModeli - 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 | |||||||||