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.
Fields borrowed from class Widget:
$el
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:
addListener, forceFocus, getBackground, getCursor, getEnabled, getForeground, getToolTipText, getVisible, removeListener, setBackground, setEnabled, setForeground, setToolTipText, setVisible
Methods borrowed from class Widget:
getData, setData
Event Summary
Event Attributes Event Name and Description
 
Sent when the widget is selected
Events borrowed from class Control:
Dispose, FocusIn, FocusOut, Hide, KeyDown, KeyUp, MouseDoubleClick, MouseDown, MouseEnter, MouseExit, MouseMove, MouseUp, MouseWheel, Paint, Show
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
Event Detail
Selection
Sent when the widget is selected
Parameters:
{Event} event
See:
SWT.Selection

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