GlokSettings

Various settings.

If you allow the user to customise these settings, then it is recommended that you load and save them using GlokSettings.load() and GlokSettings.save().

Load and save is only supported for JVM application (i.e. not web applications).

Properties

Link copied to clipboard
Link copied to clipboard

The maximum distance (in LogicalPixels) between two successive presses of a mouse are considered to be a click. i.e. if the mouse has moved further than this, then it isn't a click (just two separate mouse presses).

Link copied to clipboard
Link copied to clipboard

The maximum time in milliseconds that two successive presses of a mouse button are considered to be a click.

Link copied to clipboard
Link copied to clipboard

This property is bound to Tantalum.themeProperty, so if you wish to change the default theme, unbind it, and then either bind it to your own themeProperty, or set its value to your own theme. (the former is preferred, as it allows scenes to be restyled automatically when your themeProperty changes).

Link copied to clipboard
Link copied to clipboard

The distance (in LogicalPixels) that the mouse must move before a drag event is produced. i.e. if the user presses a mouse button, then moves a tiny distance (less than this), no drag event is fired.

Link copied to clipboard
Link copied to clipboard

When using high DPI devices (dots per inch), the scene needs to be scaled, otherwise all the controls will be too small to be usable. In this case, coordinates used in Node and Scene aren't pixels. Instead, 1 logical unit is 1 physical pixel on a low DPI device, but is globalScale physical pixels on a high DPI device.

Link copied to clipboard

The time between changes in milliseconds, where changes can be merged. The default is 1 second (1000 milliseconds). i.e. if we type with less than 1 second between keystrokes, the changes will be merged to form a single batch, so undo/redo will not operate 1 character at a time.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The default indentation used by TextArea and StyledTextArea. Changing this property will also change indentationTabs, indentationColumns and indentationBehaveLikeTabs

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

If you find the scroll-wheel / mouse-pad is always the wrong way round, toggle this value! However, if Scrollbars work correctly, but adjusting Spinners doesn't (or vice versa), then this property won't help.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The time (in milliseconds) the mouse has to hover, unmoving, before a tooltip appears.

Link copied to clipboard
Link copied to clipboard

Should secondary stages use native windows (useOverlayStages=false), or should OverlayStages be used instead?

Functions

Link copied to clipboard
fun GlokSettings.load(preferences: Preferences = preferences())

Loads GlokSettings using Java's Preferences. The default node is given by preferences, which is common to all Glok applications.

Link copied to clipboard

It is recommended that your application loads and saves GlokSettings via load and save using this Preferences node. This allows the user to choose the settings ONCE, and they will work across all Glok applications.

Link copied to clipboard
fun reset()

Resets the settings to their default values.

Link copied to clipboard
fun GlokSettings.save(preferences: Preferences = preferences())

Saves GlokSettings using Java's Preferences. The default node is given by preferences, which is common to all Glok applications.