Package swingtree.api

Class Layout.Unspecific

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

@Immutable public static final class Layout.Unspecific extends Object implements Layout
The Layout.Unspecific layout is a layout that represents the lack of a specific layout being set for a component. Note that this does not represent the absence of a LayoutManager for a component, but rather the absence of it being specified. This means that whatever layout is currently installed for a component will be left as is, and no other layout will be installed for the component.

Note that this is different from the Layout.None layout, which represents the absence of a LayoutManager for a component (i.e. it removes any existing layout from the component and sets it to null).

  • 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)
      Does nothing.
      Specified by:
      installFor in interface Layout
      Parameters:
      component - The component to install the layout for.