//// EmptyBorder ///////////////////////////////////////////////////////////
final static Border emptyBorder = new EmptyBorder(0, 0, 0, 0);
/**
* Creates an empty border that takes up no space. (The width
* of the top, bottom, left, and right sides are all zero.)
*
* @return the <code>Border</code> object
*/
public static Border createEmptyBorder() {
return emptyBorder;
}
/**
* Creates an empty border that takes up space but which does
* no drawing, specifying the width of the top, left, bottom, and
* right sides.
*
* @param top an integer specifying the width of the top,
* in pixels
* @param left an integer specifying the width of the left side,
* in pixels
* @param bottom an integer specifying the width of the bottom,
* in pixels
* @param right an integer specifying the width of the right side,
* in pixels
* @return the <code>Border</code> object
*/
public static Border createEmptyBorder(int top, int left,
int bottom, int right) {
return new EmptyBorder(top, left, bottom, right);
}
//// CompoundBorder ////////////////////////////////////////////////////////
/**
* Creates a compound border with a <code>null</code> inside edge and a
* <code>null</code> outside edge.
*
* @return the <code>CompoundBorder</code> object
*/
public static CompoundBorder createCompoundBorder() {
return new CompoundBorder();
}
/**
* Creates a compound border specifying the border objects to use
* for the outside and inside edges.
*
* @param outsideBorder a <code>Border</code> object for the outer
* edge of the compound border
* @param insideBorder a <code>Border</code> object for the inner
* edge of the compound border
* @return the <code>CompoundBorder</code> object
*/
public static CompoundBorder createCompoundBorder(Border outsideBorder,
Border insideBorder) {
return new CompoundBorder(outsideBorder, insideBorder);
}
//// MatteBorder ////////////////////////////////////////////////////////
/**
* 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.)
*
* @param top an integer specifying the width of the top,
* in pixels
* @param left an integer specifying the width of the left side,
* in pixels
* @param bottom an integer specifying the width of the right side,
* in pixels
* @param right an integer specifying the width of the bottom,
* in pixels
* @param color a <code>Color</code> to use for the border
* @return the <code>MatteBorder</code> object
*/
public static MatteBorder createMatteBorder(int top, int left, int bottom, int right,
Color color) {
return new MatteBorder(top, left, bottom, right, color);
}
/**
* 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.
* <p>
* Note:<br>
* If the icon doesn't load, the border area is painted gray.
*
* @param top an integer specifying the width of the top,
* in pixels
* @param left an integer specifying the width of the left side,
* in pixels
* @param bottom an integer specifying the width of the right side,
* in pixels
* @param right an integer specifying the width of the bottom,
* in pixels
* @param tileIcon the <code>Icon</code> object used for the border tiles
* @return the <code>MatteBorder</code> object
*/
=5= |