Package com.avrix.ui.widgets
Class RadioButtonWidget.RadioValue
java.lang.Object
com.avrix.ui.widgets.Widget
com.avrix.ui.widgets.PanelWidget
com.avrix.ui.widgets.RadioButtonWidget.RadioValue
- Enclosing class:
- RadioButtonWidget
Represents a single radio button within the
RadioButtonWidget
.-
Field Summary
-
Constructor Summary
ConstructorDescriptionRadioValue
(String value, int x, int y, Consumer<RadioButtonWidget.RadioValue> onClickAction) Constructs aRadioButtonWidget.RadioValue
with the specified text, position, and click action. -
Method Summary
Modifier and TypeMethodDescriptionvoid
onLeftMouseUp
(int x, int y) Called when the left mouse button is released over theWidget
.void
render()
Renders theWidget
Methods inherited from class com.avrix.ui.widgets.PanelWidget
isDraggable, onLeftMouseDown, onLeftMouseUpOutside, postRender, setBackgroundColor, setBorderColor, setBorderRadius, setBorderWidth, setDraggable, setDrawBorder, update
Methods inherited from class com.avrix.ui.widgets.Widget
addChild, addToScreen, bringToTop, drawArc, drawArc, drawCircle, drawEllipse, drawImage, drawLine, drawRect, drawRectOutline, drawRoundedRect, drawRoundedRectOutline, drawText, getAbsoluteParent, getChildren, getHeight, getMaxScrollX, getMaxScrollY, getParent, getScrollSpeed, getScrollX, getScrollY, getWidth, getX, getXA, getY, getYA, intersectScissor, isAlwaysOnTop, isHovered, isPointOver, isScrollable, isScrollLock, isVisible, isVisibleWithinParent, isVisibleWithinWindow, onInitialize, onKeyPress, onKeyRelease, onKeyRepeat, onLeftMouseDownOutside, onMouseEnter, onMouseExit, onMouseMove, onMouseMoveOutside, onMouseWheel, onRightMouseDown, onRightMouseDownOutside, onRightMouseUp, onRightMouseUpOutside, preRender, removeChild, removeFromScreen, renderChildren, setAlwaysOnTop, setHeight, setMaxScrollX, setMaxScrollY, setScrollable, setScrollLock, setScrollSpeed, setScrollX, setScrollY, setVisible, setWidth, setX, setXA, setY, setYA
-
Constructor Details
-
RadioValue
Constructs aRadioButtonWidget.RadioValue
with the specified text, position, and click action. This class represents a single radio button within theRadioButtonWidget
.- Parameters:
value
- the text to be displayed on the radio buttonx
- the x-coordinate of theRadioButtonWidget.RadioValue
within its parentWidget
y
- the y-coordinate of theRadioButtonWidget.RadioValue
within its parentWidget
onClickAction
- the action to perform when the radio button is clicked
-
-
Method Details
-
onLeftMouseUp
public void onLeftMouseUp(int x, int y) Called when the left mouse button is released over theWidget
.- Overrides:
onLeftMouseUp
in classPanelWidget
- Parameters:
x
- relative x-coordinate of the mouse positiony
- relative y-coordinate of the mouse position
-
render
public void render()Renders theWidget
- Overrides:
render
in classPanelWidget
-