|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.formaria.aria.data.ListModelAdapter
public class ListModelAdapter
Adapts an DataModel to provide access to child nodes as a list in a way that is more convenient for use with UI components and so that some state information can be maintained.
Copyright: Copyright (c) Formaria Ltd., 2008
License: see license.txt
| Field Summary | |
|---|---|
protected int |
columnIdx
|
protected java.lang.String |
columnName
|
protected DataModel |
model
|
| Constructor Summary | |
|---|---|
ListModelAdapter()
Constructs a new adapter. |
|
ListModelAdapter(DataModel src)
Constructs a new adapter for the specified model node. |
|
| Method Summary | |
|---|---|
int |
find(java.lang.String key,
int columnIdx)
Locate a key value in the underlying data source |
java.lang.Object |
get(int i)
Gets the individual list item value |
DataModel |
getDataModel()
Get the model being used by this adapter |
int |
getNumChildren()
Get the number of children belong to the model node that this object adapts |
java.lang.Object |
getSelected()
Gets the value of the selected item from the list. |
java.lang.String |
getTagName()
Gets the name of the model node |
void |
set(java.lang.Object o)
Set the value of the listitem |
void |
setDataModel(DataModel src)
Set the adapter source |
void |
setKeyColumn(int colIdx)
Set the index of the column to use when getting values from this adapter |
void |
setKeyColumn(java.lang.String colName)
Set the name of the column to use when getting values from this adapter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected DataModel model
protected int columnIdx
protected java.lang.String columnName
| Constructor Detail |
|---|
public ListModelAdapter(DataModel src)
src - The model for which this adapter is workingpublic ListModelAdapter()
| Method Detail |
|---|
public void setKeyColumn(int colIdx)
colIdx - the (zero based) column index.public void setKeyColumn(java.lang.String colName)
colName - the column name.public int getNumChildren()
getNumChildren in interface ModelAdapterpublic java.lang.Object get(int i)
get in interface ModelAdapteri - The index of the listitem
public void set(java.lang.Object o)
set in interface ModelAdaptero - The new valuepublic java.lang.Object getSelected()
getSelected in interface ModelAdapterpublic void setDataModel(DataModel src)
setDataModel in interface ModelAdaptersrc - the modelpublic DataModel getDataModel()
getDataModel in interface ModelAdapterpublic java.lang.String getTagName()
public int find(java.lang.String key,
int columnIdx)
key - the key to locatecolumnIdx - the index of the key column
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||