Package-level declarations

Types

Link copied to clipboard
class ActionTooltip(val action: Action) : Tooltip
Link copied to clipboard
Link copied to clipboard
interface Background

Draws the background of a Region.

Link copied to clipboard
interface Border

A drawn border, around a Region.

Link copied to clipboard
class BrightnessColorFieldBackground(val observableBrightness: ObservableFloat) : Background
Link copied to clipboard
data class CalculatedSizes(val minWidth: Float, val minHeight: Float, val prefWidth: Float, val prefHeight: Float, val maxWidth: Float, val maxHeight: Float)
Link copied to clipboard
class Color(r: Float, g: Float, b: Float, a: Float)

Holds a color as red, green, blue, alpha float value in the range 0..1. If a color is created with values outside the range 0..1, they are silently clamped.

Link copied to clipboard

A Background with a flat color, or textured using a tint to supply the color.

Link copied to clipboard
interface ColoredBorder : Border

A Border with a flat color, or textured using a tint to supply the color.

Link copied to clipboard
class ColorFieldBackground(val topLeftColor: ObservableColor, val topRightColor: ObservableColor, val bottomLeftColor: ObservableColor, val bottomRightColor: ObservableColor) : Background

A Background, where each corner uses a different ObservableColor. This is used for the color field in the CustomColorPicker.

Link copied to clipboard

A Background composed of two other Backgrounds.

Link copied to clipboard
class CompoundBorder(val a: Border, val b: Border) : Border

A Border composed of two other Borders.

Link copied to clipboard
data class Edges(val top: Float, val right: Float, val bottom: Float, val left: Float)

Empty space surrounding the content of a Region.

Link copied to clipboard
class GradientBackground(val orientation: ObservableOrientation, fromColor: Color, toColor: Color) : Background

Draws a Background as a linear gradient. The left/bottom is fromColor and the right/top is toColor depending on orientation.

Link copied to clipboard
Link copied to clipboard
class HSVGradientBackground(orientation: Orientation, fromHue: Float, fromSaturation: Float, fromValue: Float, fromAlpha: Float, toHue: Float, toSaturation: Float, toValue: Float, toAlpha: Float) : Background

Draws a Background as a linear gradient. The left/bottom is fromHue and the right/top is toHue depending on orientation.

Link copied to clipboard

A Background, for a single hue.

Link copied to clipboard
class Icons(val resources: Resources) : NamedImages

Loads icons from Resources, where a single .png file contains many icons. These icons should have a gap between them, to prevent bleeding from one icon into its neighbours. You give a name to each icon, via a DSL (domain specific language).

Link copied to clipboard
class IconSheet(resources: Resources, textureName: String, val size: Int)
Link copied to clipboard
interface Image
Link copied to clipboard
class ImageView(image: Image?) : Region
Link copied to clipboard
interface NamedImages
Link copied to clipboard
class NinePatch(val image: Image, val edges: Edges)

Draws a rectangular region using 9 'patches' the four corner patches are drawn 1:1 (unscaled). The top and bottom patches are stretched (or shrunk) horizontally to fit between the corners. The left and right patches are similarly stretched (or shrunk) vertically. The center path is stretch (or shrunk) in both directions.

Link copied to clipboard
class NinePatchBackground(val ninePatch: NinePatch) : Background
Link copied to clipboard
class NinePatchBorder(val ninePatch: NinePatch) : Border

A Border which uses a NinePatch.

Link copied to clipboard
class NinePatchImages(val resources: Resources, textureName: String)

Stores a map of NinePatches keyed on name (as String), loaded from Resources.

Link copied to clipboard
Link copied to clipboard
object NoBorder : Border

The default border for a Region. Takes no space, and draws nothing.

Link copied to clipboard
abstract class Node

The base class for all GUI elements in a Scene. The nodes form a Scene Graph (which is a misnomer, because it is a tree structure, not a graph), starting at the Scene.root Node.

Link copied to clipboard
interface NodeParent
Link copied to clipboard
Link copied to clipboard
class OverlayStage(val parent: Stage, val stageType: StageType) : StageBase

A Stage which is not backed by a native Window, but instead lives within the regularStage.

Link copied to clipboard
Link copied to clipboard

A plain, rectangular border using a single color.

Link copied to clipboard
class RaisedBorder(val light: Color, val dark: Color) : Border

A rectangular border, with a 3D effect.

Link copied to clipboard

The middleman between Scene and Window.

Link copied to clipboard
class RepeatedBackground(val image: Image?) : Background

A repeated background pattern from an Image.

Link copied to clipboard

Used for images which can be resized on the fly. This is designed to be used by Icons, so that you can build the GUI Nodes, and then later, change the value of an iconSizeProperty, all icons will change size.

Link copied to clipboard
class RoundedBackground(color: Color, val radius: Float, val side: Side? = null) : ColoredBackground

Draws a rounded rectangle. If side is set, then only 1 side of the rectangle is rounded (i.e. two corners).

Link copied to clipboard
class RoundedBorder(color: Color, val radius: Float) : ColoredBorder
Link copied to clipboard
class SaturationColorFieldBackground(val observableSaturation: ObservableFloat) : Background

A Background, for a single saturation value.

Link copied to clipboard
class Scene(root: Node, width: Float = 0.0f, height: Float = 0.0f)

There is a 1:1 relationship between a window and a Stage, and at any moment in time there is also a 1:1 relationship between Stage and Scene. However, it is possible to replace a Stage's scene. In most cases though, a stage keeps the same scene.

Link copied to clipboard
class Sheets(icons: Icons)
Link copied to clipboard
Link copied to clipboard
interface Stage

Stage is the owner of a Scene. There are (or will be) two implementations : RegularStage, and OverlayStage.

Link copied to clipboard
abstract class StageBase : Stage
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class TextTooltip(val text: String) : Tooltip

A Tooltip which takes text, and splits it by line breaks, placing each line as a Label in a VBox. The Tantalum theme renders it with a rounded corners, and padding.

Link copied to clipboard
class TintedNinePatchBackground(val ninePatch: NinePatch, val tint: Color) : Background

Similar to NinePatchBackground, but the source texture's pixels are multiplied by tint. Used in two ways :

Link copied to clipboard
class TintedNinePatchBorder(val ninePatch: NinePatch, val tint: Color) : Border

Similar to NinePatchBorder, but the source texture's pixels are multiplied by tint. Used in two ways :

Link copied to clipboard
interface Tooltip

When the mouse remains still for a short period of time over a Node with a tooltip, the tooltip is displayed as a POPUP.

Link copied to clipboard
class UnderlineBackground(color: Color, val thickness: Float = 1.0f, val ratio: Float = 0.9f) : ColoredBackground

A Background specifically designed for underlining Text Nodes, where it isn't possible to use a Border.

Link copied to clipboard
Link copied to clipboard
interface WindowListener
Link copied to clipboard

Implemented by Node subclasses whose children are public, and mutable.

Link copied to clipboard
interface WithContent

Implemented by Node subclasses with a settable child called content.

Link copied to clipboard
interface WithItems : NodeParent

Implemented by Node subclasses with a list of Nodes called items, which are mutable.

Link copied to clipboard
interface WithPseudoStyle

Functions

Link copied to clipboard
fun icons(resources: Resources, block: Icons.() -> Unit): Icons

Collect metadata about the size and positions of Icons. Textures are not loaded yet, they will be loaded as required when Icons.get is called.

Link copied to clipboard
fun overlayStage(parent: Stage, stageType: StageType = StageType.NORMAL, block: OverlayStage.() -> Unit): OverlayStage
Link copied to clipboard
Link copied to clipboard
fun stage(parent: Stage, stageType: StageType = StageType.NORMAL, block: Stage.() -> Unit): Stage