Class DefaultComponentFactory.TitledSeparatorLayout

java.lang.Object
com.jgoodies.forms.factories.DefaultComponentFactory.TitledSeparatorLayout
All Implemented Interfaces:
LayoutManager
Enclosing class:
DefaultComponentFactory

private static final class DefaultComponentFactory.TitledSeparatorLayout extends Object implements LayoutManager
A layout for the title label and separator(s) in titled separators.
  • Field Details

    • centerSeparators

      private final boolean centerSeparators
  • Constructor Details

    • TitledSeparatorLayout

      private TitledSeparatorLayout(boolean centerSeparators)
      Constructs a TitledSeparatorLayout that either centers the separators or aligns them along the font baseline of the title label.
      Parameters:
      centerSeparators - true to center, false to align along the font baseline of the title label
  • Method Details

    • addLayoutComponent

      public void addLayoutComponent(String name, Component comp)
      Does nothing. This layout manager looks up the components from the layout container and used the component's index in the child array to identify the label and separators.
      Specified by:
      addLayoutComponent in interface LayoutManager
      Parameters:
      name - the string to be associated with the component
      comp - the component to be added
    • removeLayoutComponent

      public void removeLayoutComponent(Component comp)
      Does nothing. This layout manager looks up the components from the layout container and used the component's index in the child array to identify the label and separators.
      Specified by:
      removeLayoutComponent in interface LayoutManager
      Parameters:
      comp - the component to be removed
    • minimumLayoutSize

      public Dimension minimumLayoutSize(Container parent)
      Computes and returns the minimum size dimensions for the specified container. Forwards this request to #preferredLayoutSize.
      Specified by:
      minimumLayoutSize in interface LayoutManager
      Parameters:
      parent - the component to be laid out
      Returns:
      the container's minimum size.
      See Also:
    • preferredLayoutSize

      public Dimension preferredLayoutSize(Container parent)
      Computes and returns the preferred size dimensions for the specified container. Returns the title label's preferred size.
      Specified by:
      preferredLayoutSize in interface LayoutManager
      Parameters:
      parent - the component to be laid out
      Returns:
      the container's preferred size.
      See Also:
    • layoutContainer

      public void layoutContainer(Container parent)
      Lays out the specified container.
      Specified by:
      layoutContainer in interface LayoutManager
      Parameters:
      parent - the container to be laid out
    • getLabel

      private static JLabel getLabel(Container parent)