| javax.swing.JPanel com.jeta.forms.components.separator.TitledSeparator
TitledSeparator | public class TitledSeparator extends JPanel (Code) | | TitledSeparator is a component that can be used as a
replacement for a titled border. It is composed of a JLabel with a horizontal
line (JSeparator) either to the left or right of the label. It is useful when
nested panels are not appropriate but a visual separator is required between
different parts of a GUI. It is derived from the JGoodies separator
component.
See Also: com.jgoodies.forms.factories.DefaultComponentFactory.createSeparator(String) author: Jeff Tassin |
TitledSeparator | public TitledSeparator()(Code) | | Creates a default TitledSeparator instance
|
TitledSeparator | public TitledSeparator(String text)(Code) | | Creates and returns a labeled separator with the label in the left-hand
side. Useful to separate paragraphs in a panel; often a better choice
than a TitledBorder .
Parameters: text - the title's text a title label with separator on the right side |
TitledSeparator | public TitledSeparator(String text, int alignment)(Code) | | Creates and returns a labeled separator. Useful to separate paragraphs in
a panel, which is often a better choice than a TitledBorder .
Parameters: text - the title's text Parameters: alignment - text alignment: left, center, right a separator with title label |
getAlignment | public int getAlignment()(Code) | | Returns the alignment of the separator line relative to the label.
the separator alignment. SwingConstants.LEFT, CENTER, or RIGHT |
getText | public String getText()(Code) | | Returns the title text.
the title text. |
getTitleColor | public Color getTitleColor()(Code) | | Returns the color of the title text
the color used for title text |
getTitleFont | public Font getTitleFont()(Code) | | Returns the font of the title text.
the font used for title text. |
setAlignment | public void setAlignment(int alignment)(Code) | | Sets the alignment of the separator line relative to the label.
Parameters: alignment - the alignment to set. SwingConstants.LEFT, CENTER, or RIGHT |
setText | public void setText(String title)(Code) | | Sets the title text.
Parameters: title - the title text to set. |
setTitleColor | public void setTitleColor(Color c)(Code) | | Sets the color of the title text
Parameters: c - the color used for title text |
setTitleFont | public void setTitleFont(Font font)(Code) | | Sets the font of the title text.
Parameters: font - the font used for title text. |
|
|