Class WPlainPanel

Direct Known Subclasses:
WPlayerInvPanel

public class WPlainPanel extends WPanel
A panel that positions children by pixel-perfect positions.
  • Constructor Details

    • WPlainPanel

      public WPlainPanel()
  • Method Details

    • add

      public void add(WWidget w, int x, int y)
      Adds a new widget to this panel.

      If the widget can be resized, it will be resized to (18, 18).

      Parameters:
      w - the widget
      x - the X position
      y - the Y position
    • add

      public void add(WWidget w, int x, int y, int width, int height)
      Adds a new widget to this panel and resizes it to a custom size.
      Parameters:
      w - the widget
      x - the X position
      y - the Y position
      width - the new width
      height - the new height
    • getInsets

      public Insets getInsets()
      Gets the layout insets of this panel.
      Returns:
      the insets
      Since:
      4.0.0
    • setInsets

      public WPlainPanel setInsets(Insets insets)
      Sets the layout insets of this panel.

      The insets should be set before adding any widgets to this panel.

      Parameters:
      insets - the insets, should not be null
      Returns:
      this panel
      Since:
      4.0.0