Home » openjdk-7 » javax » swing » [javadoc | source]
javax.swing
public class: BorderFactory [javadoc | source]
java.lang.Object
   javax.swing.BorderFactory
Factory class for vending standard Border objects. Wherever possible, this factory will hand out references to shared Border instances. For further information and examples see How to Use Borders, a section in The Java Tutorial.
Field Summary
static final  Border sharedRaisedBevel     
static final  Border sharedLoweredBevel     
static final  Border sharedEtchedBorder     
static final  Border emptyBorder     
Method from javax.swing.BorderFactory Summary:
createBevelBorder,   createBevelBorder,   createBevelBorder,   createCompoundBorder,   createCompoundBorder,   createDashedBorder,   createDashedBorder,   createDashedBorder,   createEmptyBorder,   createEmptyBorder,   createEtchedBorder,   createEtchedBorder,   createEtchedBorder,   createEtchedBorder,   createLineBorder,   createLineBorder,   createLineBorder,   createLoweredBevelBorder,   createLoweredSoftBevelBorder,   createMatteBorder,   createMatteBorder,   createRaisedBevelBorder,   createRaisedSoftBevelBorder,   createSharedBevel,   createSoftBevelBorder,   createSoftBevelBorder,   createSoftBevelBorder,   createStrokeBorder,   createStrokeBorder,   createTitledBorder,   createTitledBorder,   createTitledBorder,   createTitledBorder,   createTitledBorder,   createTitledBorder
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.swing.BorderFactory Detail:
 public static Border createBevelBorder(int type) 
    Creates a beveled border of the specified type, using brighter shades of the component's current background color for highlighting, and darker shading for shadows. (In a lowered border, shadows are on top and highlights are underneath.)
 public static Border createBevelBorder(int type,
    Color highlight,
    Color shadow) 
    Creates a beveled border of the specified type, using the specified highlighting and shadowing. The outer edge of the highlighted area uses a brighter shade of the highlight color. The inner edge of the shadow area uses a brighter shade of the shadow color.
 public static Border createBevelBorder(int type,
    Color highlightOuter,
    Color highlightInner,
    Color shadowOuter,
    Color shadowInner) 
    Creates a beveled border of the specified type, using the specified colors for the inner and outer highlight and shadow areas.
 public static CompoundBorder createCompoundBorder() 
    Creates a compound border with a null inside edge and a null outside edge.
 public static CompoundBorder createCompoundBorder(Border outsideBorder,
    Border insideBorder) 
    Creates a compound border specifying the border objects to use for the outside and inside edges.
 public static Border createDashedBorder(Paint paint) 
    Creates a dashed border of the specified {@code paint}. If the specified {@code paint} is {@code null}, the component's foreground color will be used to render the border. The width of a dash line is equal to {@code 1}. The relative length of a dash line and the relative spacing between dash lines are equal to {@code 1}. A dash line is not rounded.
 public static Border createDashedBorder(Paint paint,
    float length,
    float spacing) 
    Creates a dashed border of the specified {@code paint}, relative {@code length}, and relative {@code spacing}. If the specified {@code paint} is {@code null}, the component's foreground color will be used to render the border. The width of a dash line is equal to {@code 1}. A dash line is not rounded.
 public static Border createDashedBorder(Paint paint,
    float thickness,
    float length,
    float spacing,
    boolean rounded) 
    Creates a dashed border of the specified {@code paint}, {@code thickness}, line shape, relative {@code length}, and relative {@code spacing}. If the specified {@code paint} is {@code null}, the component's foreground color will be used to render the border.
 public static Border createEmptyBorder() 
    Creates an empty border that takes up no space. (The width of the top, bottom, left, and right sides are all zero.)
 public static Border createEmptyBorder(int top,
    int left,
    int bottom,
    int right) 
    Creates an empty border that takes up space but which does no drawing, specifying the width of the top, left, bottom, and right sides.
 public static Border createEtchedBorder() 
    Creates a border with an "etched" look using the component's current background color for highlighting and shading.
 public static Border createEtchedBorder(int type) 
    Creates a border with an "etched" look using the component's current background color for highlighting and shading.
 public static Border createEtchedBorder(Color highlight,
    Color shadow) 
    Creates a border with an "etched" look using the specified highlighting and shading colors.
 public static Border createEtchedBorder(int type,
    Color highlight,
    Color shadow) 
    Creates a border with an "etched" look using the specified highlighting and shading colors.
 public static Border createLineBorder(Color color) 
    Creates a line border withe the specified color.
 public static Border createLineBorder(Color color,
    int thickness) 
    Creates a line border with the specified color and width. The width applies to all four sides of the border. To specify widths individually for the top, bottom, left, and right, use #createMatteBorder(int,int,int,int,Color) .
 public static Border createLineBorder(Color color,
    int thickness,
    boolean rounded) 
    Creates a line border with the specified color, thickness, and corner shape.
 public static Border createLoweredBevelBorder() 
    Creates a border with a lowered beveled edge, using brighter shades of the component's current background color for highlighting, and darker shading for shadows. (In a lowered border, shadows are on top and highlights are underneath.)
 public static Border createLoweredSoftBevelBorder() 
    Creates a beveled border with a lowered edge and softened corners, using brighter shades of the component's current background color for highlighting, and darker shading for shadows. In a lowered border, shadows are on top and highlights are underneath.
 public static MatteBorder createMatteBorder(int top,
    int left,
    int bottom,
    int right,
    Color color) 
    Creates a matte-look border using a solid color. (The difference between this border and a line border is that you can specify the individual border dimensions.)
 public static MatteBorder createMatteBorder(int top,
    int left,
    int bottom,
    int right,
    Icon tileIcon) 
    Creates a matte-look border that consists of multiple tiles of a specified icon. Multiple copies of the icon are placed side-by-side to fill up the border area.

    Note:
    If the icon doesn't load, the border area is painted gray.

 public static Border createRaisedBevelBorder() 
    Creates a border with a raised beveled edge, using brighter shades of the component's current background color for highlighting, and darker shading for shadows. (In a raised border, highlights are on top and shadows are underneath.)
 public static Border createRaisedSoftBevelBorder() 
    Creates a beveled border with a raised edge and softened corners, using brighter shades of the component's current background color for highlighting, and darker shading for shadows. In a raised border, highlights are on top and shadows are underneath.
 static Border createSharedBevel(int type) 
 public static Border createSoftBevelBorder(int type) 
    Creates a beveled border of the specified type with softened corners, using brighter shades of the component's current background color for highlighting, and darker shading for shadows. The type is either BevelBorder#RAISED or BevelBorder#LOWERED .
 public static Border createSoftBevelBorder(int type,
    Color highlight,
    Color shadow) 
    Creates a beveled border of the specified type with softened corners, using the specified highlighting and shadowing. The type is either BevelBorder#RAISED or BevelBorder#LOWERED . The outer edge of the highlight area uses a brighter shade of the {@code highlight} color. The inner edge of the shadow area uses a brighter shade of the {@code shadow} color.
 public static Border createSoftBevelBorder(int type,
    Color highlightOuter,
    Color highlightInner,
    Color shadowOuter,
    Color shadowInner) 
    Creates a beveled border of the specified type with softened corners, using the specified colors for the inner and outer edges of the highlight and the shadow areas. The type is either BevelBorder#RAISED or BevelBorder#LOWERED . Note: The shadow inner and outer colors are switched for a lowered bevel border.
 public static Border createStrokeBorder(BasicStroke stroke) 
    Creates a border of the specified {@code stroke}. The component's foreground color will be used to render the border.
 public static Border createStrokeBorder(BasicStroke stroke,
    Paint paint) 
    Creates a border of the specified {@code stroke} and {@code paint}. If the specified {@code paint} is {@code null}, the component's foreground color will be used to render the border.
 public static TitledBorder createTitledBorder(String title) 
    Creates a new titled border with the specified title, the default border type (determined by the current look and feel), the default text position (sitting on the top line), the default justification (leading), and the default font and text color (determined by the current look and feel).
 public static TitledBorder createTitledBorder(Border border) 
    Creates a new titled border with an empty title, the specified border object, the default text position (sitting on the top line), the default justification (leading), and the default font and text color (determined by the current look and feel).
 public static TitledBorder createTitledBorder(Border border,
    String title) 
    Adds a title to an existing border, with default positioning (sitting on the top line), default justification (leading) and the default font and text color (determined by the current look and feel).
 public static TitledBorder createTitledBorder(Border border,
    String title,
    int titleJustification,
    int titlePosition) 
    Adds a title to an existing border, with the specified positioning and using the default font and text color (determined by the current look and feel).
 public static TitledBorder createTitledBorder(Border border,
    String title,
    int titleJustification,
    int titlePosition,
    Font titleFont) 
    Adds a title to an existing border, with the specified positioning and font, and using the default text color (determined by the current look and feel).
 public static TitledBorder createTitledBorder(Border border,
    String title,
    int titleJustification,
    int titlePosition,
    Font titleFont,
    Color titleColor) 
    Adds a title to an existing border, with the specified positioning, font and color.