Home » openjdk-7 » javax » swing » border » [javadoc | source]
javax.swing.border
public class: LineBorder [javadoc | source]
java.lang.Object
   javax.swing.border.AbstractBorder
      javax.swing.border.LineBorder

All Implemented Interfaces:
    Border, Serializable

Direct Known Subclasses:
    LineBorderUIResource, CommentBorder

A class which implements a line border of arbitrary thickness and of a single color.

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 java.beans.XMLEncoder .

Field Summary
protected  int thickness     
protected  Color lineColor     
protected  boolean roundedCorners     
Constructor:
 public LineBorder(Color color) 
    Creates a line border with the specified color and a thickness = 1.
    Parameters:
    color - the color for the border
 public LineBorder(Color color,
    int thickness) 
    Creates a line border with the specified color and thickness.
    Parameters:
    color - the color of the border
    thickness - the thickness of the border
 public LineBorder(Color color,
    int thickness,
    boolean roundedCorners) 
    Creates a line border with the specified color, thickness, and corner shape.
    Parameters:
    color - the color of the border
    thickness - the thickness of the border
    roundedCorners - whether or not border corners should be round
    since: 1.3 -
Method from javax.swing.border.LineBorder Summary:
createBlackLineBorder,   createGrayLineBorder,   getBorderInsets,   getLineColor,   getRoundedCorners,   getThickness,   isBorderOpaque,   paintBorder
Methods from javax.swing.border.AbstractBorder:
getBaseline,   getBaselineResizeBehavior,   getBorderInsets,   getBorderInsets,   getInteriorRectangle,   getInteriorRectangle,   isBorderOpaque,   isLeftToRight,   paintBorder
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.swing.border.LineBorder Detail:
 public static Border createBlackLineBorder() 
    Convenience method for getting the Color.black LineBorder of thickness 1.
 public static Border createGrayLineBorder() 
    Convenience method for getting the Color.gray LineBorder of thickness 1.
 public Insets getBorderInsets(Component c,
    Insets insets) 
    Reinitialize the insets parameter with this Border's current Insets.
 public Color getLineColor() 
    Returns the color of the border.
 public boolean getRoundedCorners() 
    Returns whether this border will be drawn with rounded corners.
 public int getThickness() 
    Returns the thickness of the border.
 public boolean isBorderOpaque() 
    Returns whether or not the border is opaque.
 public  void paintBorder(Component c,
    Graphics g,
    int x,
    int y,
    int width,
    int height) 
    Paints the border for the specified component with the specified position and size.