|
Java DTV API 1.3 18-Nov-2009 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.dtv.lwuit.list.DefaultListModel
public class DefaultListModel
Default implementation of the list model based on a vector of elements.
| Constructor Summary | |
|---|---|
DefaultListModel()
Creates a new instance of DefaultListModel. |
|
DefaultListModel(Object[] items)
Creates a new instance of DefaultListModel. |
|
DefaultListModel(Vector items)
Creates a new instance of DefaultListModel. |
|
| 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 |
addItemAtIndex(Object item,
int index)
Adding an item to list at given index. |
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 |
removeAll()
Removes all elements from the model. |
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 |
setItem(int index,
Object item)
Change the item at the given index. |
void |
setSelectedIndex(int index)
Sets the selected list offset can be set to -1 to clear selection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultListModel()
public DefaultListModel(Vector items)
items - the list itemspublic DefaultListModel(Object[] items)
items - the list items| Method Detail |
|---|
public Object getItemAt(int index)
ListModel
getItemAt in interface ListModelindex - an index into this list
public int getSize()
ListModel
getSize in interface ListModelpublic int getSelectedIndex()
ListModel
getSelectedIndex in interface ListModelListModel.setSelectedIndex(int)public void addItem(Object item)
ListModel
addItem in interface ListModelitem - the item to be addedListModel.removeItem(int)
public void setItem(int index,
Object item)
index - the indexitem - the object to be inserted as the new item at the specified
position
public void addItemAtIndex(Object item,
int index)
item - - the item to addindex - - the index position in the listpublic void removeItem(int index)
ListModel
removeItem in interface ListModelindex - the index of the item to removedListModel.addItem(java.lang.Object)public void removeAll()
public void setSelectedIndex(int index)
ListModel
setSelectedIndex in interface ListModelindex - an index into this listListModel.getSelectedIndex()public void addDataChangedListener(DataChangedListener l)
ListModel
addDataChangedListener in interface ListModell - a data changed listenerListModel.removeDataChangedListener(com.sun.dtv.lwuit.events.DataChangedListener)public void removeDataChangedListener(DataChangedListener l)
ListModel
removeDataChangedListener in interface ListModell - a data changed listenerListModel.addDataChangedListener(com.sun.dtv.lwuit.events.DataChangedListener)public void addSelectionListener(SelectionListener l)
ListModel
addSelectionListener in interface ListModell - a selection listenerListModel.removeSelectionListener(com.sun.dtv.lwuit.events.SelectionListener)public void removeSelectionListener(SelectionListener l)
ListModel
removeSelectionListener in interface ListModell - a selection listenerListModel.addSelectionListener(com.sun.dtv.lwuit.events.SelectionListener)
|
Java DTV API 1.3 18-Nov-2009 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||