S-PLUS Connect/Java v1.0

com.insightful.controls
Interface SplusControlMethods

All Known Implementing Classes:
SplusCheckBox, SplusColorControl, SplusComboBox, SplusDataColumnComboBox, SplusDataColumnListBox, SplusDataSetComboBox, SplusDoubleSpinner, SplusIntegerSpinner, SplusInvisibleControl, SplusLineStyleControl, SplusListBox, SplusObjectComboBox, SplusPasswordField, SplusRadioButton, SplusRadioButtonGroup, SplusSubsetField, SplusSymbolStyleControl, SplusTextField, SplusTimeSeriesComboBox, SplusWideComboBox, SplusWideFormulaField, SplusWideListBox, SplusWideTextField

public interface SplusControlMethods

This interface provides a common set of methods for standard S-PLUS dialog controls.

The getValue() method is used by SplusFunctionInfo to construct a function call when OK or Apply is pressed. The other methods are used in interproperty communication, and could be used at some point to implement dialog rollback.


Method Summary
 int getMnemonic()
          Gets the mnemonic for the control.
 String[] getOptionList()
          Gets the option list for the control.
 String getText()
          Gets the text label for the control.
 String getValue()
          Gets the value of the control as a String.
 boolean isEnabled()
          Check whether the control is enabled.
 void setEnabled(boolean b)
          Set whether the control is enabled.
 void setMnemonic(char aChar)
          Sets the mnemonic for the control as a char.
 void setMnemonic(int key)
          Sets the mnemonic for the control as an int.
 void setOptionList(String[] listData)
          Sets the option list for the control.
 void setText(String text)
          Sets the text label for the control.
 void setValue(String value)
          Sets the value of the control as a String.
 

Method Detail

getValue

String getValue()
Gets the value of the control as a String. This is used by SplusFunctionInfo to construct the expression sent to the S-PLUS engine. It is also used for interproperty communication in control action listeners.

Returns:
String representation of the control's value.

setValue

void setValue(String value)
Sets the value of the control as a String.

Parameters:
value - desired control value

getOptionList

String[] getOptionList()
Gets the option list for the control. If the control has no option list, this will return either an array with no elements or a null.

Returns:
String array of option list elements

setOptionList

void setOptionList(String[] listData)
Sets the option list for the control. If the control has no option list, this performs no action.

Parameters:
listData - String array of option list elements.

getText

String getText()
Gets the text label for the control. Typically this will be the JLabel associated with the control, although it may instead be other primary text for the control such as the text for a check box.

Returns:
text label for the control

setText

void setText(String text)
Sets the text label for the control. Typically this will be the JLabel associated with the control, although it may instead be other primary text for the control such as the text for a check box.

Parameters:
text - for the label

getMnemonic

int getMnemonic()
Gets the mnemonic for the control.

Returns:
mnemonic represented as an int

setMnemonic

void setMnemonic(char aChar)
Sets the mnemonic for the control as a char.

Parameters:
aChar - char specifying the mnemonic

setMnemonic

void setMnemonic(int key)
Sets the mnemonic for the control as an int.

Parameters:
key - int specifying the mnemonic

isEnabled

boolean isEnabled()
Check whether the control is enabled.

Returns:
boolean indicating whether the control is enabled

setEnabled

void setEnabled(boolean b)
Set whether the control is enabled.

Parameters:
b - boolean specifying whether to enable the control

S-PLUS Connect/Java v1.0

Copyright © 2000, 2002 Insightful Corporation
Warning: Classes not documented in the S-PLUS Programmer's Guide may change in future releases.