Package-level declarations

Types

Link copied to clipboard
abstract class Accordion

This class is NOT USED, it is only here for Documentation purposes.

Link copied to clipboard
interface Actionable

An interface for any control which performs an action when click (or activated in another manner). e.g. Button, MenuItem

Link copied to clipboard

Determines the icon to display in an AlertDialog. See alert.

Link copied to clipboard

Ascii-art showing how the children are laid out :

Link copied to clipboard
class Box(orientation: Orientation) : BoxBase, WithChildren

Like a VBox or HBox, but the orientation can be changed from horizontal to vertical.

Link copied to clipboard
sealed class BoxBase : Region

Does all the hard work for subclasses Box, HBox and VBox.

Link copied to clipboard
class Button(text: String, graphic: Node? = null) : ButtonBase

Button inherits all the features of ButtonBase.

Link copied to clipboard

A horizontal container primarily for buttons. The order of the buttons matches the platform's standard, and not the order the buttons were added. For example, the buttons OK, Cancel, Apply appear in these orders :

Link copied to clipboard
abstract class ButtonBase(text: String, graphic: Node? = null) : Labelled, Actionable, HasDisabled

The base class for Button, ToggleButton, RadioButton ...

Link copied to clipboard

Metadata for nodes added to a ButtonBar, which determines the order the nodes appear with the bar.

Link copied to clipboard
Link copied to clipboard

A CheckBox can have either two states : selected == true , selected == false. Or, if you set allowIndeterminate, then it can have three states :

Link copied to clipboard

A ChoiceBox, has a list of items (of type V), one of which can be selected. (selection is a SingleSelectionModel).

Link copied to clipboard
class ColorButton(text: String, initialColor: Color = Color.WHITE) : ButtonBase

A Button for selecting a color. Clicking shows a ColorPickerDialog, which is a CustomColorPickerDialog, but you can choose a different implementation (such as PaletteColorPickerDialog) by changing dialogFactory.

Link copied to clipboard

A slider which allows the user to select a color between two values fromColor..toColor. The intermediate values are linear interpolations of the red, green, blue and alpha channels.

Link copied to clipboard
abstract class ComparableSpinner<V : Comparable<V>, P : Property<V>> : SpinnerBase<V, P>

The base class for Spinners, whose values are comparable, and have a min and max value.

Link copied to clipboard

Defines the position of the graphic in a Labelled.

Link copied to clipboard
abstract class Control : Node

In JavaFX, Controls have 3 attributes which make them different from other nodes.

Link copied to clipboard
class CustomColorPicker(val initialColor: Color = Color.WHITE, val editAlpha: Boolean = false) : Region

A control that lets the user choose a color using sliders and/or spinners for each RGB channel and/or HSV values

Link copied to clipboard

Allows any Node to be added to a Menu or SubMenu, and for it to still behave like a menu item. i.e.

Link copied to clipboard

Edits a DoubleProperty by moving a slider.

Link copied to clipboard
class DoubleSnapEvery(val every: Double, val threshold: Double) : Snap<Double>
Link copied to clipboard

If you need a DoubleSpinner, which returns whole numbers (as Doubles)

Link copied to clipboard

Edits a DoubleProperty by typing digits into TextArea, via up/down buttons, up/down keys or by scrolling the mouse/trackpad.

Link copied to clipboard
class ExtensionFilter(val text: String, val patterns: String) : FileFilter
Link copied to clipboard
class FileDialog(val native: Boolean)

File Open, File Save and Folder Picker dialogs.

Link copied to clipboard

Edits a FloatProperty by typing digits into TextArea, via up/down buttons, up/down keys or by scrolling the mouse/trackpad.

Link copied to clipboard
class FloatSnapEvery(val every: Float, val threshold: Float) : Snap<Float>
Link copied to clipboard

If you need a FloatSpinner, which returns whole numbers (as Floats)

Link copied to clipboard
class FloatSpinner(initialValue: Float = 0.0f) : ComparableSpinner<Float, FloatProperty>
Link copied to clipboard

Lays out its children from left to right, then top to bottom, moving onto a new row when the previous row is full.

Link copied to clipboard
class FolderBar(initialFolder: File) : WrappedRegion<HBox>

Displays a folder (type File) as a horizontal line of Buttons. Click any of the buttons to change the value of folder.

Link copied to clipboard

A layout, which is quite useful for laying out forms.

Link copied to clipboard
class FormRow : Region
Link copied to clipboard
interface HasDisabled
Link copied to clipboard
interface HasReadOnly
Link copied to clipboard

Lays out its children in a row, with the first child on the left, and the last child on the right.

Link copied to clipboard

Edits a FloatProperty by typing digits into TextArea, via up/down buttons, up/down keys or by scrolling the mouse/trackpad.

Link copied to clipboard
class IntSnapEvery(val every: Int, val threshold: Int) : Snap<Int>
Link copied to clipboard
class IntSpinner(initialValue: Int = 0) : ComparableSpinner<Int, IntProperty>
Link copied to clipboard
class Label(text: String, graphic: Node?) : Labelled

Displays a single line of text, with an optional extra graphic. The graphic is often an icon, but can be any Node.

Link copied to clipboard
abstract class Labelled(text: String, graphic: Node? = null) : Region

The base class for many Nodes which display a single line of text (and an optional graphic). Label is the obvious subclass, but there are many others, including Button.

Link copied to clipboard
abstract class LabelledMenuItem(text: String, graphic: Node? = null) : MenuItemBase, HasDisabled
Link copied to clipboard
abstract class ListCell<T>(val listView: ListView<T>, val item: T) : Region

ListCells are the visible Nodes within a ListView. ListCells are created as-needed (and left to be garbage collected when unused), as the user scrolls through the ListView.

Link copied to clipboard
class ListView<T> : Region

Displays a list of items vertically inside a ScrollPane.

Link copied to clipboard
Link copied to clipboard

Edits a LongProperty by typing digits into TextArea, via up/down buttons, up/down keys or by scrolling the mouse/trackpad.

Link copied to clipboard
class LongSnapEvery(val every: Long, val threshold: Long) : Snap<Long>
Link copied to clipboard
class Menu(text: String, graphic: Node? = null) : ButtonBase, WithItems

An item in a MenuBar. When you click on the Menu a PopupMenu appears, containing items.

Link copied to clipboard

Identical to a ToolBar, but may be styled differently.

Link copied to clipboard
class MenuButton(text: String, graphic: Node? = null) : ButtonBase, WithItems

A button, which displays items in a PopupMenu when clicked. On the right hand side there is an arrow (though it could be styled differently), to differentiate it from a regular Button.

Link copied to clipboard
class MenuItem(text: String, graphic: Node? = null) : LabelledMenuItem
Link copied to clipboard

There is a very similar class-hierarchy of buttons. See ButtonBase.

Link copied to clipboard
abstract class MixedTreeCell<I : MixedTreeItem<I>>(val treeView: MixedTreeView<I>, val treeItem: I) : Region
Link copied to clipboard
Link copied to clipboard

Similar to TreeView, but this is better suited to trees, where each item in the tree structure contains different types of data.

Link copied to clipboard

A panel with a TreeView at the top, showing the hierarchical scene graph starting at rootNode. At the bottom is details of the currently selected TreeItem.

Link copied to clipboard
class PaletteColorPicker(initialColor: Color = Color.WHITE) : Region

A control (not a dialog), for choosing a color from a palette.

Link copied to clipboard

Shows a set of colors in a grid. Click a color to select it (the dialog is closed).

Link copied to clipboard
class Pane : Region
Link copied to clipboard

The root node for a pop-up menu. The visible items for the pop-up menu are taken from Menu.items or SubMenu.items. A PopupMenu is displayed as a new scene in a new OverlayStage (StageType.POPUP), and is therefore NOT part of the scene graph of the Menu or SubMenu from which it originated.

Link copied to clipboard
class PropertyRadioButton<V, P : Property<V>>(val property: P, val value: V, text: String, graphic: Node? = null) : SelectButtonBase

Behaves like a ToggleButton, but also has a value associated with it.

Link copied to clipboard
class PropertyRadioMenuItem<V, P : Property<V>>(val property: P, val value: V, text: String) : SelectMenuItemBase

Similar to a RadioButton, but instead of a ToggleGroup, it is backed by a property which decides which menu item is selected.

Link copied to clipboard
class PropertyToggleButton<V, P : Property<V?>>(val property: P, val value: V, text: String, graphic: Node? = null) : SelectButtonBase

Behaves like a ToggleButton, but instead of a ToggleGroup it has a Property backing which button is selected.

Link copied to clipboard
class PropertyToggleMenuItem<V, P : Property<V?>>(val property: P, val value: V, text: String) : SelectMenuItemBase

Similar to a ToggleMenuItem, but instead of using a ToggleGroup, it uses a property to determine which item is selected.

Link copied to clipboard
class ProxyNode(val wrapped: Node) : Node

Makes a node appear in a different part of the scene-graph.

Link copied to clipboard
open class RadioButton(toggleGroup: ToggleGroup, text: String, graphic: Node? = null) : ToggleButtonBase

A specialised form of ToggleButtonBase, which must belong to a ToggleGroup. Unlike a ToggleButton, when you press a selected RadioButton, it remains selected.

Link copied to clipboard
open class RadioMenuItem(toggleGroup: ToggleGroup, text: String) : ToggleMenuItemBase
Link copied to clipboard
open class Region : Node

A Region adds a Border, and padding compared to a regular Node.

Link copied to clipboard
class Rotation(child: Node, angle: Int = 0) : Transformation

Rotates the child node by multiples of 90°

Link copied to clipboard
class Ruler(side: Side = Side.TOP) : Region

A horizontal or vertical ruler, often used at the top and left of a drawing (in a BorderPane).

Link copied to clipboard
class ScrollableBar(content: Node? = null) : WrappedNode<ThreeRow>

A scrollable bar, with scroll buttons on the left and right (when horizontal) or at the top and bottom (when vertical).

Link copied to clipboard
class ScrollBar(orientation: Orientation = Orientation.HORIZONTAL) : Region

Part of a ScrollPane, but can also be used as a stand-alone component.

Link copied to clipboard

Determines when scroll bars should appear in a ScrollPane.

Link copied to clipboard
class ScrollPane(content: Node? = null) : Region, WithContent

Displays a portion of a content node, with scrollbars to pan. Some Glok controls have a built-in ScrollPanes (e.g. TextArea, ListView).

Link copied to clipboard
abstract class SelectButtonBase(text: String, graphic: Node?) : ButtonBase

A ButtonBase which can be selected, and when it is selected, it appears pressed.

Link copied to clipboard

A MenuItem which can be selected, and when it is selected a check mark (a tick) appear as the graphic to the left of the menu's text.

Link copied to clipboard

Often used in ToolBars to visually group buttons. The default theme displays a Separator as a vertical or horizontal bar.

Link copied to clipboard
open class SingleContainer(initialNode: Node? = null) : Region, WithContent

A container with one child, determined by contentProperty.

Link copied to clipboard
open class SingleNodeListCell<T, N : Node>(listView: ListView<T>, item: T, val node: N) : ListCell<T>

An abstract implementation of ListCell which has a single child node of type N. Consider using a HBox for node if you want a ListCell with more than one child nodes.

Link copied to clipboard
open class SingleNodeMixedTreeCell<I : MixedTreeItem<I>, N : Node>(treeView: MixedTreeView<I>, treeItem: I, val node: Node) : MixedTreeCell<I>
Link copied to clipboard
abstract class SingleNodeTreeCell<T, N : Node>(treeView: TreeView<T>, treeItem: TreeItem<T>, val node: N) : TreeCell<T>

An abstract implementation of TreeCell which has a single child node of type N. This takes care of layoutChildren, and nodePrefWidth and nodePrefHeight.

Link copied to clipboard

The selection model used by ListView and TreeView.

Link copied to clipboard

A rectangular (often square) area where a point can be chosen.

Link copied to clipboard
abstract class SliderBase : Region, HasReadOnly

The base class for all sliders. Internally, the slider's value is held as a ratio (in the range 0..1).

Link copied to clipboard
interface Snap<V>

Given an input, produces an output, which is snapped to key values, when the input is close to it. Used by [DouFloatSliders For example, suppose V is Int, and the values are a percentage. We could snap to 0, 25, 50, 75 and 100. If the threshold were 2, then inputs 23, 24, 25, 26, and 27 would all return 25.

Link copied to clipboard

Determines the position of the up/down arrows in a SpinnerBase.

Link copied to clipboard
abstract class SpinnerBase<V, P : Property<V>> : Region, HasReadOnly

Displays a TextField where a value can by typed in, as well 'up' and 'down' buttons where the value can be adjusted stepwise. This base class doesn't define what stepwise means. For example, IntSpinner has a IntSpinner.smallStep, therefore stepwise does not mean increment/decrement. The value of a spinner does not have to be Comparable, but is required for the subclass ComparableSpinner.

Link copied to clipboard
class SplitMenuButton(text: String, graphic: Node? = null) : ButtonBase, WithItems

A Button split into two parts. The left part acts like a regular Button, the right part acts like a MenuButton, which display items in a PopupMenu when clicked.

Link copied to clipboard
class SplitPane(initialOrientation: Orientation = Orientation.HORIZONTAL) : Region, WithItems

Lays out items either horizontally or vertically, with movable Dividers between them. Drag the Divider to alter how much space is allocated to each item.

Link copied to clipboard
Link copied to clipboard

A TextArea with the ability to style the text (in a limited way). This is designed as a code editor, where keywords, constants, Strings etc. can be displayed using different colors.

Link copied to clipboard
class SubMenu(text: String, graphic: Node? = null) : LabelledMenuItem, WithItems

A type of MenuItem, which displays a PopupMenu when it is hovered over. The PopupMenu is populated from items.

Link copied to clipboard
open class Tab(text: String, graphic: Node? = null) : BoxBase, HasDisabled, WithContent

Part of a TabBar / TabPane.

Link copied to clipboard
class TabBar : Region

A list of Tabs displayed in a row or column.

Link copied to clipboard

Determines if Tabs within a TabPane / TabBar have a close button.

Link copied to clipboard
class TabPane(side: Side = Side.TOP) : Region

Displays a row or column of Tabs. Clicking on a tab will display the tab's content.

Link copied to clipboard
class Text(text: String) : Region

A Node containing just plain text. This is much simpler than Label.

Link copied to clipboard

A multi-line text editor.

Link copied to clipboard
Link copied to clipboard
abstract class TextAreaBase<D : TextDocument>(val document: D) : TextInputControl

The base class for TextArea and StyledTextArea.

Link copied to clipboard

A single-line text editor. For multiple lines, use TextArea.

Link copied to clipboard

The base class for TextField and TextArea

Link copied to clipboard
open class TextListCell<T>(listView: ListView<T>, item: T, text: String = item.toString()) : SingleNodeListCell<T, Label>

A ListCell which uses a Label to display the cell's value. This is the default type of ListCell, if ListView.cellFactory is unchanged.

Link copied to clipboard
open class TextMixedTreeCell<I : MixedTreeItem<I>>(treeView: MixedTreeView<I>, treeItem: I, text: String = treeItem.toString()) : SingleNodeMixedTreeCell<I, Label>
Link copied to clipboard
data class TextPosition(val row: Int, val column: Int) : Comparable<TextPosition>

Holds the row and column data for caret/anchor positions within a TextArea. Both row and column are zero based, so the start of a document is (0,0).

Link copied to clipboard
open class TextTreeCell<T>(treeView: TreeView<T>, treeItem: TreeItem<T>, text: String = treeItem.value.toString()) : SingleNodeTreeCell<T, Label>
Link copied to clipboard

Lays out up to 3 children in a single row (or column), where the center node is guaranteed to be centered. left and right Nodes are aligned left and right.

Link copied to clipboard
class TitledPane(title: String, content: Node?) : Region, Toggle, WithContent

Combines a title, and content. The title is displayed above the content.

Link copied to clipboard
interface Toggle

The interface used by ToggleButton to allow it to be used as part of a ToggleGroup.

Link copied to clipboard
class ToggleButton(text: String, graphic: Node? = null, initialToggleGroup: ToggleGroup? = null) : ToggleButtonBase

A button which has a boolean selected state. If a ToggleButton is part of a ToggleGroup, then selecting one button will de-select all others. If the same button is pressed again, then it is also de-selected (so no buttons in the ToggleGroup are selected). If you always want one button to be selected, then use RadioButton instead.

Link copied to clipboard
abstract class ToggleButtonBase(text: String, graphic: Node? = null, initialToggleGroup: ToggleGroup? = null) : SelectButtonBase, Toggle

The base class for ToggleButton and RadioButton. The only difference between these two, is what happens when a selected menu item is clicked. A ToggleMenuItem becomes unselected, but a RadioMenuItem stays selected.

Link copied to clipboard

When a ToggleButton or RadioButton is added to a ToggleGroup, then only one button in the group can be selected at a time.

Link copied to clipboard
class ToggleMenuItem(text: String, initialToggleGroup: ToggleGroup? = null) : ToggleMenuItemBase

The analogous button class is ToggleButton.

Link copied to clipboard
abstract class ToggleMenuItemBase(text: String, initialToggleGroup: ToggleGroup? = null) : SelectMenuItemBase, Toggle

The base class for ToggleMenuItem and RadioMenuItem. The only difference between these two, is what happens when a selected menu item is clicked. A ToggleMenuItem becomes unselected, but a RadioMenuItem stays selected.

Link copied to clipboard
class ToolBar(side: Side = Side.TOP) : ToolBarBase

A horizontal or vertical bar, most often used to hold Buttons. Status Bars (at the bottom of many application windows) also use ToolBar.

Link copied to clipboard
sealed class ToolBarBase : Region, WithItems

ToolBarBase contains the implementation of ToolBar and MenuBar, which are identical, but may be styled differently.

Link copied to clipboard
abstract class Transformation(val child: Node) : Node
Link copied to clipboard
abstract class TreeCell<T>(val treeView: TreeView<T>, val treeItem: TreeItem<T>) : Region
Link copied to clipboard
open class TreeItem<T>(initialValue: T) : TreeItemBase
Link copied to clipboard
abstract class TreeItemBase

Common code shared by TreeItem and MixedTreeItem

Link copied to clipboard
class TreeView<T> : Region

Displays a hierarchical list of TreeItems in a tree structure. Each TreeItem can be a leaf, meaning it has no children. If it is not a leaf, then its children can be shown/hidden by either clicking on the "expand/contract" button (an arrow using Glok's default theme), or by double-clicking anywhere on the item.

Link copied to clipboard
open class VBox : BoxBase, WithChildren

Lays out its children in a column, with the first child at the top, and the last child at the bottom.

Link copied to clipboard
abstract class WrappedNode<N : Node>(inner: N) : Node

An easy way to build a control which has a single child.

Link copied to clipboard
abstract class WrappedRegion<N : Node>(inner: N) : Region

Similar to WrappedNode, but extends Region, so we have the option of adding borders and padding.