Class WPanelWithInsets

Direct Known Subclasses:
WBox, WGridPanel, WPlainPanel

public abstract class WPanelWithInsets extends WPanel
A panel that has layout insets.
Since:
4.0.0
  • Field Details

    • insets

      protected Insets insets
      The layout insets of this panel. They control how far from the panel's edges the widgets are placed.
  • Constructor Details

    • WPanelWithInsets

      public WPanelWithInsets()
  • Method Details

    • getInsets

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

      public WPanelWithInsets setInsets(Insets insets)
      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.

      Parameters:
      insets - the insets, should not be null
      Returns:
      this panel
    • expandToFit

      protected void expandToFit(WWidget w)
      Description copied from class: WPanel
      Expands this panel be at least as large as the widget.
      Overrides:
      expandToFit in class WPanel
      Parameters:
      w - the widget