Overview | Package | Class | Tree | Deprecated | Index | Help |
Java Platform 1.1.7 |
||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.java.swing.border.AbstractBorder | +--com.sun.java.swing.border.TitledBorder
Warning: serialized objects of this class will not be compatible with future swing releases. The current serialization support is appropriate for short term storage or RMI between Swing1.0 applications. It will not be possible to load serialized Swing1.0 objects with future releases of Swing. The JDK1.2 release of Swing will be the compatibility baseline for the serialized form of Swing objects.
Field Summary | |
static int | ABOVE_BOTTOM
|
static int | ABOVE_TOP
|
static int | BELOW_BOTTOM
|
static int | BELOW_TOP
|
Border | border
|
static int | BOTTOM
|
static int | CENTER
|
static int | DEFAULT_JUSTIFICATION
|
static int | DEFAULT_POSITION
|
static int | EDGE_SPACING
|
static int | LEFT
|
static int | RIGHT
|
static int | TEXT_INSET_H
|
static int | TEXT_SPACING
|
java.awt.Color | titleColor
|
java.awt.Font | titleFont
|
int | titleJustification
|
int | titlePosition
|
java.lang.String | title
|
static int | TOP
|
Constructor Summary | |
TitledBorder(java.lang.String title)
Creates a TitledBorder instance which uses an etched border. |
|
TitledBorder(Border border)
Creates a TitledBorder instance with the specified border and an empty title. |
|
TitledBorder(Border border,
java.lang.String title)
Creates a TitledBorder instance with the specified border and title. |
|
TitledBorder(Border border,
java.lang.String title,
int titleJustification,
int titlePosition)
Creates a TitledBorder instance with the specified border, title, title-justification, and title-position. |
|
TitledBorder(Border border,
java.lang.String title,
int titleJustification,
int titlePosition,
java.awt.Font titleFont)
Creates a TitledBorder instance with the specified border, title, title-justification, title-position, and title-font. |
|
TitledBorder(Border border,
java.lang.String title,
int titleJustification,
int titlePosition,
java.awt.Font titleFont,
java.awt.Color titleColor)
Creates a TitledBorder instance with the specified border, title, title-justification, title-position, title-font, and title-color. |
Method Summary | |
java.awt.Insets | getBorderInsets(java.awt.Component c)
Returns the insets of the border. |
Border | getBorder()
Returns the border of the titled border. |
java.awt.Font | getFont(java.awt.Component c)
|
java.awt.Dimension | getMinimumSize(java.awt.Component c)
Returns the minimum dimensions this border requires in order to fully display the border and title. |
java.awt.Color | getTitleColor()
Returns the title-color of the titled border. |
java.awt.Font | getTitleFont()
Returns the title-font of the titled border. |
int | getTitleJustification()
Returns the title-justification of the titled border. |
int | getTitlePosition()
Returns the title-position of the titled border. |
java.lang.String | getTitle()
Returns the title of the titled border. |
boolean | isBorderOpaque()
Returns whether or not the border is opaque. |
void | paintBorder(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
Paints the border for the specified component with the specified position and size. |
void | setBorder(Border border)
Sets the border of the titled border. |
void | setTitleColor(java.awt.Color titleColor)
Sets the title-color of the titled border. |
void | setTitleFont(java.awt.Font titleFont)
Sets the title-font of the titled border. |
void | setTitleJustification(int titleJustification)
Sets the title-justification of the titled border. |
void | setTitlePosition(int titlePosition)
Sets the title-position of the titled border. |
void | setTitle(java.lang.String title)
Sets the title of the titled border. param title the title for the border |
Methods inherited from class com.sun.java.swing.border.AbstractBorder | |
getBorderInsets, getInteriorRectangle, getInteriorRectangle, isBorderOpaque, paintBorder |
Methods inherited from class java.lang.Object | |
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait |
Field Detail |
protected java.lang.String title
protected Border border
protected int titlePosition
protected int titleJustification
protected java.awt.Font titleFont
protected java.awt.Color titleColor
public static final int DEFAULT_POSITION
public static final int ABOVE_TOP
public static final int TOP
public static final int BELOW_TOP
public static final int ABOVE_BOTTOM
public static final int BOTTOM
public static final int BELOW_BOTTOM
public static final int DEFAULT_JUSTIFICATION
public static final int LEFT
public static final int CENTER
public static final int RIGHT
protected static final int EDGE_SPACING
protected static final int TEXT_SPACING
protected static final int TEXT_INSET_H
Constructor Detail |
public TitledBorder(java.lang.String title)
title
- the title the border should displaypublic TitledBorder(Border border)
border
- the borderpublic TitledBorder(Border border, java.lang.String title)
border
- the border
title
- the title the border should displaypublic TitledBorder(Border border, java.lang.String title, int titleJustification, int titlePosition)
border
- the border
title
- the title the border should display
titleJustification
- the justification for the title
titlePosition
- the position for the titlepublic TitledBorder(Border border, java.lang.String title, int titleJustification, int titlePosition, java.awt.Font titleFont)
border
- the border
title
- the title the border should display
titleJustification
- the justification for the title
titlePosition
- the position for the title
titleFont
- the font for rendering the titlepublic TitledBorder(Border border, java.lang.String title, int titleJustification, int titlePosition, java.awt.Font titleFont, java.awt.Color titleColor)
border
- the border
title
- the title the border should display
titleJustification
- the justification for the title
titlePosition
- the position for the title
titleFont
- the font of the title
titleColor
- the color of the titleMethod Detail |
public void paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
c
- the component for which this border is being painted
g
- the paint graphics
x
- the x position of the painted border
y
- the y position of the painted border
width
- the width of the painted border
height
- the height of the painted borderpublic java.awt.Insets getBorderInsets(java.awt.Component c)
c
- the component for which this border insets value appliespublic boolean isBorderOpaque()
public java.lang.String getTitle()
public Border getBorder()
public int getTitlePosition()
public int getTitleJustification()
public java.awt.Font getTitleFont()
public java.awt.Color getTitleColor()
public void setTitle(java.lang.String title)
public void setBorder(Border border)
border
- the borderpublic void setTitlePosition(int titlePosition)
titlePosition
- the position for the borderpublic void setTitleJustification(int titleJustification)
titleJustification
- the justification for the borderpublic void setTitleFont(java.awt.Font titleFont)
titleFont
- the font for the border titlepublic void setTitleColor(java.awt.Color titleColor)
titleColor
- the color for the border titlepublic java.awt.Dimension getMinimumSize(java.awt.Component c)
c
- the component where this border will be drawnprotected java.awt.Font getFont(java.awt.Component c)
Overview | Package | Class | Tree | Deprecated | Index | Help |
Java Platform 1.1.7 |
||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |