Overview
MigLayout node for JavaFX.
This node uses the popular MigLayout Java layout manager to perform layout of JavaFx nodes. If you are familiar with MigLayout out for Java, you should feel right at home. MigLayout is an advanced grid-based layout manager that also support absolute positioning and docking (similar to Swing's BorderLayout) where nodes are docked to the north, south, east, or west side of the layout.
MigLayout {
constraints: "fill"
content: Rectangle {
width: 100
height: 100
layoutInfo: MigNodeLayoutInfo {
constraints: "center"
}
}
}
This file also contains module functions that can reduce the boiler-plate code required to set the layoutInfo. The nodeConstraints function takes a MigLayout constraints string and returns a MigNodeLayoutInfo object. Using this function the previous example can be rewritten as below.
MigLayout {
constraints: "fill"
content: Rectangle {
width: 100
height: 100
layoutInfo: nodeConstraints( "center" )
}
}
TODO: - Support GridLayoutInfo using LC and AC
Profile: desktop
Variable Summary
| access | name | type | Can Read | Can Init | Can Write | Default Value | description |
|---|---|---|---|---|---|---|---|
| public | columns | String | ![]() | ![]() | ![]() |
The column constraints.
The column constraints. All of the valid MigLayout column constraints are supported: sizegroup, fill, grow, align, gap. |
|
| public | constraints | String | ![]() | ![]() | ![]() |
The layout constraints string.
The layout constraints string. All of the valid MigLayout constraints except for "debug" are supported. For example: wrap, insets, nogrid, fill, flow, align, etc. |
|
| public | rows | String | ![]() | ![]() | ![]() |
The row constraints.
The row constraints. All of the valid MigLayout row constraints are supported: sizegroup, fill, grow, align, gap. |
Inherited Variables
org.jfxtras.scene.layout.DefaultLayout
| access | name | type | Can Read | Can Init | Can Write | Default Value | description |
|---|---|---|---|---|---|---|---|
| public-read protected | defaultLayoutInfo | LayoutInfoBase | ![]() | subclass | subclass |
The default layout info for this Node.
The default layout info for this Node. Usually this will be initialized by the Node subclass to a static LayoutInfo for all instances. Any values set on this will override the default Constraint values. |
Script Function Summary
- public migNode(node: javafx.scene.Node, constraints: java.lang.String) : javafx.scene.Node
-
Use this function to associate the provided constraints string with the provided node's layout info.
Use this function to associate the provided constraints string with the provided node's layout info. This can be helpful if you already have a node that was created elsewhere and you just need to add some node constraints before adding it to a MigLayout.
-
Parameters
- node
- constraints
-
Returns
- Node
- public nodeConstraints(constraints: java.lang.String) : MigNodeLayoutInfo
