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
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).
The maximum time in milliseconds that two successive presses of a mouse button are considered to be a click
.
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).
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.
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.
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.
The default indentation used by TextArea and StyledTextArea. Changing this property will also change indentationTabs, indentationColumns and indentationBehaveLikeTabs
See FileDialog
.
See Restart for details.
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.
The time (in milliseconds) the mouse has to hover, unmoving, before a tooltip appears.
Should secondary stages use native windows (useOverlayStages=false), or should OverlayStages be used instead?
Functions
Loads GlokSettings using Java's Preferences. The default node is given by preferences, which is common to all Glok
applications.
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.
Saves GlokSettings using Java's Preferences. The default node is given by preferences, which is common to all Glok
applications.