Class VerticalBoxWidget


public class VerticalBoxWidget extends BoxLayoutWidget
A Widget that arranges its children vertically with a specified margin between them. It can also resize itself to fit its children if the autoresize option is enabled.
  • Constructor Details

    • VerticalBoxWidget

      public VerticalBoxWidget(int x, int y, int width, int height, boolean autoresize)
      Constructs a VerticalBoxWidget with the specified position, size, and autoresize option.
      Parameters:
      x - the x-coordinate of the Widget
      y - the y-coordinate of the Widget
      width - the width of the Widget
      height - the height of the Widget
      autoresize - whether the Widget should automatically resize to fit its children
  • Method Details

    • updateLayout

      public void updateLayout()
      Updates the layout of the Widget, positioning its children vertically with the specified margin between them. Adjusts the size of the widget if autoresize is enabled.
      Overrides:
      updateLayout in class BoxLayoutWidget