Package com.jgoodies.forms.factories
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 Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
TitledSeparatorLayout
(boolean centerSeparators) Constructs a TitledSeparatorLayout that either centers the separators or aligns them along the font baseline of the title label. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addLayoutComponent
(String name, Component comp) Does nothing.private static JLabel
void
layoutContainer
(Container parent) Lays out the specified container.minimumLayoutSize
(Container parent) Computes and returns the minimum size dimensions for the specified container.preferredLayoutSize
(Container parent) Computes and returns the preferred size dimensions for the specified container.void
Does nothing.
-
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
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 interfaceLayoutManager
- Parameters:
name
- the string to be associated with the componentcomp
- the component to be added
-
removeLayoutComponent
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 interfaceLayoutManager
- Parameters:
comp
- the component to be removed
-
minimumLayoutSize
Computes and returns the minimum size dimensions for the specified container. Forwards this request to#preferredLayoutSize
.- Specified by:
minimumLayoutSize
in interfaceLayoutManager
- Parameters:
parent
- the component to be laid out- Returns:
- the container's minimum size.
- See Also:
-
preferredLayoutSize
Computes and returns the preferred size dimensions for the specified container. Returns the title label's preferred size.- Specified by:
preferredLayoutSize
in interfaceLayoutManager
- Parameters:
parent
- the component to be laid out- Returns:
- the container's preferred size.
- See Also:
-
layoutContainer
Lays out the specified container.- Specified by:
layoutContainer
in interfaceLayoutManager
- Parameters:
parent
- the container to be laid out
-
getLabel
-