javax.swing.plaf
public static class BorderUIResource.TitledBorderUIResource extends TitledBorder implements UIResource, Serializable
UIResource
,
such as the borders provided by this class.
Constructor Summary | |
---|---|
TitledBorderUIResource(String title)
Constructs a TitledBorderUIResource given the text of its title.
| |
TitledBorderUIResource(Border border)
Constructs an initially untitled TitledBorderUIResource
given another border.
| |
TitledBorderUIResource(Border border, String title)
Constructs a TitledBorder given its border and title text.
| |
TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition)
Constructs a TitledBorderUIResource given its border, title
text, horizontal alignment, and vertical position.
| |
TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont)
Constructs a TitledBorder given its border, title text,
horizontal alignment, vertical position, and font.
| |
TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor)
Constructs a TitledBorder given its border, title text,
horizontal alignment, vertical position, font, and color.
|
Parameters: title the title text, or null
to use no
title text.
Parameters: border the border underneath the title, or
null
to use a default from
the current look and feel.
Parameters: border the border underneath the title, or
null
to use a default from
the current look and feel.
title the title text, or null
to use no title text.
Parameters: border the border underneath the title, or
null
to use a default
from the current look and feel.
title the title text, or null
to use no title text.
titleJustification the horizontal alignment of the title
text in relation to the border. The value must be one of
{@link javax.swing.border.TitledBorder#LEFT},
{@link javax.swing.border.TitledBorder#CENTER},
{@link javax.swing.border.TitledBorder#RIGHT},
{@link javax.swing.border.TitledBorder#LEADING},
{@link javax.swing.border.TitledBorder#TRAILING}, or
{@link javax.swing.border.TitledBorder#DEFAULT_JUSTIFICATION}.
titlePosition the vertical position of the title text
in relation to the border. The value must be one of
{@link javax.swing.border.TitledBorder#ABOVE_TOP},
{@link javax.swing.border.TitledBorder#TOP},
{@link javax.swing.border.TitledBorder#BELOW_TOP},
{@link javax.swing.border.TitledBorder#ABOVE_BOTTOM},
{@link javax.swing.border.TitledBorder#BOTTOM},
{@link javax.swing.border.TitledBorder#BELOW_BOTTOM},
or {@link javax.swing.border.TitledBorder#DEFAULT_POSITION}.
Throws: IllegalArgumentException if titleJustification
or titlePosition
have an unsupported value.
Parameters: border the border underneath the title, or
null
to use a default
from the current look and feel.
title the title text, or null
to use no title text.
titleJustification the horizontal alignment of the title
text in relation to the border. The value must be one of
{@link javax.swing.border.TitledBorder#LEFT},
{@link javax.swing.border.TitledBorder#CENTER},
{@link javax.swing.border.TitledBorder#RIGHT},
{@link javax.swing.border.TitledBorder#LEADING},
{@link javax.swing.border.TitledBorder#TRAILING}, or
{@link javax.swing.border.TitledBorder#DEFAULT_JUSTIFICATION}.
titlePosition the vertical position of the title text
in relation to the border. The value must be one of
{@link javax.swing.border.TitledBorder#ABOVE_TOP},
{@link javax.swing.border.TitledBorder#TOP},
{@link javax.swing.border.TitledBorder#BELOW_TOP},
{@link javax.swing.border.TitledBorder#ABOVE_BOTTOM},
{@link javax.swing.border.TitledBorder#BOTTOM},
{@link javax.swing.border.TitledBorder#BELOW_BOTTOM},
or {@link javax.swing.border.TitledBorder#DEFAULT_POSITION}.
titleFont the font for the title text, or null
to use a default from the current look and feel.
Throws: IllegalArgumentException if titleJustification
or titlePosition
have an unsupported value.
Parameters: border the border underneath the title, or
null
to use a default
from the current look and feel.
title the title text, or null
to use no title text.
titleJustification the horizontal alignment of the title
text in relation to the border. The value must be one of
{@link javax.swing.border.TitledBorder#LEFT},
{@link javax.swing.border.TitledBorder#CENTER},
{@link javax.swing.border.TitledBorder#RIGHT},
{@link javax.swing.border.TitledBorder#LEADING},
{@link javax.swing.border.TitledBorder#TRAILING}, or
{@link javax.swing.border.TitledBorder#DEFAULT_JUSTIFICATION}.
titlePosition the vertical position of the title text
in relation to the border. The value must be one of
{@link javax.swing.border.TitledBorder#ABOVE_TOP},
{@link javax.swing.border.TitledBorder#TOP},
{@link javax.swing.border.TitledBorder#BELOW_TOP},
{@link javax.swing.border.TitledBorder#ABOVE_BOTTOM},
{@link javax.swing.border.TitledBorder#BOTTOM},
{@link javax.swing.border.TitledBorder#BELOW_BOTTOM},
or {@link javax.swing.border.TitledBorder#DEFAULT_POSITION}.
titleFont the font for the title text, or null
to use a default from the current look and feel.
titleColor the color for the title text, or null
to use a default from the current look and feel.
Throws: IllegalArgumentException if titleJustification
or titlePosition
have an unsupported value.