javax.swing.border
Class TitledBorder

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.swing.border.AbstractBorder sample code for javax.swing.border.AbstractBorder definition code for javax.swing.border.AbstractBorder 
      extended by javax.swing.border.TitledBorder
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border
Direct Known Subclasses:
BorderUIResource.TitledBorderUIResource sample code for javax.swing.plaf.BorderUIResource.TitledBorderUIResource definition code for javax.swing.plaf.BorderUIResource.TitledBorderUIResource

public class TitledBorder
extends AbstractBorder sample code for javax.swing.border.AbstractBorder definition code for javax.swing.border.AbstractBorder

A class which implements an arbitrary border with the addition of a String title in a specified position and justification.

If the border, font, or color property values are not specified in the constuctor or by invoking the appropriate set methods, the property values will be defined by the current look and feel, using the following property names in the Defaults Table:

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 applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see XMLEncoder sample code for java.beans.XMLEncoder definition code for java.beans.XMLEncoder .

See Also:
Serialized Form

Field Summary
static int ABOVE_BOTTOM sample code for javax.swing.border.TitledBorder.ABOVE_BOTTOM definition code for javax.swing.border.TitledBorder.ABOVE_BOTTOM
          Position the title above the border's bottom line.
static int ABOVE_TOP sample code for javax.swing.border.TitledBorder.ABOVE_TOP definition code for javax.swing.border.TitledBorder.ABOVE_TOP
          Position the title above the border's top line.
static int BELOW_BOTTOM sample code for javax.swing.border.TitledBorder.BELOW_BOTTOM definition code for javax.swing.border.TitledBorder.BELOW_BOTTOM
          Position the title below the border's bottom line.
static int BELOW_TOP sample code for javax.swing.border.TitledBorder.BELOW_TOP definition code for javax.swing.border.TitledBorder.BELOW_TOP
          Position the title below the border's top line.
protected  Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border border sample code for javax.swing.border.TitledBorder.border definition code for javax.swing.border.TitledBorder.border
           
static int BOTTOM sample code for javax.swing.border.TitledBorder.BOTTOM definition code for javax.swing.border.TitledBorder.BOTTOM
          Position the title in the middle of the border's bottom line.
static int CENTER sample code for javax.swing.border.TitledBorder.CENTER definition code for javax.swing.border.TitledBorder.CENTER
          Position title text in the center of the border line.
static int DEFAULT_JUSTIFICATION sample code for javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION definition code for javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION
          Use the default justification for the title text.
static int DEFAULT_POSITION sample code for javax.swing.border.TitledBorder.DEFAULT_POSITION definition code for javax.swing.border.TitledBorder.DEFAULT_POSITION
          Use the default vertical orientation for the title text.
protected static int EDGE_SPACING sample code for javax.swing.border.TitledBorder.EDGE_SPACING definition code for javax.swing.border.TitledBorder.EDGE_SPACING
           
static int LEADING sample code for javax.swing.border.TitledBorder.LEADING definition code for javax.swing.border.TitledBorder.LEADING
          Position title text at the left side of the border line for left to right orientation, at the right side of the border line for right to left orientation.
static int LEFT sample code for javax.swing.border.TitledBorder.LEFT definition code for javax.swing.border.TitledBorder.LEFT
          Position title text at the left side of the border line.
static int RIGHT sample code for javax.swing.border.TitledBorder.RIGHT definition code for javax.swing.border.TitledBorder.RIGHT
          Position title text at the right side of the border line.
protected static int TEXT_INSET_H sample code for javax.swing.border.TitledBorder.TEXT_INSET_H definition code for javax.swing.border.TitledBorder.TEXT_INSET_H
           
protected static int TEXT_SPACING sample code for javax.swing.border.TitledBorder.TEXT_SPACING definition code for javax.swing.border.TitledBorder.TEXT_SPACING
           
protected  String sample code for java.lang.String definition code for java.lang.String title sample code for javax.swing.border.TitledBorder.title definition code for javax.swing.border.TitledBorder.title
           
protected  Color sample code for java.awt.Color definition code for java.awt.Color titleColor sample code for javax.swing.border.TitledBorder.titleColor definition code for javax.swing.border.TitledBorder.titleColor
           
protected  Font sample code for java.awt.Font definition code for java.awt.Font titleFont sample code for javax.swing.border.TitledBorder.titleFont definition code for javax.swing.border.TitledBorder.titleFont
           
protected  int titleJustification sample code for javax.swing.border.TitledBorder.titleJustification definition code for javax.swing.border.TitledBorder.titleJustification
           
protected  int titlePosition sample code for javax.swing.border.TitledBorder.titlePosition definition code for javax.swing.border.TitledBorder.titlePosition
           
static int TOP sample code for javax.swing.border.TitledBorder.TOP definition code for javax.swing.border.TitledBorder.TOP
          Position the title in the middle of the border's top line.
static int TRAILING sample code for javax.swing.border.TitledBorder.TRAILING definition code for javax.swing.border.TitledBorder.TRAILING
          Position title text at the right side of the border line for left to right orientation, at the left side of the border line for right to left orientation.
 
Constructor Summary
TitledBorder sample code for javax.swing.border.TitledBorder.TitledBorder(javax.swing.border.Border) definition code for javax.swing.border.TitledBorder.TitledBorder(javax.swing.border.Border) (Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border  border)
          Creates a TitledBorder instance with the specified border and an empty title.
TitledBorder sample code for javax.swing.border.TitledBorder.TitledBorder(javax.swing.border.Border, java.lang.String) definition code for javax.swing.border.TitledBorder.TitledBorder(javax.swing.border.Border, java.lang.String) (Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border  border, String sample code for java.lang.String definition code for java.lang.String  title)
          Creates a TitledBorder instance with the specified border and title.
TitledBorder sample code for javax.swing.border.TitledBorder.TitledBorder(javax.swing.border.Border, java.lang.String, int, int) definition code for javax.swing.border.TitledBorder.TitledBorder(javax.swing.border.Border, java.lang.String, int, int) (Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border  border, String sample code for java.lang.String definition code for java.lang.String  title, int titleJustification, int titlePosition)
          Creates a TitledBorder instance with the specified border, title, title-justification, and title-position.
TitledBorder sample code for javax.swing.border.TitledBorder.TitledBorder(javax.swing.border.Border, java.lang.String, int, int, java.awt.Font) definition code for javax.swing.border.TitledBorder.TitledBorder(javax.swing.border.Border, java.lang.String, int, int, java.awt.Font) (Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border  border, String sample code for java.lang.String definition code for java.lang.String  title, int titleJustification, int titlePosition, Font sample code for java.awt.Font definition code for java.awt.Font  titleFont)
          Creates a TitledBorder instance with the specified border, title, title-justification, title-position, and title-font.
TitledBorder sample code for javax.swing.border.TitledBorder.TitledBorder(javax.swing.border.Border, java.lang.String, int, int, java.awt.Font, java.awt.Color) definition code for javax.swing.border.TitledBorder.TitledBorder(javax.swing.border.Border, java.lang.String, int, int, java.awt.Font, java.awt.Color) (Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border  border, String sample code for java.lang.String definition code for java.lang.String  title, int titleJustification, int titlePosition, Font sample code for java.awt.Font definition code for java.awt.Font  titleFont, Color sample code for java.awt.Color definition code for java.awt.Color  titleColor)
          Creates a TitledBorder instance with the specified border, title, title-justification, title-position, title-font, and title-color.
TitledBorder sample code for javax.swing.border.TitledBorder.TitledBorder(java.lang.String) definition code for javax.swing.border.TitledBorder.TitledBorder(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  title)
          Creates a TitledBorder instance.
 
Method Summary
 Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border getBorder sample code for javax.swing.border.TitledBorder.getBorder() definition code for javax.swing.border.TitledBorder.getBorder() ()
          Returns the border of the titled border.
 Insets sample code for java.awt.Insets definition code for java.awt.Insets getBorderInsets sample code for javax.swing.border.TitledBorder.getBorderInsets(java.awt.Component) definition code for javax.swing.border.TitledBorder.getBorderInsets(java.awt.Component) (Component sample code for java.awt.Component definition code for java.awt.Component  c)
          Returns the insets of the border.
 Insets sample code for java.awt.Insets definition code for java.awt.Insets getBorderInsets sample code for javax.swing.border.TitledBorder.getBorderInsets(java.awt.Component, java.awt.Insets) definition code for javax.swing.border.TitledBorder.getBorderInsets(java.awt.Component, java.awt.Insets) (Component sample code for java.awt.Component definition code for java.awt.Component  c, Insets sample code for java.awt.Insets definition code for java.awt.Insets  insets)
          Reinitialize the insets parameter with this Border's current Insets.
protected  Font sample code for java.awt.Font definition code for java.awt.Font getFont sample code for javax.swing.border.TitledBorder.getFont(java.awt.Component) definition code for javax.swing.border.TitledBorder.getFont(java.awt.Component) (Component sample code for java.awt.Component definition code for java.awt.Component  c)
           
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getMinimumSize sample code for javax.swing.border.TitledBorder.getMinimumSize(java.awt.Component) definition code for javax.swing.border.TitledBorder.getMinimumSize(java.awt.Component) (Component sample code for java.awt.Component definition code for java.awt.Component  c)
          Returns the minimum dimensions this border requires in order to fully display the border and title.
 String sample code for java.lang.String definition code for java.lang.String getTitle sample code for javax.swing.border.TitledBorder.getTitle() definition code for javax.swing.border.TitledBorder.getTitle() ()
          Returns the title of the titled border.
 Color sample code for java.awt.Color definition code for java.awt.Color getTitleColor sample code for javax.swing.border.TitledBorder.getTitleColor() definition code for javax.swing.border.TitledBorder.getTitleColor() ()
          Returns the title-color of the titled border.
 Font sample code for java.awt.Font definition code for java.awt.Font getTitleFont sample code for javax.swing.border.TitledBorder.getTitleFont() definition code for javax.swing.border.TitledBorder.getTitleFont() ()
          Returns the title-font of the titled border.
 int getTitleJustification sample code for javax.swing.border.TitledBorder.getTitleJustification() definition code for javax.swing.border.TitledBorder.getTitleJustification() ()
          Returns the title-justification of the titled border.
 int getTitlePosition sample code for javax.swing.border.TitledBorder.getTitlePosition() definition code for javax.swing.border.TitledBorder.getTitlePosition() ()
          Returns the title-position of the titled border.
 boolean isBorderOpaque sample code for javax.swing.border.TitledBorder.isBorderOpaque() definition code for javax.swing.border.TitledBorder.isBorderOpaque() ()
          Returns whether or not the border is opaque.
 void paintBorder sample code for javax.swing.border.TitledBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int) definition code for javax.swing.border.TitledBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int) (Component sample code for java.awt.Component definition code for java.awt.Component  c, Graphics sample code for java.awt.Graphics definition code for 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 sample code for javax.swing.border.TitledBorder.setBorder(javax.swing.border.Border) definition code for javax.swing.border.TitledBorder.setBorder(javax.swing.border.Border) (Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border  border)
          Sets the border of the titled border.
 void setTitle sample code for javax.swing.border.TitledBorder.setTitle(java.lang.String) definition code for javax.swing.border.TitledBorder.setTitle(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  title)
          Sets the title of the titled border.
 void setTitleColor sample code for javax.swing.border.TitledBorder.setTitleColor(java.awt.Color) definition code for javax.swing.border.TitledBorder.setTitleColor(java.awt.Color) (Color sample code for java.awt.Color definition code for java.awt.Color  titleColor)
          Sets the title-color of the titled border.
 void setTitleFont sample code for javax.swing.border.TitledBorder.setTitleFont(java.awt.Font) definition code for javax.swing.border.TitledBorder.setTitleFont(java.awt.Font) (Font sample code for java.awt.Font definition code for java.awt.Font  titleFont)
          Sets the title-font of the titled border.
 void setTitleJustification sample code for javax.swing.border.TitledBorder.setTitleJustification(int) definition code for javax.swing.border.TitledBorder.setTitleJustification(int) (int titleJustification)
          Sets the title-justification of the titled border.
 void setTitlePosition sample code for javax.swing.border.TitledBorder.setTitlePosition(int) definition code for javax.swing.border.TitledBorder.setTitlePosition(int) (int titlePosition)
          Sets the title-position of the titled border.
 
Methods inherited from class javax.swing.border.AbstractBorder sample code for javax.swing.border.AbstractBorder definition code for javax.swing.border.AbstractBorder
getInteriorRectangle sample code for javax.swing.border.AbstractBorder.getInteriorRectangle(java.awt.Component, javax.swing.border.Border, int, int, int, int) definition code for javax.swing.border.AbstractBorder.getInteriorRectangle(java.awt.Component, javax.swing.border.Border, int, int, int, int) , getInteriorRectangle sample code for javax.swing.border.AbstractBorder.getInteriorRectangle(java.awt.Component, int, int, int, int) definition code for javax.swing.border.AbstractBorder.getInteriorRectangle(java.awt.Component, int, int, int, int)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

title sample code for javax.swing.border.TitledBorder.title

protected String sample code for java.lang.String definition code for java.lang.String  title

border sample code for javax.swing.border.TitledBorder.border

protected Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border  border

titlePosition sample code for javax.swing.border.TitledBorder.titlePosition

protected int titlePosition

titleJustification sample code for javax.swing.border.TitledBorder.titleJustification

protected int titleJustification

titleFont sample code for javax.swing.border.TitledBorder.titleFont

protected Font sample code for java.awt.Font definition code for java.awt.Font  titleFont

titleColor sample code for javax.swing.border.TitledBorder.titleColor

protected Color sample code for java.awt.Color definition code for java.awt.Color  titleColor

DEFAULT_POSITION sample code for javax.swing.border.TitledBorder.DEFAULT_POSITION

public static final int DEFAULT_POSITION
Use the default vertical orientation for the title text.

See Also:
Constant Field Values

ABOVE_TOP sample code for javax.swing.border.TitledBorder.ABOVE_TOP

public static final int ABOVE_TOP
Position the title above the border's top line.

See Also:
Constant Field Values

TOP sample code for javax.swing.border.TitledBorder.TOP

public static final int TOP
Position the title in the middle of the border's top line.

See Also:
Constant Field Values

BELOW_TOP sample code for javax.swing.border.TitledBorder.BELOW_TOP

public static final int BELOW_TOP
Position the title below the border's top line.

See Also:
Constant Field Values

ABOVE_BOTTOM sample code for javax.swing.border.TitledBorder.ABOVE_BOTTOM

public static final int ABOVE_BOTTOM
Position the title above the border's bottom line.

See Also:
Constant Field Values

BOTTOM sample code for javax.swing.border.TitledBorder.BOTTOM

public static final int BOTTOM
Position the title in the middle of the border's bottom line.

See Also:
Constant Field Values

BELOW_BOTTOM sample code for javax.swing.border.TitledBorder.BELOW_BOTTOM

public static final int BELOW_BOTTOM
Position the title below the border's bottom line.

See Also:
Constant Field Values

DEFAULT_JUSTIFICATION sample code for javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION

public static final int DEFAULT_JUSTIFICATION
Use the default justification for the title text.

See Also:
Constant Field Values

LEFT sample code for javax.swing.border.TitledBorder.LEFT

public static final int LEFT
Position title text at the left side of the border line.

See Also:
Constant Field Values

CENTER sample code for javax.swing.border.TitledBorder.CENTER

public static final int CENTER
Position title text in the center of the border line.

See Also:
Constant Field Values

RIGHT sample code for javax.swing.border.TitledBorder.RIGHT

public static final int RIGHT
Position title text at the right side of the border line.

See Also:
Constant Field Values

LEADING sample code for javax.swing.border.TitledBorder.LEADING

public static final int LEADING
Position title text at the left side of the border line for left to right orientation, at the right side of the border line for right to left orientation.

See Also:
Constant Field Values

TRAILING sample code for javax.swing.border.TitledBorder.TRAILING

public static final int TRAILING
Position title text at the right side of the border line for left to right orientation, at the left side of the border line for right to left orientation.

See Also:
Constant Field Values

EDGE_SPACING sample code for javax.swing.border.TitledBorder.EDGE_SPACING

protected static final int EDGE_SPACING
See Also:
Constant Field Values

TEXT_SPACING sample code for javax.swing.border.TitledBorder.TEXT_SPACING

protected static final int TEXT_SPACING
See Also:
Constant Field Values

TEXT_INSET_H sample code for javax.swing.border.TitledBorder.TEXT_INSET_H

protected static final int TEXT_INSET_H
See Also:
Constant Field Values
Constructor Detail

TitledBorder sample code for javax.swing.border.TitledBorder(java.lang.String) definition code for javax.swing.border.TitledBorder(java.lang.String)

public TitledBorder(String sample code for java.lang.String definition code for java.lang.String  title)
Creates a TitledBorder instance.

Parameters:
title - the title the border should display

TitledBorder sample code for javax.swing.border.TitledBorder(javax.swing.border.Border) definition code for javax.swing.border.TitledBorder(javax.swing.border.Border)

public TitledBorder(Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border  border)
Creates a TitledBorder instance with the specified border and an empty title.

Parameters:
border - the border

TitledBorder sample code for javax.swing.border.TitledBorder(javax.swing.border.Border, java.lang.String) definition code for javax.swing.border.TitledBorder(javax.swing.border.Border, java.lang.String)

public TitledBorder(Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border  border,
                    String sample code for java.lang.String definition code for java.lang.String  title)
Creates a TitledBorder instance with the specified border and title.

Parameters:
border - the border
title - the title the border should display

TitledBorder sample code for javax.swing.border.TitledBorder(javax.swing.border.Border, java.lang.String, int, int) definition code for javax.swing.border.TitledBorder(javax.swing.border.Border, java.lang.String, int, int)

public TitledBorder(Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border  border,
                    String sample code for java.lang.String definition code for java.lang.String  title,
                    int titleJustification,
                    int titlePosition)
Creates a TitledBorder instance with the specified border, title, title-justification, and title-position.

Parameters:
border - the border
title - the title the border should display
titleJustification - the justification for the title
titlePosition - the position for the title

TitledBorder sample code for javax.swing.border.TitledBorder(javax.swing.border.Border, java.lang.String, int, int, java.awt.Font) definition code for javax.swing.border.TitledBorder(javax.swing.border.Border, java.lang.String, int, int, java.awt.Font)

public TitledBorder(Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border  border,
                    String sample code for java.lang.String definition code for java.lang.String  title,
                    int titleJustification,
                    int titlePosition,
                    Font sample code for java.awt.Font definition code for java.awt.Font  titleFont)
Creates a TitledBorder instance with the specified border, title, title-justification, title-position, and title-font.

Parameters:
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 title

TitledBorder sample code for javax.swing.border.TitledBorder(javax.swing.border.Border, java.lang.String, int, int, java.awt.Font, java.awt.Color) definition code for javax.swing.border.TitledBorder(javax.swing.border.Border, java.lang.String, int, int, java.awt.Font, java.awt.Color)

public TitledBorder(Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border  border,
                    String sample code for java.lang.String definition code for java.lang.String  title,
                    int titleJustification,
                    int titlePosition,
                    Font sample code for java.awt.Font definition code for java.awt.Font  titleFont,
                    Color sample code for java.awt.Color definition code for java.awt.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 justification for the title
titlePosition - the position for the title
titleFont - the font of the title
titleColor - the color of the title
Method Detail

paintBorder sample code for javax.swing.border.TitledBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int) definition code for javax.swing.border.TitledBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)

public void paintBorder(Component sample code for java.awt.Component definition code for java.awt.Component  c,
                        Graphics sample code for java.awt.Graphics definition code for 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.

Specified by:
paintBorder sample code for javax.swing.border.Border.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int) definition code for javax.swing.border.Border.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int) in interface Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border
Overrides:
paintBorder sample code for javax.swing.border.AbstractBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int) definition code for javax.swing.border.AbstractBorder.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int) in class AbstractBorder sample code for javax.swing.border.AbstractBorder definition code for javax.swing.border.AbstractBorder
Parameters:
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 border

getBorderInsets sample code for javax.swing.border.TitledBorder.getBorderInsets(java.awt.Component) definition code for javax.swing.border.TitledBorder.getBorderInsets(java.awt.Component)

public Insets sample code for java.awt.Insets definition code for java.awt.Insets  getBorderInsets(Component sample code for java.awt.Component definition code for java.awt.Component  c)
Returns the insets of the border.

Specified by:
getBorderInsets sample code for javax.swing.border.Border.getBorderInsets(java.awt.Component) definition code for javax.swing.border.Border.getBorderInsets(java.awt.Component) in interface Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border
Overrides:
getBorderInsets sample code for javax.swing.border.AbstractBorder.getBorderInsets(java.awt.Component) definition code for javax.swing.border.AbstractBorder.getBorderInsets(java.awt.Component) in class AbstractBorder sample code for javax.swing.border.AbstractBorder definition code for javax.swing.border.AbstractBorder
Parameters:
c - the component for which this border insets value applies
Returns:
the new Insets object initialized to 0

getBorderInsets sample code for javax.swing.border.TitledBorder.getBorderInsets(java.awt.Component, java.awt.Insets) definition code for javax.swing.border.TitledBorder.getBorderInsets(java.awt.Component, java.awt.Insets)

public Insets sample code for java.awt.Insets definition code for java.awt.Insets  getBorderInsets(Component sample code for java.awt.Component definition code for java.awt.Component  c,
                              Insets sample code for java.awt.Insets definition code for java.awt.Insets  insets)
Reinitialize the insets parameter with this Border's current Insets.

Overrides:
getBorderInsets sample code for javax.swing.border.AbstractBorder.getBorderInsets(java.awt.Component, java.awt.Insets) definition code for javax.swing.border.AbstractBorder.getBorderInsets(java.awt.Component, java.awt.Insets) in class AbstractBorder sample code for javax.swing.border.AbstractBorder definition code for javax.swing.border.AbstractBorder
Parameters:
c - the component for which this border insets value applies
insets - the object to be reinitialized
Returns:
the insets object

isBorderOpaque sample code for javax.swing.border.TitledBorder.isBorderOpaque() definition code for javax.swing.border.TitledBorder.isBorderOpaque()

public boolean isBorderOpaque()
Returns whether or not the border is opaque.

Specified by:
isBorderOpaque sample code for javax.swing.border.Border.isBorderOpaque() definition code for javax.swing.border.Border.isBorderOpaque() in interface Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border
Overrides:
isBorderOpaque sample code for javax.swing.border.AbstractBorder.isBorderOpaque() definition code for javax.swing.border.AbstractBorder.isBorderOpaque() in class AbstractBorder sample code for javax.swing.border.AbstractBorder definition code for javax.swing.border.AbstractBorder
Returns:
false

getTitle sample code for javax.swing.border.TitledBorder.getTitle() definition code for javax.swing.border.TitledBorder.getTitle()

public String sample code for java.lang.String definition code for java.lang.String  getTitle()
Returns the title of the titled border.


getBorder sample code for javax.swing.border.TitledBorder.getBorder() definition code for javax.swing.border.TitledBorder.getBorder()

public Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border  getBorder()
Returns the border of the titled border.


getTitlePosition sample code for javax.swing.border.TitledBorder.getTitlePosition() definition code for javax.swing.border.TitledBorder.getTitlePosition()

public int getTitlePosition()
Returns the title-position of the titled border.


getTitleJustification sample code for javax.swing.border.TitledBorder.getTitleJustification() definition code for javax.swing.border.TitledBorder.getTitleJustification()

public int getTitleJustification()
Returns the title-justification of the titled border.


getTitleFont sample code for javax.swing.border.TitledBorder.getTitleFont() definition code for javax.swing.border.TitledBorder.getTitleFont()

public Font sample code for java.awt.Font definition code for java.awt.Font  getTitleFont()
Returns the title-font of the titled border.


getTitleColor sample code for javax.swing.border.TitledBorder.getTitleColor() definition code for javax.swing.border.TitledBorder.getTitleColor()

public Color sample code for java.awt.Color definition code for java.awt.Color  getTitleColor()
Returns the title-color of the titled border.


setTitle sample code for javax.swing.border.TitledBorder.setTitle(java.lang.String) definition code for javax.swing.border.TitledBorder.setTitle(java.lang.String)

public void setTitle(String sample code for java.lang.String definition code for java.lang.String  title)
Sets the title of the titled border. param title the title for the border


setBorder sample code for javax.swing.border.TitledBorder.setBorder(javax.swing.border.Border) definition code for javax.swing.border.TitledBorder.setBorder(javax.swing.border.Border)

public void setBorder(Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border  border)
Sets the border of the titled border.

Parameters:
border - the border

setTitlePosition sample code for javax.swing.border.TitledBorder.setTitlePosition(int) definition code for javax.swing.border.TitledBorder.setTitlePosition(int)

public void setTitlePosition(int titlePosition)
Sets the title-position of the titled border.

Parameters:
titlePosition - the position for the border

setTitleJustification sample code for javax.swing.border.TitledBorder.setTitleJustification(int) definition code for javax.swing.border.TitledBorder.setTitleJustification(int)

public void setTitleJustification(int titleJustification)
Sets the title-justification of the titled border.

Parameters:
titleJustification - the justification for the border

setTitleFont sample code for javax.swing.border.TitledBorder.setTitleFont(java.awt.Font) definition code for javax.swing.border.TitledBorder.setTitleFont(java.awt.Font)

public void setTitleFont(Font sample code for java.awt.Font definition code for java.awt.Font  titleFont)
Sets the title-font of the titled border.

Parameters:
titleFont - the font for the border title

setTitleColor sample code for javax.swing.border.TitledBorder.setTitleColor(java.awt.Color) definition code for javax.swing.border.TitledBorder.setTitleColor(java.awt.Color)

public void setTitleColor(Color sample code for java.awt.Color definition code for java.awt.Color  titleColor)
Sets the title-color of the titled border.

Parameters:
titleColor - the color for the border title

getMinimumSize sample code for javax.swing.border.TitledBorder.getMinimumSize(java.awt.Component) definition code for javax.swing.border.TitledBorder.getMinimumSize(java.awt.Component)

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getMinimumSize(Component sample code for java.awt.Component definition code for java.awt.Component  c)
Returns the minimum dimensions this border requires in order to fully display the border and title.

Parameters:
c - the component where this border will be drawn

getFont sample code for javax.swing.border.TitledBorder.getFont(java.awt.Component) definition code for javax.swing.border.TitledBorder.getFont(java.awt.Component)

protected Font sample code for java.awt.Font definition code for java.awt.Font  getFont(Component sample code for java.awt.Component definition code for java.awt.Component  c)