|
SAP NetWeaver 2004S SPS 10 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Base data model for DropdownListBox & ListBox
Copyright 2004 SAP AG
| Method Summary | |
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 |
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 nameOfTextColumn)
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. |
| Method Detail |
public void addItem(String key,
String text)
key - the key of the itemtext - the visible text of the itempublic int size()
public String getKeyByIndex(int index)
index - the index of the item in the list
IndexOutOfBoundsExceptionpublic String getTextByIndex(int index)
index - the index of the item in the list
IndexOutOfBoundsExceptionpublic Iterator getKeys()
public String getTextForKey(String key)
key - the key of an item
public boolean isSelected(int index)
index - the index of the item
isSelected(String)public boolean isSelected(String key)
key - the key of the item
public String getNameOfKeyColumn()
public void setNameOfKeyColumn(String nameOfKeyColumn)
nameOfKeyColumn - the column identifier of the key columnpublic String getNameOfTextColumn()
public void setNameOfTextColumn(String nameOfTextColumn)
nameOfTextColumn - the column identifier of the text columnpublic void setSelection(String key)
key - the key of the item to selectpublic boolean isSingleSelection()
public void setSingleSelection(boolean isSingleSelection)
isSingleSelection - true if the model should only
allow single selection.public String getSingleSelection()
public String[] getMultiSelection()
public void addSelection(String key)
key - the key of the item to add to the selectionpublic void removeSelection(String key)
key - the key of the item to remove from
the selection
|
SAP NetWeaver 2004S SPS 10 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||