|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
SCSelection is the parent interface of the "selection" components: SCRadioButton, SCChoice, and SCList. Each of these components has a list of possible choices (of which one may be selected at a time) and a value sent to the host. Each item in the selection has two properties associated with it: the "displayText", which is what will be displayed to the user, and the "sendText", which is the String sent to the host upon selection.
SCSelectionList
,
SCRadioButton
Method Summary | |
java.lang.String |
getDisplayText()
Get the selected displayText from the list. |
java.lang.String |
getDisplayText(int index)
Gets the displayText at the specified index. |
int |
getItemCount()
Gets the number of items in the list. |
int |
getSelectedIndex()
Gets the index of the selected item. |
java.lang.String |
getSendText()
Gets the selected sendText from the list. |
java.lang.String |
getSendText(int index)
Gets the sendText at the specified index. |
boolean |
isIndexSelected(int index)
Checks whether an index is selected. |
void |
select(int index)
Selects the item at the specified index. |
void |
selectDisplayText(java.lang.String displayText)
Selects the first occurrence of the specified displayText in the list. |
void |
selectItem(java.lang.String displayText,
java.lang.String sendText)
Selects the first occurrence of the specified displayText/sendText combination in the list. |
void |
selectSendText(java.lang.String sendText)
Selects the first occurrence of the specified sendText in the list. |
void |
setDisplayText(java.lang.String displayText,
int index)
Replaces the displayText at the specified index. |
void |
setItem(java.lang.String displayText,
java.lang.String sendText,
int index)
Replaces the displayText and sendText at the specified index. |
void |
setSendText(java.lang.String sendText,
int index)
Replaces the sendText at the specified index. |
Methods inherited from interface com.ibm.hi.customizer.beans.scci.SCCustomComponent |
getBackgroundColor, getCaption, getForegroundColor, getGlobalRead, getGlobalWrite, getHelpCaption, getHostLinkLength, getHostLinkPosition, getTabNumber, hasFocus, isTempHidden, isVisible, readGlobalVariable, requestFocus, setBackgroundColor, setCaption, setForegroundColor, setGlobalRead, setGlobalWrite, setHelpCaption, setTempHidden, setVisible, toString, writeGlobalVariable |
Method Detail |
public int getItemCount()
public java.lang.String getDisplayText(int index)
index
- the index of the list.getItemCount()
,
getSendText(int)
public java.lang.String getSendText(int index)
index
- the index of the list.getItemCount()
,
getDisplayText(int)
public void setItem(java.lang.String displayText, java.lang.String sendText, int index)
displayText
- the new displayText.sendText
- the new sendText.index
- the index to replace.public void setDisplayText(java.lang.String displayText, int index)
displayText
- the new displayText.index
- the index to replace.public void setSendText(java.lang.String sendText, int index)
sendText
- the new sendText.index
- the index to replace.public int getSelectedIndex()
-1
if no item is selected.select(int)
,
isIndexSelected(int)
public java.lang.String getDisplayText()
null
if no item is selected.select(int)
,
isIndexSelected(int)
public java.lang.String getSendText()
null
if no item is selectedselect(int)
,
isIndexSelected(int)
public void select(int index)
index
- the index to select.getDisplayText(int)
,
isIndexSelected(int)
public void selectItem(java.lang.String displayText, java.lang.String sendText)
displayText
- the displayText to select.sendText
- the sendText to select.getDisplayText(int)
,
getSendText(int)
,
isIndexSelected(int)
public void selectDisplayText(java.lang.String displayText)
displayText
- the displayText to select.getDisplayText(int)
,
getSendText(int)
,
isIndexSelected(int)
public void selectSendText(java.lang.String sendText)
sendText
- the sendText to select.getDisplayText(int)
,
getSendText(int)
,
isIndexSelected(int)
public boolean isIndexSelected(int index)
index
- the index to checktrue
if the index is selected; false
otherwise.select(int)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |