Controls
The nodes that hold a value the user changes (checkboxes, toggles, switches, selectors, sliders, text fields) and the scrollbars, each one a behavior class with a skin class of named parts. Learn: Controls, Text fields, Give your controls a look.
BaseCheckboxNode, BaseChoiceNode, BaseScrollbarNode, BaseSelectorNode, BaseSliderNode, BaseToggleNode, CheckboxNode, DoubleSliderNode, FieldNode, IntegerSliderNode, LineFieldNode, ScrollbarNode, SelectorNode, SliderNode, StringSliderNode, SwitchNode and ToggleNode need a skin, a subclass that draws the node: see Give your controls a look.
Main types
Section titled “Main types”| Type | Kind | Summary |
|---|---|---|
BaseCheckboxNode | class | The behavior of a checkbox without its look: a boolean that a left press on the node toggles. |
BaseChoiceNode | class | The behavior shared by the controls that select one value among options: the switch, the selector and the sliders. |
BaseScrollbarNode | class | The behavior of a scrollbar without its look: it reads the scroll of the node it serves and scrolls it when the user drags along the bar. |
BaseSelectorNode | class | The behavior of a drop-down list without its look: a choice whose list opens on a left press and closes on the next one. |
BaseSliderNode | class | The behavior of a slider without its look: a choice whose options sit along the width of the node, picked by a press or a drag. |
BaseToggleNode | class | The behavior of a toggle without its look: a boolean that a left press switches, and the two values it stands for. |
CheckboxNode | class | A checkbox made of two parts: a box that covers the control and a mark shown while it is checked. |
DoubleSliderNode | class | A slider over a range of decimal numbers with a fixed step. |
FieldNode | class | The base of every text field: it edits a text, reads a value of type V from it, and handles the focus, the cursor, the selection and the clipboard. |
IntegerFieldNode | class | A one-line field that holds an Integer between a minimum and a maximum, stepped by Up, Down and the wheel. |
IntegerSliderNode | class | A slider over a range of integers. |
LineFieldNode | class | A one-line field: Enter submits it, and its text scrolls sideways to follow the cursor. |
MultilineTextFieldNode | class | A field of several lines whose value is its text, wrapped in its width. |
ScrollbarNode | class | A scrollbar made of two parts: a track that covers the bar and a thumb sized and placed from the scroll of the node it serves. |
SelectorNode | class | A drop-down list made of a field and one node per option, with the selected option on top and the others in rows under it or above it. |
SliderNode | class | A slider made of two parts: a track that covers the control and a thumb placed at the value. |
StringSliderNode | class | A slider over a list of texts, such as quality levels, given as texts or as the constants of an enum. |
SwitchNode | class | A choice that shows every option side by side, one node per option, and selects the option under a left press. |
TextFieldNode | class | A one-line field whose value is its text. |
ToggleNode | class | A toggle made of two parts: a track that covers the control and a knob that slides from the left (off) to the right (on). |
Related types
Section titled “Related types”The interfaces, enums and helper classes of this family that the main types use.
| Type | Kind | Summary |
|---|---|---|
FieldSelection | class | A range of characters of a field, from a start index to an end index. |
RangeList | class | Read-only list of the options of a slider range, whose values are computed from their index instead of stored. |
ToggleState | class | The two values that a toggle stands for, one while it is on and one while it is off. |
Supporting types
Section titled “Supporting types”Nested types and listeners that the main types use.
| Type | Kind | Summary |
|---|---|---|
SelectorNode.SelectorDirection | enum | The side where a selector opens its list. |
