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
ConstructorsConstructorDescriptionPopupWidget(int x, int y, int width, int height) Constructs a newPopupWidgetwith the specified position and size. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a child widget to thisPopupWidget's list of children.voidclose()Closes the currentPopupWidgetvoidonLeftMouseDownOutside(int x, int y) Handles the left mouse button down event outside any visiblePopupWidgetvoidonRightMouseDownOutside(int x, int y) Handles the right mouse button down event outside any visiblePopupWidgetvoidrender()Renders thePopupWidgetvoidshow()Open currentPopupWidgetMethods inherited from class com.avrix.ui.widgets.ScrollPanelWidget
getHorizontalScrollbar, getVerticalScrollbar, onInitialize, removeChild, renderChildren, setMaxScrollX, setMaxScrollY, updateMethods inherited from class com.avrix.ui.widgets.PanelWidget
isDraggable, onLeftMouseDown, onLeftMouseUp, onLeftMouseUpOutside, postRender, setBackgroundColor, setBorderColor, setBorderRadius, setBorderWidth, setDraggable, setDrawBorderMethods 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 newPopupWidgetwith the specified position and size.- Parameters:
x- the x-coordinate of thePopupWidget's positiony- the y-coordinate of thePopupWidget's positionwidth- the width of thePopupWidgetheight- the height of thePopupWidget
-
-
Method Details
-
addChild
Adds a child widget to thisPopupWidget's list of children.- Overrides:
addChildin 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:
onLeftMouseDownOutsidein 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:
onRightMouseDownOutsidein 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:
renderin classPanelWidget
-