Ruler

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).

Theme DSL

"ruler" {

    font( value : Font )
    font( size : Int, style : FontStyle, family : String... )
    font( size : Int, family : String... )

    format( value : Format ) // Converts numbers to Strings. See java.text.Format

    textColor( value : Color )
    textColor( value : String )

    ":top" { padding( ... ) }
    ":bottom" { padding( ... ) }
    ":left" { padding( ... ) }
    ":right" { padding( ... ) }
}

The padding determines the size of the markings along the ruler.

Ruler inherits all the features of Region.

Constructors

Link copied to clipboard
constructor(side: Side = Side.TOP)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
var font: Font
Link copied to clipboard
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 set to true, then the lower bound is at the bottom, and the upper bound at the top. i.e. when your Y axis points upwards.

Link copied to clipboard
var side: Side
Link copied to clipboard
Link copied to clipboard
var step: Float
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun nodePrefHeight(): Float

Each subclass of node can determine its preferred height. As most nodes are composed of smaller nodes, this is typically calculated using evalPrefWidth of the child nodes, with extra added for spacing, padding and borders.

Link copied to clipboard
open override fun nodePrefWidth(): Float

Each subclass of node can determine its preferred width. As most nodes are composed of smaller nodes, this is typically calculated using evalPrefWidth of the child nodes, with extra added for spacing, padding and borders.