Type Button
Extends
Control.
RWT Scripting analoge to org.eclipse.swt.widgets.Button
Constructor Attributes | Constructor Name and Description |
---|---|
Button()
The constructor is not public.
|
Method Attributes | Method Name and Description |
---|---|
Returns
true if the receiver is selected,
and false otherwise. |
|
getText()
Returns the widget text.
|
|
setSelection(selected)
Sets the selection state of the receiver, if it is of type
CHECK ,
RADIO , or TOGGLE . |
|
setText(text)
Sets the receivers text to the given string.
|
- Methods borrowed from class Control:
- forceFocus, getBackground, getCursor, getData, getEnabled, getForeground, getToolTipText, getVisible, setBackground, setData, setEnabled, setForeground, setToolTipText, setVisible
Method Detail
{boolean}
getSelection()
Returns
true
if the receiver is selected,
and false otherwise.
When the receiver is of type CHECK
or RADIO
,
it is selected when it is checked. When it is of type TOGGLE
,
it is selected when it is pushed in. If the receiver is of any other type,
this method returns false.
- Returns:
- {boolean} the selection state
{string}
getText()
Returns the widget text.
- Returns:
- {string} the widget text
setSelection(selected)
Sets the selection state of the receiver, if it is of type
CHECK
,
RADIO
, or TOGGLE
.
When the receiver is of type CHECK
or RADIO
,
it is selected when it is checked. When it is of type TOGGLE
,
it is selected when it is pushed in.
- Parameters:
- {boolean} selected
- the new selection state
setText(text)
Sets the receivers text to the given string.
- Parameters:
- {string} text
- the new text