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.LayoutManagerA layout for the title label and separator(s) in titled separators.
-
-
Field Summary
Fields Modifier and Type Field Description private booleancenterSeparators
-
Constructor Summary
Constructors Modifier Constructor Description privateTitledSeparatorLayout(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 voidaddLayoutComponent(java.lang.String name, java.awt.Component comp)Does nothing.private static javax.swing.JLabelgetLabel(java.awt.Container parent)voidlayoutContainer(java.awt.Container parent)Lays out the specified container.java.awt.DimensionminimumLayoutSize(java.awt.Container parent)Computes and returns the minimum size dimensions for the specified container.java.awt.DimensionpreferredLayoutSize(java.awt.Container parent)Computes and returns the preferred size dimensions for the specified container.voidremoveLayoutComponent(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:
addLayoutComponentin 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:
removeLayoutComponentin 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:
minimumLayoutSizein 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:
preferredLayoutSizein 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:
layoutContainerin interfacejava.awt.LayoutManager- Parameters:
parent- the container to be laid out
-
getLabel
private static javax.swing.JLabel getLabel(java.awt.Container parent)
-
-