Save This Page
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,   createEmptyBorder,   createEmptyBorder,   createEtchedBorder,   createEtchedBorder,   createEtchedBorder,   createEtchedBorder,   createLineBorder,   createLineBorder,   createLoweredBevelBorder,   createMatteBorder,   createMatteBorder,   createRaisedBevelBorder,   createSharedBevel,   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.

    Note: The shadow inner and outer colors are switched for a lowered bevel border.

 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 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 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 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.)
 static Border createSharedBevel(int type) 
 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.