charvax.swing.border
Class TitledBorder

java.lang.Object
  extended bycharvax.swing.border.TitledBorder
All Implemented Interfaces:
Border

public class TitledBorder
extends java.lang.Object
implements Border

A class that implements a border with the specified title.


Field Summary
protected  Border _border
           
protected  java.lang.String _title
           
protected  Color _titleColor
           
 
Constructor Summary
TitledBorder(Border border_)
          Create a titled border with the specified border and an empty title.
TitledBorder(Border border_, java.lang.String title_)
          Create a TitledBorder instance with the specified border and title, and with the title text in black.
TitledBorder(Border border_, java.lang.String title_, int titleJustification_, int titlePosition_, Font titleFont_, Color titleColor_)
          Creates a TitledBorder instance with the specified border, title, title-justification, title-position, title-font, and title-color.
TitledBorder(java.lang.String title_)
          Create a TitledBorder instance with a line border and the specified title, with the title text in black.
 
Method Summary
 Border getBorder()
          Returns the border of the titled border.
 Insets getBorderInsets(Component component_)
          Returns the insets of the border.
 java.lang.String getTitle()
          Returns the title
 Color getTitleColor()
          Returns the color of the title text.
 void paintBorder(Component component_, int graphics_, 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 this titled border.
 void setTitle(java.lang.String title_)
          Sets the title text.
 void setTitleColor(Color titleColor_)
          Set the color of the title text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_title

protected java.lang.String _title

_titleColor

protected Color _titleColor

_border

protected Border _border
Constructor Detail

TitledBorder

public TitledBorder(Border border_)
Create a titled border with the specified border and an empty title.


TitledBorder

public TitledBorder(java.lang.String title_)
Create a TitledBorder instance with a line border and the specified title, with the title text in black.


TitledBorder

public TitledBorder(Border border_,
                    java.lang.String title_)
Create a TitledBorder instance with the specified border and title, and with the title text in black.


TitledBorder

public TitledBorder(Border border_,
                    java.lang.String title_,
                    int titleJustification_,
                    int titlePosition_,
                    Font titleFont_,
                    Color titleColor_)
Creates a TitledBorder instance with the specified border, title, title-justification, title-position, title-font, and title-color.

Parameters:
border_ - the border.
title_ - the title the border should display.
titleJustification_ - the title justification (UNUSED).
titlePosition_ - the position of the title (UNUSED)
titleFont_ - the title font (UNUSED)
titleColor_ - the title color.
Method Detail

getBorderInsets

public Insets getBorderInsets(Component component_)
Returns the insets of the border.

Specified by:
getBorderInsets in interface Border

setTitle

public void setTitle(java.lang.String title_)
Sets the title text.


getTitle

public java.lang.String getTitle()
Returns the title


setTitleColor

public void setTitleColor(Color titleColor_)
Set the color of the title text.


getTitleColor

public Color getTitleColor()
Returns the color of the title text.


setBorder

public void setBorder(Border border_)
Sets the border of this titled border.


getBorder

public Border getBorder()
Returns the border of the titled border.


paintBorder

public void paintBorder(Component component_,
                        int graphics_,
                        int x_,
                        int y_,
                        int width_,
                        int height_)
Paints the border for the specified component with the specified position and size.

Specified by:
paintBorder in interface Border