Class
caplin.workbench.model

ToggleSlider

Constructor Summary

Attributes Name and Description
caplin.workbench.model.ToggleSlider(Boolean defaultValue, String labelOn, String labelOff, String label)

A configurable toggle switch, used in multiple workbench tools.

Method Summary

Attributes Name and Description
void click()

Toggle the value between true and false

Methods inherited from class caplin.presenter.node.PresentationNode:
getPath, nodes, properties, removeAllListeners, removeChildListeners

Constructor Detail

caplin.workbench.model.ToggleSlider(Boolean defaultValue, String labelOn, String labelOff, String label)

A configurable toggle switch, used in multiple workbench tools. To listen to the value change, add a listener directly to the value property, e.g. toggleSlider.value.addChangeListener(...)

Parameters
Boolean defaultValue Optional, Default: false If true, start slider in the ON position, else the OFF position.
String labelOn Optional, Default: 'ON' The label to use for the ON position.
String labelOff Optional, Default: 'OFF' The label to use for the OFF position.
String label Optional, Default: '' The contents of a label for the whole toggle.

Method Detail

void click()

Toggle the value between true and false