Class PopupWidget


public class PopupWidget extends ScrollPanelWidget
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.
  • Constructor Details

    • PopupWidget

      public PopupWidget(int x, int y, int width, int height)
      Constructs a new PopupWidget with the specified position and size.
      Parameters:
      x - the x-coordinate of the PopupWidget's position
      y - the y-coordinate of the PopupWidget's position
      width - the width of the PopupWidget
      height - the height of the PopupWidget
  • Method Details

    • addChild

      public void addChild(Widget widget)
      Adds a child widget to this PopupWidget's list of children.
      Overrides:
      addChild in class ScrollPanelWidget
      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 visible PopupWidget
      Overrides:
      onLeftMouseDownOutside in class Widget
      Parameters:
      x - absolute x-coordinate of the mouse position
      y - absolute y-coordinate of the mouse position
    • onRightMouseDownOutside

      public void onRightMouseDownOutside(int x, int y)
      Handles the right mouse button down event outside any visible PopupWidget
      Overrides:
      onRightMouseDownOutside in class Widget
      Parameters:
      x - absolute x-coordinate of the mouse position
      y - absolute y-coordinate of the mouse position
    • show

      public void show()
      Open current PopupWidget
    • close

      public void close()
      Closes the current PopupWidget
    • render

      public void render()
      Renders the PopupWidget
      Overrides:
      render in class PanelWidget