All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.java.swing.border.TitledBorder
java.lang.Object
|
+----com.sun.java.swing.border.DefaultBorder
|
+----com.sun.java.swing.border.TitledBorder
- public class TitledBorder
- extends DefaultBorder
Object capable of rendering an arbitrary border
with the addition of a String title in some
known position and justification.
-
ABOVE_BOTTOM
-
-
ABOVE_TOP
-
-
BELOW_BOTTOM
-
-
BELOW_TOP
-
-
border
-
-
BOTTOM
-
-
CENTER
-
-
component
-
-
DEFAULT_JUSTIFICATION
-
-
DEFAULT_POSITION
-
-
EDGE_SPACING
-
-
LEFT
-
-
RIGHT
-
-
TEXT_INSET_H
-
-
TEXT_SPACING
-
-
title
-
-
titleColor
-
-
titleFont
-
-
titleJustification
-
-
titlePosition
-
-
TOP
-
-
TitledBorder(JComponent, Border)
-
-
TitledBorder(JComponent, Border, String)
-
-
TitledBorder(JComponent, Border, String, int, int)
-
-
TitledBorder(JComponent, Border, String, int, int, Font)
-
-
TitledBorder(JComponent, Border, String, int, int, Font, Color)
-
-
TitledBorder(JComponent, String)
- Creates a TitledBorder instance
that uses a grooved border.
-
getBorder()
-
-
getBorderInsets()
- This default implementation returns new Insets(0, 0, 0, 0).
-
getTitle()
-
-
getTitleColor()
-
-
getTitleFont()
-
-
getTitleJustification()
-
-
getTitlePosition()
-
-
isBorderOpaque()
- This default implementation returns false.
-
paintBorder(Graphics, int, int, int, int)
- This default implementation does no painting.
-
setBorder(Border)
-
-
setTitle(String)
-
-
setTitleColor(Color)
-
-
setTitleFont(Font)
-
-
setTitleJustification(int)
-
-
setTitlePosition(int)
-
title
protected String title
border
protected Border border
titlePosition
protected int titlePosition
titleJustification
protected int titleJustification
titleFont
protected Font titleFont
titleColor
protected Color titleColor
component
protected JComponent component
DEFAULT_POSITION
public static final int DEFAULT_POSITION
ABOVE_TOP
public static final int ABOVE_TOP
TOP
public static final int TOP
BELOW_TOP
public static final int BELOW_TOP
ABOVE_BOTTOM
public static final int ABOVE_BOTTOM
BOTTOM
public static final int BOTTOM
BELOW_BOTTOM
public static final int BELOW_BOTTOM
DEFAULT_JUSTIFICATION
public static final int DEFAULT_JUSTIFICATION
LEFT
public static final int LEFT
CENTER
public static final int CENTER
RIGHT
public static final int RIGHT
EDGE_SPACING
protected static final int EDGE_SPACING
TEXT_SPACING
protected static final int TEXT_SPACING
TEXT_INSET_H
protected static final int TEXT_INSET_H
TitledBorder
public TitledBorder(JComponent c,
String title)
- Creates a TitledBorder instance
that uses a grooved border.
- Parameters:
- c - The component from which the border should get
font and background color information.
- title - the title the border should display
TitledBorder
public TitledBorder(JComponent c,
Border border)
TitledBorder
public TitledBorder(JComponent c,
Border border,
String title)
TitledBorder
public TitledBorder(JComponent c,
Border border,
String title,
int titleJustification,
int titlePosition)
TitledBorder
public TitledBorder(JComponent c,
Border border,
String title,
int titleJustification,
int titlePosition,
Font titleFont)
TitledBorder
public TitledBorder(JComponent c,
Border border,
String title,
int titleJustification,
int titlePosition,
Font titleFont,
Color titleColor)
paintBorder
public void paintBorder(Graphics g,
int x,
int y,
int width,
int height)
- This default implementation does no painting.
- Overrides:
- paintBorder in class DefaultBorder
getBorderInsets
public Insets getBorderInsets()
- This default implementation returns new Insets(0, 0, 0, 0).
- Overrides:
- getBorderInsets in class DefaultBorder
isBorderOpaque
public boolean isBorderOpaque()
- This default implementation returns false.
- Overrides:
- isBorderOpaque in class DefaultBorder
getTitle
public String getTitle()
getBorder
public Border getBorder()
getTitlePosition
public int getTitlePosition()
getTitleJustification
public int getTitleJustification()
getTitleFont
public Font getTitleFont()
getTitleColor
public Color getTitleColor()
setTitle
public void setTitle(String title)
setBorder
public void setBorder(Border border)
setTitlePosition
public void setTitlePosition(int titlePosition)
setTitleJustification
public void setTitleJustification(int titleJustification)
setTitleFont
public void setTitleFont(Font titleFont)
setTitleColor
public void setTitleColor(Color titleColor)
All Packages Class Hierarchy This Package Previous Next Index