public static class BorderUIResource.TitledBorderUIResource extends javax.swing.border.TitledBorder implements UIResource, java.io.Serializable
TitledBorder that also implements the
UIResource marker interface. This is useful for
implementing pluggable look-and-feels: When switching the current
LookAndFeel, only those borders are replaced that are marked as
UIResource. For this reason, a look-and-feel should
always install borders that implement UIResource,
such as the borders provided by this class.ABOVE_BOTTOM, ABOVE_TOP, BELOW_BOTTOM, BELOW_TOP, border, BOTTOM, CENTER, DEFAULT_JUSTIFICATION, DEFAULT_POSITION, EDGE_SPACING, LEADING, LEFT, RIGHT, TEXT_INSET_H, TEXT_SPACING, title, titleColor, titleFont, titleJustification, titlePosition, TOP, TRAILING| Constructor and Description |
|---|
BorderUIResource.TitledBorderUIResource(javax.swing.border.Border border)
Constructs an initially untitled TitledBorderUIResource
given another border.
|
BorderUIResource.TitledBorderUIResource(javax.swing.border.Border border,
java.lang.String title)
Constructs a TitledBorder given its border and title text.
|
BorderUIResource.TitledBorderUIResource(javax.swing.border.Border border,
java.lang.String title,
int titleJustification,
int titlePosition)
Constructs a TitledBorderUIResource given its border, title
text, horizontal alignment, and vertical position.
|
BorderUIResource.TitledBorderUIResource(javax.swing.border.Border border,
java.lang.String title,
int titleJustification,
int titlePosition,
java.awt.Font titleFont)
Constructs a TitledBorder given its border, title text,
horizontal alignment, vertical position, and font.
|
BorderUIResource.TitledBorderUIResource(javax.swing.border.Border border,
java.lang.String title,
int titleJustification,
int titlePosition,
java.awt.Font titleFont,
java.awt.Color titleColor)
Constructs a TitledBorder given its border, title text,
horizontal alignment, vertical position, font, and color.
|
BorderUIResource.TitledBorderUIResource(java.lang.String title)
Constructs a TitledBorderUIResource given the text of its title.
|
getBorder, getBorderInsets, getBorderInsets, getFont, getMinimumSize, getTitle, getTitleColor, getTitleFont, getTitleJustification, getTitlePosition, isBorderOpaque, paintBorder, setBorder, setTitle, setTitleColor, setTitleFont, setTitleJustification, setTitlePositionpublic BorderUIResource.TitledBorderUIResource(java.lang.String title)
title - the title text, or null to use no
title text.public BorderUIResource.TitledBorderUIResource(javax.swing.border.Border border)
border - the border underneath the title, or
null to use a default from
the current look and feel.public BorderUIResource.TitledBorderUIResource(javax.swing.border.Border border, java.lang.String title)
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.public BorderUIResource.TitledBorderUIResource(javax.swing.border.Border border, java.lang.String title, int titleJustification, int titlePosition)
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
TitledBorder.LEFT,
TitledBorder.CENTER,
TitledBorder.RIGHT,
TitledBorder.LEADING,
TitledBorder.TRAILING, or
TitledBorder.DEFAULT_JUSTIFICATION.titlePosition - the vertical position of the title text
in relation to the border. The value must be one of
TitledBorder.ABOVE_TOP,
TitledBorder.TOP,
TitledBorder.BELOW_TOP,
TitledBorder.ABOVE_BOTTOM,
TitledBorder.BOTTOM,
TitledBorder.BELOW_BOTTOM,
or TitledBorder.DEFAULT_POSITION.java.lang.IllegalArgumentException - if titleJustification
or titlePosition have an unsupported value.public BorderUIResource.TitledBorderUIResource(javax.swing.border.Border border, java.lang.String title, int titleJustification, int titlePosition, java.awt.Font titleFont)
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
TitledBorder.LEFT,
TitledBorder.CENTER,
TitledBorder.RIGHT,
TitledBorder.LEADING,
TitledBorder.TRAILING, or
TitledBorder.DEFAULT_JUSTIFICATION.titlePosition - the vertical position of the title text
in relation to the border. The value must be one of
TitledBorder.ABOVE_TOP,
TitledBorder.TOP,
TitledBorder.BELOW_TOP,
TitledBorder.ABOVE_BOTTOM,
TitledBorder.BOTTOM,
TitledBorder.BELOW_BOTTOM,
or TitledBorder.DEFAULT_POSITION.titleFont - the font for the title text, or null
to use a default from the current look and feel.java.lang.IllegalArgumentException - if titleJustification
or titlePosition have an unsupported value.public BorderUIResource.TitledBorderUIResource(javax.swing.border.Border border, java.lang.String title, int titleJustification, int titlePosition, java.awt.Font titleFont, java.awt.Color titleColor)
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
TitledBorder.LEFT,
TitledBorder.CENTER,
TitledBorder.RIGHT,
TitledBorder.LEADING,
TitledBorder.TRAILING, or
TitledBorder.DEFAULT_JUSTIFICATION.titlePosition - the vertical position of the title text
in relation to the border. The value must be one of
TitledBorder.ABOVE_TOP,
TitledBorder.TOP,
TitledBorder.BELOW_TOP,
TitledBorder.ABOVE_BOTTOM,
TitledBorder.BOTTOM,
TitledBorder.BELOW_BOTTOM,
or 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.java.lang.IllegalArgumentException - if titleJustification
or titlePosition have an unsupported value.