GridNode
final class GridNode
Extends: Node
Package: dev.joid.lib.ui.node.impl.layout · Module: core · Source: GridNode.java
Places its visible children in rows that wrap at its width, and takes the height of its content.

Description
Section titled “Description”A child goes to the next row when it does not fit in the width that is left.
A height of 0 takes the height of the rows; a declared height is a minimum without overflow, and a fixed height with an overflow.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
GridNode | create(double x, double y, double width, double height) factory | Creates a grid at x, y with this width and height; a height of 0 follows the rows. |
Properties
Section titled “Properties”| Property | Type | Default | Summary |
|---|---|---|---|
| alignX signal | Align | Align.START | Where each row sits in the width: START, CENTER or END. |
| margin signal | double | Sets the space between the cells on both axes, in design pixels. | |
| marginHorizontal signal | double | 0D | Space between two cells of a row, in design pixels. |
| marginVertical signal | double | 0D | Space between two rows, in design pixels. |
Inherited from Node (24)
x · y · width · height · position · anchor · anchorX · anchorY · aspectRatio · zindex · zlevel · skeleton · visible · enabled · interactive · cursor · hoverDuration · hoverEquation · hover · overflow · scrollSpeed · scrollbar · label · draggable
Methods
Section titled “Methods”Inherited from Node (128)
load · render · renderHover · updateScroll · updateScrollX · updateScrollY · append · attach · body · clearChildren · getChild · getChildren · getNodeListAt · getParent · isAttached · getAbsoluteX · getAbsoluteY · getAbsoluteDefaultX · getAbsoluteDefaultY · toDrawX · toDrawY · w · h · dw · dh · mw · mh · aw · ah · ax · ay · getDefaultWidth · getDefaultHeight · removeHover · clearHover · refreshHover · getResolvedCursor · hoverValue · getHoverAnimator · isHovered · handleMousePressed · handleMouseReleased · handleMouseDragged · handleMouseScroll · handleCharTyped · handleKeyPressed · handleKeyReleased · getLastClickTime · getLastClickButton · getLastKey · getLastKeyTime · scrollX · scrollY · scrollTo · beforeScroll · hasOverflowX · hasOverflowY · getOverflowArea · getScrollX · getScrollY · getTargetScrollX · getTargetScrollY · getMaxScrollX · getMaxScrollY · isScrollEndX · isScrollEndY · startDragging · stopDragging · beforeDragStart · beforeDragDrop · isDragging · getDragX · getDragY · isDragged · getDragSource · getDraggedNode · getStartDragX · getStartDragY · getTargetDragX · getTargetDragY · effect · removeEffect · clearEffects · hasEffect · getEffect · layer · clearLayers · animate · removeAnimator · wait · watch · hasListener · isVisibleProperty · isMounted · getIndex · getUi · getHierarchy · getMappedIndex · getTaskList · getShortcutList · toJson · toString · getEventBus · getBodyConsumer · getDefaultX · getDefaultY · getLayoutX · getLayoutY · getShiftX · getShiftY · isStepping · getLastCodepoint · getLoadCount · getRenderTime · remove · self · copy · useStore · addTask · removeTask · addShortcut · removeShortcut · layoutPosition · layoutSize · fit · move · beforeMove · hoverColor
Events
Section titled “Events”Inherited from Node (21)
onUpdate · onDetach · onInit · onRender · onDraw · onMount · onHoverStart · onHover · onHoverEnd · onScroll · onScrollToEnd · onScrollEndReached · onDragStart · onDrag · onDragDrop · onDragSnap · onMove · onChildAppend · onClick · onAnimate · onWatch
Creation details
Section titled “Creation details”create
Section titled “create”GridNode create(double x, double y, double width, double height) factory
Creates a grid at x, y with this width and height; a height of 0 follows the rows.
Property details
Section titled “Property details”alignX
Section titled “alignX”this alignX(Align alignX)fluentthis alignX(Supplier<Align> alignX)fluent signalAlign getAlignX()
Default: Align.START
Where each row sits in the width: START, CENTER or END.
margin
Section titled “margin”this margin(double margin)fluentthis margin(Supplier<Double> margin)fluent signal
Sets the space between the cells on both axes, in design pixels.
marginHorizontal
Section titled “marginHorizontal”this marginHorizontal(double marginHorizontal)fluentthis marginHorizontal(Supplier<Double> marginHorizontal)fluent signaldouble getMarginHorizontal()
Default: 0D
Space between two cells of a row, in design pixels.
marginVertical
Section titled “marginVertical”this marginVertical(double marginVertical)fluentthis marginVertical(Supplier<Double> marginVertical)fluent signaldouble getMarginVertical()
Default: 0D
Space between two rows, in design pixels.
fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses
