Index

Global Objects

Types


Type Button


Extends Control.
RWT Scripting analoge to org.eclipse.swt.widgets.Button

Type Summary
Constructor Attributes Constructor Name and Description
 
Button()
The constructor is not public.
Method Summary
Method Attributes Method Name and Description
 
Returns true if the receiver is selected, and false otherwise.
 
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
Type Detail
Button()
The constructor is not public.
Since:
2.2
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

Copyright (c) EclipseSource and others 2013. All rights reserved.