Package com.jgoodies.forms.factories
Class DefaultComponentFactory.TitledSeparatorLayout
- java.lang.Object
-
- com.jgoodies.forms.factories.DefaultComponentFactory.TitledSeparatorLayout
-
- All Implemented Interfaces:
java.awt.LayoutManager
- Enclosing class:
- DefaultComponentFactory
private static final class DefaultComponentFactory.TitledSeparatorLayout extends java.lang.Object implements java.awt.LayoutManager
A layout for the title label and separator(s) in titled separators.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
centerSeparators
-
Constructor Summary
Constructors Modifier Constructor Description private
TitledSeparatorLayout(boolean centerSeparators)
Constructs a TitledSeparatorLayout that either centers the separators or aligns them along the font baseline of the title label.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLayoutComponent(java.lang.String name, java.awt.Component comp)
Does nothing.private static javax.swing.JLabel
getLabel(java.awt.Container parent)
void
layoutContainer(java.awt.Container parent)
Lays out the specified container.java.awt.Dimension
minimumLayoutSize(java.awt.Container parent)
Computes and returns the minimum size dimensions for the specified container.java.awt.Dimension
preferredLayoutSize(java.awt.Container parent)
Computes and returns the preferred size dimensions for the specified container.void
removeLayoutComponent(java.awt.Component comp)
Does nothing.
-
-
-
Constructor Detail
-
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 Detail
-
addLayoutComponent
public void addLayoutComponent(java.lang.String name, java.awt.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 interfacejava.awt.LayoutManager
- Parameters:
name
- the string to be associated with the componentcomp
- the component to be added
-
removeLayoutComponent
public void removeLayoutComponent(java.awt.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 interfacejava.awt.LayoutManager
- Parameters:
comp
- the component to be removed
-
minimumLayoutSize
public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
Computes and returns the minimum size dimensions for the specified container. Forwards this request to#preferredLayoutSize
.- Specified by:
minimumLayoutSize
in interfacejava.awt.LayoutManager
- Parameters:
parent
- the component to be laid out- Returns:
- the container's minimum size.
- See Also:
preferredLayoutSize(Container)
-
preferredLayoutSize
public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
Computes and returns the preferred size dimensions for the specified container. Returns the title label's preferred size.- Specified by:
preferredLayoutSize
in interfacejava.awt.LayoutManager
- Parameters:
parent
- the component to be laid out- Returns:
- the container's preferred size.
- See Also:
minimumLayoutSize(Container)
-
layoutContainer
public void layoutContainer(java.awt.Container parent)
Lays out the specified container.- Specified by:
layoutContainer
in interfacejava.awt.LayoutManager
- Parameters:
parent
- the container to be laid out
-
getLabel
private static javax.swing.JLabel getLabel(java.awt.Container parent)
-
-