|
Java DTV API 1.0 12-Dec-2008 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Represents the data structure of the list, thus allowing a list to represent any potential data source by referencing different implementations of this interface. E.g. a list model can be implemented in such a way that it retrieves data directly from storage (although caching would be recommended).
It is the responsibility of the list to notify observers (specifically the view
List
of any changes to its state (items removed/added/changed etc.)
thus the data would get updated on the view.
Method Summary | |
void |
addDataChangedListener(DataChangedListener l)
Invoked to indicate interest in future change events. |
void |
addItem(Object item)
Adds the specified item to the end of this list. |
void |
addSelectionListener(SelectionListener l)
Invoked to indicate interest in future selection events. |
Object |
getItemAt(int index)
Returns the item at the given offset. |
int |
getSelectedIndex()
Returns the selected list offset. |
int |
getSize()
Returns the number of items in the list. |
void |
removeDataChangedListener(DataChangedListener l)
Invoked to indicate no further interest in future change events. |
void |
removeItem(int index)
Removes the item at the specified position in this list. |
void |
removeSelectionListener(SelectionListener l)
Invoked to indicate no further interest in future selection events. |
void |
setSelectedIndex(int index)
Sets the selected list offset can be set to -1 to clear selection. |
Method Detail |
public Object getItemAt(int index)
index
- an index into this list
public int getSize()
public int getSelectedIndex()
setSelectedIndex(int)
public void setSelectedIndex(int index)
index
- an index into this listgetSelectedIndex()
public void addDataChangedListener(DataChangedListener l)
l
- a data changed listenerremoveDataChangedListener(com.sun.lwuit.events.DataChangedListener)
public void removeDataChangedListener(DataChangedListener l)
l
- a data changed listeneraddDataChangedListener(com.sun.lwuit.events.DataChangedListener)
public void addSelectionListener(SelectionListener l)
l
- a selection listenerremoveSelectionListener(com.sun.lwuit.events.SelectionListener)
public void removeSelectionListener(SelectionListener l)
l
- a selection listeneraddSelectionListener(com.sun.lwuit.events.SelectionListener)
public void addItem(Object item)
item
- the item to be addedremoveItem(int)
public void removeItem(int index)
index
- the index of the item to removedaddItem(java.lang.Object)
|
Java DTV API 1.0 12-Dec-2008 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |