Package swingtree.api

Class Layout.None

java.lang.Object
swingtree.api.Layout.None
All Implemented Interfaces:
Layout
Enclosing interface:
Layout

@Immutable public static final class Layout.None extends Object implements Layout
The Layout.None layout is a layout that represents the absence of a LayoutManager for a component. This means that whatever layout is currently installed for a component will be removed, and null will be set as the layout for the component.

Note that this is different from the Layout.Unspecific layout, which does not represent the absence of a LayoutManager for a component, but rather the absence of it being specified.

  • Method Details

    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface Layout
      Overrides:
      hashCode in class Object
      Returns:
      A hash code value for this layout.
    • equals

      public boolean equals(Object o)
      Specified by:
      equals in interface Layout
      Overrides:
      equals in class Object
      Parameters:
      o - The object to compare this layout to.
      Returns:
      true if the supplied object is a layout that is equal to this layout, false otherwise.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • installFor

      public void installFor(JComponent component)
      Description copied from interface: Layout
      Installs this layout for the supplied component.
      Specified by:
      installFor in interface Layout
      Parameters:
      component - The component to install this layout for.