Skip to content

CheckboxNode

abstract class CheckboxNode
Extends: BaseCheckboxNode
Package: dev.joid.lib.ui.node.impl.control.checkbox · Module: core · Source: CheckboxNode.java

A checkbox made of two parts: a box that covers the control and a mark shown while it is checked.

A skin extends it and gives its parts in its constructor; the checkbox places them on every frame. A part of size 0 takes the size of the checkbox; a part with a size keeps it and is centered. Attaching a checkbox without a mark throws an IllegalStateException.

ReturnsSignatureSummary
CheckboxNode(double x, double y, double width, double height) protectedCreates the checkbox at x, y with a width and a height in design pixels, from the constructor of a skin.

PropertyTypeDefaultSummary
boxNodenullThe node drawn behind the mark, over the whole checkbox, with a zindex of -1; optional.
markNodenullThe node shown in the middle of the box while it is checked, and hidden otherwise; required.
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

ReturnsSignatureSummary
voidlayout() hookPlaces the box over the whole checkbox and centers the mark, shown or hidden by the value.
Inherited from BaseCheckboxNode (4)

checked · change · beforeChange · isChecked

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

Inherited from BaseCheckboxNode (1)

onChange

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

CheckboxNode(double x, double y, double width, double height) protected

Creates the checkbox at x, y with a width and a height in design pixels, from the constructor of a skin.

  • this box(Node box) fluent
  • Node getBox()

Default: null

The node drawn behind the mark, over the whole checkbox, with a zindex of -1; optional. Giving another node replaces the previous one at its place.

  • this mark(Node mark) fluent
  • Node getMark()

Default: null

The node shown in the middle of the box while it is checked, and hidden otherwise; required. Giving another node replaces the previous one at its place.

void layout() hook

Places the box over the whole checkbox and centers the mark, shown or hidden by the value.


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

Report a problem with this page