|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.border.AbstractBorder
javax.swing.border.TitledBorder
javax.swing.plaf.BorderUIResource.TitledBorderUIResource
public static class BorderUIResource.TitledBorderUIResource
A 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.
Field Summary |
---|
Fields inherited from class javax.swing.border.TitledBorder |
---|
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 Summary | |
---|---|
BorderUIResource.TitledBorderUIResource(Border border)
Constructs an initially untitled TitledBorderUIResource given another border. |
|
BorderUIResource.TitledBorderUIResource(Border border,
String title)
Constructs a TitledBorder given its border and title text. |
|
BorderUIResource.TitledBorderUIResource(Border border,
String title,
int titleJustification,
int titlePosition)
Constructs a TitledBorderUIResource given its border, title text, horizontal alignment, and vertical position. |
|
BorderUIResource.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. |
|
BorderUIResource.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. |
|
BorderUIResource.TitledBorderUIResource(String title)
Constructs a TitledBorderUIResource given the text of its title. |
Method Summary |
---|
Methods inherited from class javax.swing.border.TitledBorder |
---|
getBorder, getBorderInsets, getBorderInsets, getFont, getMinimumSize, getTitle, getTitleColor, getTitleFont, getTitleJustification, getTitlePosition, isBorderOpaque, paintBorder, setBorder, setTitle, setTitleColor, setTitleFont, setTitleJustification, setTitlePosition |
Methods inherited from class javax.swing.border.AbstractBorder |
---|
getInteriorRectangle, getInteriorRectangle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BorderUIResource.TitledBorderUIResource(String title)
title
- the title text, or null
to use no
title text.public BorderUIResource.TitledBorderUIResource(Border border)
border
- the border underneath the title, or
null
to use a default from
the current look and feel.public BorderUIResource.TitledBorderUIResource(Border border, 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(Border border, 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
.
IllegalArgumentException
- if titleJustification
or titlePosition
have an unsupported value.public BorderUIResource.TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, 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.
IllegalArgumentException
- if titleJustification
or titlePosition
have an unsupported value.public BorderUIResource.TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont, 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.
IllegalArgumentException
- if titleJustification
or titlePosition
have an unsupported value.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |