01: package net.xoetrope.xui.data;
02:
03: /**
04: * An interface used to add functionality and provide convenient access to the
05: * model for some components. An example of this is the XListModelAdapter
06: * <p>Copyright: Copyright (c) Xoetrope Ltd., 2002-2003</p>
07: * @version $Revision: 1.8 $
08: */
09: public interface XModelAdapter {
10: /**
11: * Gets an individual list item value
12: * @param i The index of the listitem
13: * @return The value of the listitem
14: */
15: public Object get(int i);
16:
17: /**
18: * Gets the number of child nodes belonging to this node
19: * @return the number of child nodes
20: */
21: public int getNumChildren();
22:
23: /**
24: * Set the value of the listitem
25: * @param o The new value
26: */
27: public void set(Object o);
28:
29: /**
30: * Gets the value of the selected item from the node.
31: * @return the node
32: */
33: public Object getSelected();
34:
35: /**
36: * Set the adapter source
37: * @param src the model
38: */
39: public void setModel(XModel src);
40:
41: /**
42: * Set the adapter source
43: * @param src the model
44: */
45: public XModel getModel();
46: }
|