|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xoetrope.optional.data.XTableModelAdapter
public class XTableModelAdapter
Adapts an XModel to provide access to child nodes as a list. This class is intended to facilitate uses of tables and combo boxes or list components
Copyright: Copyright (c) Xoetrope Ltd., 1998-2003
License: see license.txt
$Revision: 2.2 $
License: see license.txt
| Constructor Summary | |
|---|---|
XTableModelAdapter()
Create a new adapter for a model node |
|
XTableModelAdapter(XModel src)
Create a new adapter for a model node |
|
| Method Summary | |
|---|---|
int |
find(java.lang.String key,
int keyColumnIdx)
Locate a key value in the underlying data source |
java.lang.Object |
get(int i)
Gets the individual list item value |
java.lang.Object |
get(int i,
int fieldIdx)
Gets the individual list item value |
XModel |
getModel()
Get the adapter source |
int |
getNumChildren()
Get the number of children that the model node has |
java.lang.Object |
getSelected()
Gets the value of the selected item from the list. |
java.lang.Object |
getSelected(int fieldIdx)
Gets the value of the selected item from the list. |
void |
set(java.lang.Object o)
Set the value of the listitem |
void |
setModel(XModel src)
Set the adapter source |
void |
setOutputField(int fieldIdx)
Set the field to return for lists; |
void |
sync()
Force a sync/update of the table |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XTableModelAdapter(XModel src)
src - the node to adaptpublic XTableModelAdapter()
| Method Detail |
|---|
public int getNumChildren()
getNumChildren in interface XModelAdapterpublic java.lang.Object get(int i)
get in interface XModelAdapteri - The index of the listitem
public java.lang.Object get(int i,
int fieldIdx)
i - The index of the listitemfieldIdx - the field index
public void set(java.lang.Object o)
set in interface XModelAdaptero - The new valuepublic java.lang.Object getSelected()
getSelected in interface XModelAdapterpublic java.lang.Object getSelected(int fieldIdx)
fieldIdx - the index (zero based) of the database table's field or column
public void setOutputField(int fieldIdx)
fieldIdx - the field index (zero based)public XModel getModel()
getModel in interface XModelAdapterpublic void setModel(XModel src)
setModel in interface XModelAdaptersrc - the model
public int find(java.lang.String key,
int keyColumnIdx)
key - the key to locatekeyColumnIdx - the index of the key column
public void sync()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||