|
SpringGUI
introduction download reference examples faq
Reference
Name
|
isEnabled(), setEnabled()
|
Examples
|
// If button 1 is disabled, disable button 2 also.
if ( !gui.isEnabled("myButton1") ) {
gui.setEnabled("myButton2", false);
}
|
Description
|
isEnabled queries whether an element is enabled.
setEnabled sets this attribute.
When an element is disabled, it is visible but will not receive events and the user cannot interact with it. (Windows customarily greys out such elements)
|
Syntax
|
boolean result = gui.isEnabled(name);
gui.setEnabled(name, value);
|
Parameters
|
String name
|
The name of the element.
|
boolean value
|
The new state of the element.
|
|
Returns
|
isEnabled():
true if the element can be found and is enabled.
setEnabled():
true if the element can be found.
|
back to the top of the page
|
| |
| | |