Type Control
RWT Scripting analoge to org.eclipse.swt.widgets.Control
Constructor Attributes | Constructor Name and Description |
---|---|
Control()
The constructor is not public.
|
Method Attributes | Method Name and Description |
---|---|
Forces the receiver to have the keyboard focus, causing
all keyboard events to be delivered to it.
|
|
Returns the receiver's background color.
|
|
Returns the receiver's cursor, or null if it has not been set.
|
|
getData(property)
Returns the application defined property of the receiver
with the specified name, or null if it has not been set.
|
|
Returns
true if the receiver is enabled, and
false otherwise. |
|
Returns the receiver's foreground color.
|
|
Returns the receiver's tool tip text, or null if it has
not been set.
|
|
Returns
true if the receiver is visible, and
false otherwise. |
|
setBackground(color)
Sets the receiver's background color to the color specified
by the argument, or to the default system color for the control
if the argument is null.
|
|
setData(property, value)
Sets the application defined property of the receiver
with the specified name to the given value.
|
|
setEnabled(enabled)
Enables the receiver if the argument is
true ,
and disables it otherwise. |
|
setForeground(color)
Sets the receiver's foreground color to the color specified
by the argument, or to the default system color for the control
if the argument is null.
|
|
setToolTipText(toolTipText)
Sets the receiver's tool tip text to the argument, which
may be null indicating that no tool tip text should be shown.
|
|
setVisible(visible)
Marks the receiver as visible if the argument is
true ,
and marks it invisible otherwise. |
- Returns:
- {boolean}
true
if the control got focus, andfalse
if it was unable to.
- Returns:
- {int[]} the background color as array [ red, green, blue ]
When the mouse pointer passes over a control its appearance is changed to match the control's cursor.
All possible values are available as constants on the SWT object.
- Returns:
- {string|null} the receiver's cursor or
null
The java widget properties can be accessed if the property name was registered with WidgetUtil.registerDataKeys.
- Parameters:
- {string} property
- the name of the property
- Returns:
- {var} the value
- See:
- Control#setData
true
if the receiver is enabled, and
false
otherwise. A disabled control is typically
not selectable from the user interface and draws with an
inactive or "grayed" look.
- Returns:
- {boolean} the receiver's enabled state
- Returns:
- {int[]} the foreground color as array [ red, green, blue ]
- Returns:
- {string|null} the receiver's tool tip text
true
if the receiver is visible, and
false
otherwise.
If one of the receiver's ancestors is not visible or some other condition makes the receiver not visible, this method may still indicate that it is considered visible even though it may not actually be showing.
- Returns:
- {boolean} the receiver's visibility state
- Parameters:
- {int[]|null} color
- the new color as array [ red, green, blue ] or null
The java widget is not affected by this method, but can itself set this object's properties if the name was registered with WidgetUtil.registerDataKeys.
- Parameters:
- {string} property
- the name of the property
- {var} value
- the new value for the property
- See:
- Control#getData
true
,
and disables it otherwise. A disabled control is typically
not selectable from the user interface and draws with an
inactive or "grayed" look.
- Parameters:
- {boolean} enabled
- the new enabled state
- Parameters:
- {int[]|null} color
- the new color as array [ red, green, blue ] or null
- Parameters:
- {string|null} toolTipText
- the new tool tip text (or null)
true
,
and marks it invisible otherwise.
If one of the receiver's ancestors is not visible or some other condition makes the receiver not visible, marking it visible may not actually cause it to be displayed.
NOTE: If there is a Show
or Hide
Java listener attached
to this widget, it may be notified at a later point in time. ClientListener
are notified right away.
- Parameters:
- {boolean} visible
- the new visibility state