Package swingtree.api

Class Layout.BorderLayoutInstaller

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

@Immutable public static final class Layout.BorderLayoutInstaller extends Object implements Layout
The Layout.BorderLayoutInstaller layout is a layout that represents a BorderLayout layout configuration for a component, which consists of the horizontal gap and vertical gap.
Whenever this layout configuration changes, it will create and re-install a new BorderLayout onto the component based on the new configuration.
  • 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(@Nullable 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.
    • installFor

      public void installFor(JComponent component)
      Installs a BorderLayout onto the supplied component using the horizontal and vertical gap sizes stored in this configuration. If a BorderLayout is already installed, only the gap values that have changed are updated and JComponent.revalidate() is called to trigger a layout refresh.
      Specified by:
      installFor in interface Layout
      Parameters:
      component - The component to install the BorderLayout for.
    • toString

      public String toString()
      Overrides:
      toString in class Object