Class

StaticText (SUI)

 A text label that the user cannot change.

QuickLinks

addEventListener, dispatchEvent, hide, notify, onDraw, onShortcutKey, removeEventListener, show

Properties

PropertyTypeAccessDescription
activeBoolean r/wAlways false. This element cannot have input focus.
alignmentString r/w The alignment style for this element. If defined, this value overrides the alignChildren setting for the parent container.
boundsBounds r/wThe boundaries of the element, in parent-relative coordinates.
charactersNumber (min: 0) r/wA number of characters for which to reserve space when calculating the preferred size of the element.
childrenArray of Object readonlyAn array of child elements.
enabledBoolean r/wTrue if this element is enabled.
graphicsScriptUIGraphics readonly The graphics object that can be used to customize the element's appearance, in response to the onDraw() event.
helpTipString r/wThe help text that is displayed when the mouse hovers over the element.
indentNumber (min: 0) r/wThe number of pixels to indent the element during automatic layout.
justifyString r/wThe text justification style. (default: left)
One of left, center, or right. Justification only works if this value is set on creation of the element.
locationPoint r/wThe upper left corner of this element relative to its parent.
maximumSizeDimension r/w The maximum height and width to which the element can be resized.
minimumSizeDimension r/wThe minimum height and width to which the element can be resized.
parentObject readonlyThe parent element.
preferredSizeDimension r/wThe preferred size, used by layout managers to determine the best size for each element.
propertiesObject r/wAn object that contains one or more creation properties of the container (properties used only when the element is created).
shortcutKeyString r/w The key sequence that invokes the onShortcutKey() callback for this element (in Windows only).
sizeDimension r/wThe current dimensions of this element.
textString r/wThe text to display, a localizable string.
typeString readonlyThe element type, "statictext".
visibleBoolean r/wTrue if this element is shown, false if it is hidden.
windowWindow (SUI) readonlyThe window that this element belongs to.
windowBoundsBounds readonlyThe bounds of this element relative to the top-level parent window.

Methods

Events

void onDraw ()
An event-handler callback function, called when the window is about to be drawn.
Allows the script to modify or control the appearance, using the controlís associated ScriptUIGraphics object. Handler takes one argument, a DrawState object.

void onShortcutKey ()
An event-handler callback function, called when the element's shortcutKey sequence is typed in the active window.
In Windows only.

Instances

Boolean addEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
Registers an event handler for a particular type of event occuring in this element.

ParameterTypeDescription
eventNameStringThe name of the event.
Event names are listed in the JavaScript Tools Guide.
handlerFunctionThe function that handles the event.
This can be the name of a function defined in the extension, or a locally defined handler function to be executed when the event occurs. A handler function takes one argument, the UIEvent object.
capturePhaseBooleanWhen true, the handler is called only in the capturing phase of the event propagation. (default: false)
Default is false, meaning that the handler is called in the bubbling phase if this object is an ancestor of the target, or in the at-target phase if this object is itself the target.

Event dispatchEvent ()
Simulates the occurrence of an event in this target.
A script can create a UIEvent object for a specific event and pass it to this method to start the event propagation for the event.

void hide ()
Hides this element.

void notify ([eventName: String])
Sends a notification message, simulating the specified user interaction event.

ParameterTypeDescription
eventNameStringThe name of the control event handler to call.
One of: onClick, onChange, onChanging. By default, simulates the onChange event for an edittext control, an onClick event for controls that support that event. (Optional)

Boolean removeEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
Unregisters an event handler for a particular type of event occuring in this element.
All arguments must be identical to those that were used to register the event handler.

ParameterTypeDescription
eventNameStringThe name of the event.
handlerFunctionThe function that handles the event.
capturePhaseBooleanWhether to call the handler only in the capturing phase of the event propagation. (default: false)

void show ()
Shows this element.
When a window or container is hidden, its children are also hidden, but when it is shown again, the children retain their own visibility states.

Jongware, 26-May-2010 v3.0.0Contents :: Index