|
SAP NetWeaver 2004S SPS 10 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sapportals.htmlb.DefaultListModel
Default implementation of IListModel for ListBox and DropdownListBox
Copyright 2004 SAP AG
| Constructor Summary | |
DefaultListModel()
Create a new DefaultListModel. |
|
| Method Summary | |
void |
addItem(int index,
String key,
String text)
adds an item to the list of choices. |
void |
addItem(String key,
String text)
adds an item to the list of choices. |
void |
addSelection(String key)
adds the item with the given key to the selection. |
String |
getKeyByIndex(int index)
gets the key of an item for a specified index. |
Iterator |
getKeys()
gets an Iterator for all keys currently in the list |
String[] |
getMultiSelection()
gets the keys of the currently selected items if the model is a multi selection model. |
String |
getNameOfKeyColumn()
gets the name of the column containing the key values if the list model is associated with a table. |
String |
getNameOfTextColumn()
gets the name of the column containing the visible texts if the list model is associated with a table. |
String |
getSingleSelection()
gets the key of the currently selected item if the model is a single selection model. |
String |
getTextByIndex(int index)
gets the visible text of an item for a specified index. |
String |
getTextForKey(String key)
gets the text associated with the key |
boolean |
isSelected(int index)
determines if the item at the given index is currently selected. |
boolean |
isSelected(String key)
determines if the item with the given key is currently selected. |
boolean |
isSingleSelection()
determines if the model is a single selection model, i.e. allows only a single item to be selected at any given time. |
void |
removeItem(String key)
removes an item to the list of choices. |
void |
removeSelection(String key)
adds the item with the given key to the selection. |
void |
setNameOfKeyColumn(String nameOfKeyColumn)
sets the name of the column containing the key values if the list model is associated with a table. |
void |
setNameOfTextColumn(String nameOfValueColumn)
sets the name of the column containing the visible texts if the list model is associated with a table. |
void |
setSelection(String key)
sets the current selection to the item with the given key. |
void |
setSingleSelection(boolean isSingleSelection)
sets the selection behaviour for the list model |
int |
size()
gets the size of the list, i.e. the number of items. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DefaultListModel()
| Method Detail |
public void addItem(String key,
String text)
addItem in interface IListModelkey - the key of the itemtext - the visible text of the item
public void addItem(int index,
String key,
String text)
index - the index of the itemkey - the key of the itemtext - the visible text of the itempublic int size()
size in interface IListModelpublic String getKeyByIndex(int index)
getKeyByIndex in interface IListModelindex - the index of the item in the list
IndexOutOfBoundsExceptionpublic String getTextByIndex(int index)
getTextByIndex in interface IListModelindex - the index of the item in the list
IndexOutOfBoundsExceptionpublic Iterator getKeys()
getKeys in interface IListModelpublic String getTextForKey(String key)
getTextForKey in interface IListModelkey - the key of an item
public boolean isSelected(int index)
isSelected in interface IListModelindex - the index of the item
isSelected(String)public boolean isSelected(String key)
isSelected in interface IListModelkey - the key of the item
public String getNameOfKeyColumn()
getNameOfKeyColumn in interface IListModelpublic void setNameOfKeyColumn(String nameOfKeyColumn)
setNameOfKeyColumn in interface IListModelnameOfKeyColumn - the column identifier of the key columnpublic String getNameOfTextColumn()
getNameOfTextColumn in interface IListModelpublic void setNameOfTextColumn(String nameOfValueColumn)
setNameOfTextColumn in interface IListModelnameOfValueColumn - the column identifier of the text columnpublic void setSelection(String key)
setSelection in interface IListModelkey - the key of the item to selectpublic boolean isSingleSelection()
isSingleSelection in interface IListModelpublic void setSingleSelection(boolean isSingleSelection)
IListModel
setSingleSelection in interface IListModelisSingleSelection - true if the model should only
allow single selection.public String getSingleSelection()
getSingleSelection in interface IListModelpublic String[] getMultiSelection()
getMultiSelection in interface IListModelpublic void addSelection(String key)
addSelection in interface IListModelkey - the key of the item to add to the selectionpublic void removeSelection(String key)
removeSelection in interface IListModelkey - the key of the item to remove from
the selectionpublic void removeItem(String key)
key - the key of the item to remove
|
SAP NetWeaver 2004S SPS 10 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||