org.formaria.aria.data
Interface ModelAdapter

All Known Implementing Classes:
DatabaseTableModelAdapter, ListModelAdapter, TableModelAdapter, TablePojoModelAdapter, TreeModelAdapter, TreePojoModelAdapter

public interface ModelAdapter

An interface used to add functionality and provide convenient access to the model for some components. An example of this is the ListModelAdapter

Copyright: Copyright (c) Formaria Ltd., 2008


Method Summary
 java.lang.Object get(int i)
          Gets an individual list item value
 DataModel getDataModel()
          Set the adapter source
 int getNumChildren()
          Gets the number of child nodes belonging to this node
 java.lang.Object getSelected()
          Gets the value of the selected item from the node.
 void set(java.lang.Object o)
          Set the value of the list item
 void setDataModel(DataModel src)
          Set the adapter source
 

Method Detail

get

java.lang.Object get(int i)
Gets an individual list item value

Parameters:
i - The index of the listitem
Returns:
The value of the listitem

getNumChildren

int getNumChildren()
Gets the number of child nodes belonging to this node

Returns:
the number of child nodes

set

void set(java.lang.Object o)
Set the value of the list item

Parameters:
o - The new value

getSelected

java.lang.Object getSelected()
Gets the value of the selected item from the node.

Returns:
the node

setDataModel

void setDataModel(DataModel src)
Set the adapter source

Parameters:
src - the model

getDataModel

DataModel getDataModel()
Set the adapter source

Returns:
The DataModel to which this adapter is being applied