Package com.avrix.ui.widgets
Class PopupWidget
java.lang.Object
com.avrix.ui.widgets.Widget
com.avrix.ui.widgets.PanelWidget
com.avrix.ui.widgets.ScrollPanelWidget
com.avrix.ui.widgets.PopupWidget
The
PopupWidget
class is a custom widget that extends the ScrollPanelWidget.
This widget is designed to display a popup with scrollable content.
It provides additional functionalities specific to popup behavior.-
Field Summary
-
Constructor Summary
ConstructorDescriptionPopupWidget
(int x, int y, int width, int height) Constructs a newPopupWidget
with the specified position and size. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a child widget to thisPopupWidget
's list of children.void
close()
Closes the currentPopupWidget
void
onLeftMouseDownOutside
(int x, int y) Handles the left mouse button down event outside any visiblePopupWidget
void
onRightMouseDownOutside
(int x, int y) Handles the right mouse button down event outside any visiblePopupWidget
void
render()
Renders thePopupWidget
void
show()
Open currentPopupWidget
Methods inherited from class com.avrix.ui.widgets.ScrollPanelWidget
getHorizontalScrollbar, getVerticalScrollbar, onInitialize, removeChild, renderChildren, setMaxScrollX, setMaxScrollY, update
Methods inherited from class com.avrix.ui.widgets.PanelWidget
isDraggable, onLeftMouseDown, onLeftMouseUp, onLeftMouseUpOutside, postRender, setBackgroundColor, setBorderColor, setBorderRadius, setBorderWidth, setDraggable, setDrawBorder
Methods inherited from class com.avrix.ui.widgets.Widget
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, onKeyPress, onKeyRelease, onKeyRepeat, onMouseEnter, onMouseExit, onMouseMove, onMouseMoveOutside, onMouseWheel, onRightMouseDown, onRightMouseUp, onRightMouseUpOutside, preRender, removeFromScreen, setAlwaysOnTop, setHeight, setScrollable, setScrollLock, setScrollSpeed, setScrollX, setScrollY, setVisible, setWidth, setX, setXA, setY, setYA
-
Constructor Details
-
PopupWidget
public PopupWidget(int x, int y, int width, int height) Constructs a newPopupWidget
with the specified position and size.- Parameters:
x
- the x-coordinate of thePopupWidget
's positiony
- the y-coordinate of thePopupWidget
's positionwidth
- the width of thePopupWidget
height
- the height of thePopupWidget
-
-
Method Details
-
addChild
Adds a child widget to thisPopupWidget
's list of children.- Overrides:
addChild
in classScrollPanelWidget
- Parameters:
widget
- the widget to add as a child
-
onLeftMouseDownOutside
public void onLeftMouseDownOutside(int x, int y) Handles the left mouse button down event outside any visiblePopupWidget
- Overrides:
onLeftMouseDownOutside
in classWidget
- Parameters:
x
- absolute x-coordinate of the mouse positiony
- absolute y-coordinate of the mouse position
-
onRightMouseDownOutside
public void onRightMouseDownOutside(int x, int y) Handles the right mouse button down event outside any visiblePopupWidget
- Overrides:
onRightMouseDownOutside
in classWidget
- Parameters:
x
- absolute x-coordinate of the mouse positiony
- absolute y-coordinate of the mouse position
-
show
public void show()Open currentPopupWidget
-
close
public void close()Closes the currentPopupWidget
-
render
public void render()Renders thePopupWidget
- Overrides:
render
in classPanelWidget
-