Control
is a screen control with which a user interacts, such as an input box, a drop-down box, or a
straightforward text label.
This interface allows caplin.element.Stylers to interact with the Control
in order to apply
visual effects.
Attributes | Name and Description |
---|---|
|
caplin.control.Control()
|
Attributes | Name and Description |
---|---|
|
void
addClass(String className)
Adds the specified CSS class name to the control. |
|
void
clear()
Clear the control and returns it to its original state. |
|
void
clearState()
Clears the state of the control without modifying the displayed value. |
|
void
disable()
Disables the control. |
|
void
enable()
Enables the control. |
|
void
flash(Variant value, int duration)
Flashes the control based on the new control value. |
|
void
focus()
Moves the focus to this control. |
|
Map
getAttributes()
Gets the controls attributes |
|
Variant
getValue()
Gets the control value from the control. |
|
Boolean
isEnabled()
Determines whether the control is enabled. |
|
void
refresh()
Refresh the screen. |
|
void
removeClass(String className)
Removes the specified CSS class name from the control. |
|
void
replaceClass(String oldClassName, String newClassName)
Replaces the specified CSS class on the control with a new class. |
|
void
select()
Moves the focus and highlights this control. |
|
void
setStyle(String styleName, String styleValue)
Sets the specified style the control's DOM element. |
|
void
setValue(Variant value)
Sets the control value, which will update the screen. |
|
String
toString()
Returns a human-readable string representation of the object, which is useful for debugging. |
►
caplin.control.Control()
►
void
addClass(String className)
Adds the specified CSS class name to the control. This has no effect if it is already on the element.
String | className | The CSS class name to add to the DOM. |
►
void
clear()
Clear the control and returns it to its original state.
►
void
clearState()
Clears the state of the control without modifying the displayed value. This is a faster version of clear for when you are going to update the displayed value immediately after clearing.
►
void
disable()
Disables the control. Does nothing if the control has no concept of enabled/disabled.
►
void
enable()
Enables the control. Does nothing if the control has no concept of enabled/disabled.
►
void
flash(Variant value, int duration)
Flashes the control based on the new control value. Does nothing if the control has no concept of flash. Note that this does not write the new value to the control itself, it merely styles the control according to the value.
Variant | value | The new control value. |
int | duration | The flash duration in milliseconds. |
►
void
focus()
Moves the focus to this control. Does nothing if the control has no concept of focus.
►
Map
getAttributes()
Gets the controls attributes
►
Variant
getValue()
Gets the control value from the control.
►
Boolean
isEnabled()
Determines whether the control is enabled.
►
void
refresh()
Refresh the screen.
►
void
removeClass(String className)
Removes the specified CSS class name from the control. This has no effect if it is not already on the element.
String | className | The CSS class name to add to the DOM. |
►
void
replaceClass(String oldClassName, String newClassName)
Replaces the specified CSS class on the control with a new class.
String | oldClassName | The old CSS class to remove. |
String | newClassName | The new CSS class to add. |
►
void
select()
Moves the focus and highlights this control. Does nothing if the control has no concept of focus.
►
void
setStyle(String styleName, String styleValue)
Sets the specified style the control's DOM element.
String | styleName | The style name to add to the DOM. |
String | styleValue | The style value. |
►
void
setValue(Variant value)
Sets the control value, which will update the screen. Depending on the renderer type, this will either be a simple string (if the renderer has no streams) or a map with stream names as its keys.
Variant | value | The new control value. |
►
String
toString()
Returns a human-readable string representation of the object, which is useful for debugging.