net.xoetrope.xui.data
Interface XModelAdapter

All Known Implementing Classes:
DatabaseTableModelAdapter, XListModelAdapter, XTableModelAdapter, XTreeModelAdapter, XTreePojoModelAdapter

public interface XModelAdapter

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

Copyright: Copyright (c) Xoetrope Ltd., 2002-2003


Method Summary
 java.lang.Object get(int i)
          Gets an individual list item value
 XModel getModel()
          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 setModel(XModel 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

setModel

void setModel(XModel src)
Set the adapter source

Parameters:
src - the model

getModel

XModel getModel()
Set the adapter source

Returns:
The XModel to which this adapter is being applied