Skip to content

CircleNode

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

Draws a filled disc in its bounds, with a color that fades on hover.

The disc is centered in the bounds, with a diameter of the smaller of the width and the height.

ReturnsSignatureSummary
CircleNodecreate(double x, double y, double diameter) factoryCreates a disc whose bounds start at x, y and are diameter design pixels wide and high.
CircleNode(double x, double y, double width, double height) protectedCalled by a subclass with the position and the size of the bounds.

PropertyTypeDefaultSummary
color signalColorColor.TRANSPARENTFill color of the disc.
hoveredColor signalColornone, the fill keeps color on hoverFill color while the node is hovered, reached with the hover progress; null keeps the fill unchanged.
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
voiddraw(double mouseX, double mouseY) hookDraws the disc with the color blended toward hoveredColor by the hover progress.
voiddrawSkeleton(double mouseX, double mouseY) hookDraws a disc of the loading color while the node waits.
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

CircleNode create(double x, double y, double diameter) factory

Creates a disc whose bounds start at x, y and are diameter design pixels wide and high.

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

Called by a subclass with the position and the size of the bounds.

  • this color(Color color) fluent
  • this color(Supplier<Color> color) fluent signal
  • Color getColor()

Default: Color.TRANSPARENT

Fill color of the disc.

  • this hoveredColor(Color hoveredColor) fluent
  • this hoveredColor(Supplier<Color> hoveredColor) fluent signal
  • Color getHoveredColor()

Default: none, the fill keeps color on hover

Fill color while the node is hovered, reached with the hover progress; null keeps the fill unchanged.

void draw(double mouseX, double mouseY) hook

Draws the disc with the color blended toward hoveredColor by the hover progress.

void drawSkeleton(double mouseX, double mouseY) hook

Draws a disc of the loading color while the node waits.


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