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.


Variable Index

 o ABOVE_BOTTOM
 o ABOVE_TOP
 o BELOW_BOTTOM
 o BELOW_TOP
 o border
 o BOTTOM
 o CENTER
 o component
 o DEFAULT_JUSTIFICATION
 o DEFAULT_POSITION
 o EDGE_SPACING
 o LEFT
 o RIGHT
 o TEXT_INSET_H
 o TEXT_SPACING
 o title
 o titleColor
 o titleFont
 o titleJustification
 o titlePosition
 o TOP

Constructor Index

 o TitledBorder(JComponent, Border)
 o TitledBorder(JComponent, Border, String)
 o TitledBorder(JComponent, Border, String, int, int)
 o TitledBorder(JComponent, Border, String, int, int, Font)
 o TitledBorder(JComponent, Border, String, int, int, Font, Color)
 o TitledBorder(JComponent, String)
Creates a TitledBorder instance that uses a grooved border.

Method Index

 o getBorder()
 o getBorderInsets()
This default implementation returns new Insets(0, 0, 0, 0).
 o getTitle()
 o getTitleColor()
 o getTitleFont()
 o getTitleJustification()
 o getTitlePosition()
 o isBorderOpaque()
This default implementation returns false.
 o paintBorder(Graphics, int, int, int, int)
This default implementation does no painting.
 o setBorder(Border)
 o setTitle(String)
 o setTitleColor(Color)
 o setTitleFont(Font)
 o setTitleJustification(int)
 o setTitlePosition(int)

Variables

 o title
 protected String title
 o border
 protected Border border
 o titlePosition
 protected int titlePosition
 o titleJustification
 protected int titleJustification
 o titleFont
 protected Font titleFont
 o titleColor
 protected Color titleColor
 o component
 protected JComponent component
 o DEFAULT_POSITION
 public static final int DEFAULT_POSITION
 o ABOVE_TOP
 public static final int ABOVE_TOP
 o TOP
 public static final int TOP
 o BELOW_TOP
 public static final int BELOW_TOP
 o ABOVE_BOTTOM
 public static final int ABOVE_BOTTOM
 o BOTTOM
 public static final int BOTTOM
 o BELOW_BOTTOM
 public static final int BELOW_BOTTOM
 o DEFAULT_JUSTIFICATION
 public static final int DEFAULT_JUSTIFICATION
 o LEFT
 public static final int LEFT
 o CENTER
 public static final int CENTER
 o RIGHT
 public static final int RIGHT
 o EDGE_SPACING
 protected static final int EDGE_SPACING
 o TEXT_SPACING
 protected static final int TEXT_SPACING
 o TEXT_INSET_H
 protected static final int TEXT_INSET_H

Constructors

 o 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
 o TitledBorder
 public TitledBorder(JComponent c,
                     Border border)
 o TitledBorder
 public TitledBorder(JComponent c,
                     Border border,
                     String title)
 o TitledBorder
 public TitledBorder(JComponent c,
                     Border border,
                     String title,
                     int titleJustification,
                     int titlePosition)
 o TitledBorder
 public TitledBorder(JComponent c,
                     Border border,
                     String title,
                     int titleJustification,
                     int titlePosition,
                     Font titleFont)
 o TitledBorder
 public TitledBorder(JComponent c,
                     Border border,
                     String title,
                     int titleJustification,
                     int titlePosition,
                     Font titleFont,
                     Color titleColor)

Methods

 o 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
 o getBorderInsets
 public Insets getBorderInsets()
This default implementation returns new Insets(0, 0, 0, 0).

Overrides:
getBorderInsets in class DefaultBorder
 o isBorderOpaque
 public boolean isBorderOpaque()
This default implementation returns false.

Overrides:
isBorderOpaque in class DefaultBorder
 o getTitle
 public String getTitle()
 o getBorder
 public Border getBorder()
 o getTitlePosition
 public int getTitlePosition()
 o getTitleJustification
 public int getTitleJustification()
 o getTitleFont
 public Font getTitleFont()
 o getTitleColor
 public Color getTitleColor()
 o setTitle
 public void setTitle(String title)
 o setBorder
 public void setBorder(Border border)
 o setTitlePosition
 public void setTitlePosition(int titlePosition)
 o setTitleJustification
 public void setTitleJustification(int titleJustification)
 o setTitleFont
 public void setTitleFont(Font titleFont)
 o setTitleColor
 public void setTitleColor(Color titleColor)

All Packages  Class Hierarchy  This Package  Previous  Next  Index