Skip to content

ProgressNode

class ProgressNode
Extends: Node
Package: dev.joid.lib.ui.node.impl.progress · Module: core · Source: ProgressNode.java

Shows a progress from 0 to 1 by sizing its fill part over an optional track part.

The fill and the track are nodes of your own: the progress node sizes and places them on every frame.

ReturnsSignatureSummary
ProgressNodecreate(double x, double y, double width, double height) factoryCreates a progress bar at x, y with this width and height.
ProgressNode(double x, double y, double width, double height) protectedCalled by a subclass with the same arguments as create.

PropertyTypeDefaultSummary
progress signalfloat0FShare of the bar covered by the fill, from 0 to 1; values outside are drawn as 0 or 1.
direction signalProgressDirectionProgressDirection.LEFT_TO_RIGHTSide the fill grows from.
trackNodenullNode drawn under the fill, at the size of the bar; null draws none.
fillNodenullNode that covers the share of the bar given by the progress.
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() hookSizes the track to the bar and the fill to the progress, from the side of the direction.
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 Node (21)

onUpdate · onDetach · onInit · onRender · onDraw · onMount · onHoverStart · onHover · onHoverEnd · onScroll · onScrollToEnd · onScrollEndReached · onDragStart · onDrag · onDragDrop · onDragSnap · onMove · onChildAppend · onClick · onAnimate · onWatch

ProgressNode create(double x, double y, double width, double height) factory

Creates a progress bar at x, y with this width and height.

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

Called by a subclass with the same arguments as create.

  • this progress(float progress) fluent
  • this progress(Supplier<Float> progress) fluent signal
  • float getProgress()

Default: 0F

Share of the bar covered by the fill, from 0 to 1; values outside are drawn as 0 or 1.

  • this direction(ProgressDirection direction) fluent
  • this direction(Supplier<ProgressDirection> direction) fluent signal
  • ProgressDirection getDirection()

Default: ProgressDirection.LEFT_TO_RIGHT

Side the fill grows from.

  • this track(Node track) fluent
  • Node getTrack()

Default: null

Node drawn under the fill, at the size of the bar; null draws none.

  • this fill(Node fill) fluent
  • Node getFill()

Default: null

Node that covers the share of the bar given by the progress. Throws an IllegalStateException when the node is attached without one.

void layout() hook

Sizes the track to the bar and the fill to the progress, from the side of the direction.


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