Class HorizontalBoxWidget


public class HorizontalBoxWidget extends BoxLayoutWidget
A Widget that places its children horizontally with a specified amount of space between them. It can also resize itself to fit its children if the auto resizing option is enabled.
  • Constructor Details

    • HorizontalBoxWidget

      public HorizontalBoxWidget(int x, int y, int width, int height, boolean autoresize)
      Constructs a HorizontalBoxWidget 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 horizontally with the specified margin between them. Adjusts the size of the widget if autoresize is enabled.
      Overrides:
      updateLayout in class BoxLayoutWidget