Class WPlainPanel

Direct Known Subclasses:
WPlayerInvPanel

public class WPlainPanel extends WPanelWithInsets
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
    • setInsets

      public WPlainPanel setInsets(Insets insets)
      Description copied from class: WPanelWithInsets
      Sets the layout insets of this panel. Subclasses are encouraged to override this method to return their more specific type (such as WGridPanel).

      If there are already widgets in this panel when the insets are modified, the panel is resized and the widgets are moved according to the insets.

      Overrides:
      setInsets in class WPanelWithInsets
      Parameters:
      insets - the insets, should not be null
      Returns:
      this panel