Node type (joe.win)


Extended By: Region

The Node widget is the abstract base class for the JavaFX widget hierarchy. This abstract type provides features available for all widgets.

Methods

Properties

All Node widgets have the following properties.

PropertyTypeDescription
#idStringJavaFX ID
#styleStringFXCSS style string
#visibleBooleanVisibility flag

See Styling with CSS for more on using CSS.

Methods


node.disable()


node.disable([flag]) → this

Sets the node's #disable property to flag; if omitted, flag defaults to true. While true, this node and its descendants in the scene graph will be disabled.

node.getProperty()


node.getProperty(keyword) → value

Gets the value of the property with the given keyword.

node.gridColumn()


node.gridColumn(index) → this

Sets the GridPane column constraint for the node to the given column index.

This method is equivalent to the JavaFX GridPane.setColumnIndex() method.

node.gridColumnSpan()


node.gridColumnSpan(span) → this

Sets the GridPane columnSpan constraint for the node to the given span, which must be a positive number.

This method is equivalent to the JavaFX GridPane.setColumnSpan() method.

node.gridHalignment()


node.gridHalignment(hpos) → this

Sets the GridPane halignment constraint for the node to the given HPos.

This method is equivalent to the JavaFX GridPane.setHalignment() method.

node.gridHgrow()


node.gridHgrow([priority]) → this

Sets the GridPane hgrow constraint for the node to the given Priority, or to Priority.ALWAYS if the priority is omitted.

This method is equivalent to the JavaFX GridPane.setHgrow() method.

node.gridMargin()


node.gridMargin(insets) → this

Sets the GridPane margin constraint for the node to the given Insets.

This method is equivalent to the JavaFX GridPane.setMargin() method.

node.gridRow()


node.gridRow(index) → this

Sets the GridPane row constraint for the node to the given row index.

This method is equivalent to the JavaFX GridPane.setRowIndex() method.

node.gridRowSpan()


node.gridRowSpan(span) → this

Sets the GridPane rowSpan constraint for the node to the given span, which must be a positive number.

This method is equivalent to the JavaFX GridPane.setRowSpan() method.

node.gridValignment()


node.gridValignment(vpos) → this

Sets the GridPane valignment constraint for the node to the given VPos.

This method is equivalent to the JavaFX GridPane.setValignment() method.

node.gridVgrow()


node.gridVgrow([priority]) → this

Sets the GridPane vgrow constraint for the node to the given Priority, or to Priority.ALWAYS if the priority is omitted.

This method is equivalent to the JavaFX GridPane.setVgrow() method.

node.hgrow()


node.hgrow([priority]) → this

Sets the HBox hgrow constraint for the node to the given Priority, or to Priority.ALWAYS if the priority is omitted.

This method is equivalent to the JavaFX HBox.setHgrow() method.

node.id()


node.id(id) → this

Sets the node's #id property to the given id string.

node.isDisabled()


node.isDisabled() → joe.Boolean

Returns true if the node has been disabled, and false otherwise.

node.listenTo()


node.listenTo(keyword, listener) → this

Adds a listener to the property with the given keyword. The listener should be a callable taking the three arguments:

  • The property keyword
  • The old value of the property
  • The new value of the property

The listener will be called when the property's value changes.

node.properties()


node.properties() → joe.Set

Returns a readonly Set of the object's property keywords.

node.setProperty()


node.setProperty(keyword, value) → this

Sets the value of the property with the given keyword. The value must be assignable to the property's value type.

node.splitResizeWithParent()


node.splitResizeWithParent(flag) → this

If flag is true (the default value) the node's "split" will resize when its parent SplitPane is resized, preserving its divider fraction. If false, the divider fraction will change to keep the node's width or height constant. Use this to prevent sidebars from resizing when the window is resized.

This is equivalent to the JavaFX SplitPane.setResizeWithParent() method.

node.styleClasses()


node.styleClasses() → joe.List

Gets the list of the node's FXCSS style class names. Values must be valid CSS style class names.

See Styling with CSS for more on using CSS.

node.styles()


node.styles(style, ...) → this

Sets the node's FXCSS #style property. The caller can pass multiple style strings, which will be joined with semicolons.

See Styling with CSS for more on using CSS.

node.toString()


node.toString() → joe.String

Returns the value's string representation.

node.vgrow()


node.vgrow([priority]) → this

Sets the VBox vgrow constraint for the node to the given Priority, or to Priority.ALWAYS if the priority is omitted.

This method is equivalent to the JavaFX VBox.setVgrow() method.