|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.rim.device.api.ui.decor.BorderFactory
A factory class for creating different types of borders. See Border for
more details.
In this class, padding refers to the number of
pixels from the bitmap’s edge to be treated as the border and
corner refers to the width and height from the bitmap’s edge to be treated as the corners (refer to the image below).
If you only specify padding and do not specify any value for corners, then by default it equals to padding ( corners = = padding ).
| Method Summary | ||
static Border |
createBevelBorder(XYEdges edges)
Create a bevel (3D) border. |
|
static Border |
createBevelBorder(XYEdges edges,
XYEdges colorsOuter,
XYEdges colorsInner)
Create a simple border with specified style. |
|
static Border |
createBitmapBorder(XYEdges padding,
Bitmap bitmap)
Create a bitmap border with specified outer padding/spacing. |
|
static Border |
createBitmapBorder(XYEdges padding,
XYEdges corners,
Bitmap bitmap)
Create a bitmap border with specified outer padding/spacing. |
|
static Border |
createRoundedBorder(XYEdges padding)
Create a single-line rounded border. |
|
static Border |
createRoundedBorder(XYEdges padding,
int style)
Create a single-line rounded border with specified style. |
|
static Border |
createRoundedBorder(XYEdges padding,
int color,
int style)
Create a single-line rounded border with specified color and style. |
|
static Border |
createSimpleBorder(XYEdges edges)
Create a simple single-line solid border. |
|
static Border |
createSimpleBorder(XYEdges edges,
int style)
Create a simple border with specified style. |
|
static Border |
createSimpleBorder(XYEdges edges,
XYEdges colors,
int style)
Create a simple border with specified colors and style. |
|
static Border |
createSimpleBorder(XYEdges edges,
XYEdges colors,
XYEdges style)
Create a simple border with specified colors and styles. |
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static Border createBevelBorder(XYEdges edges)
edges - XYEdges object representing the width/thickness of the border's
bevel in pixels: top, right, bottom, left edges.IllegalArgumentException - If edges is null.public static Border createBevelBorder(XYEdges edges, XYEdges colorsOuter, XYEdges colorsInner)
edges - XYEdges object representing the width/thickness of the border's
bevel in pixels: top, right, bottom, left edges.colorsOuter - XYEdges object representing the colors of the bevel's outer edge.colorsInner - XYEdges object representing the colors of the bevel's inner edge.IllegalArgumentException - If edges is null.public static Border createBitmapBorder(XYEdges padding, Bitmap bitmap)
padding - XYEdges object representing the padding/spacing from the bitmap's edge
in pixels, i.e. top-left corner of bitmap at (edges.left, edges.top).bitmap - Reference to bitmap for the border.IllegalArgumentException - If either of the parameters, padding or bitmap , is null;
if the total value of the left and right padding is greater than the width of the bitmap;
if the total value of the top and bottom padding is greater than the height of the bitmap.
In other words, this exception is thrown for any of the following conditions:
padding = = null bitmap = = null padding.right + padding.left > bitmap.getWidth() padding.top + padding.bottom > bitmap.getHeight() public static Border createBitmapBorder(XYEdges padding, XYEdges corners, Bitmap bitmap)
padding - XYEdges object representing the padding/spacing from the bitmap's edge
in pixels, i.e. top-left corner of bitmap at (edges.left, edges.top).corners - XYEdgse boject representing the width (corners.left,
corners.right) and height (corners.top, corners.bottom)
of the corner bitmaps.bitmap - Reference to bitmap for the border.IllegalArgumentException - If any of the parameters: padding , corners , or bitmap , is null;
if the total value of the left and right padding is greater than the width of the bitmap;
if the total value of the top and bottom padding is greater than the height of the bitmap;
if the dimensions for the corner is less than padding.
In other words, this exception is thrown for any of the following conditions:
padding = = null corners = = null bitmap = = null (corners.top < padding.top) || (corners.right < padding.right) || (corners.bottom < padding.bottom) || (corners.left < padding.left) padding.right + padding.left > bitmap.getWidth() padding.top + padding.bottom > bitmap.getHeight() public static Border createRoundedBorder(XYEdges padding)
padding - XYEdges object representing the width/thickness of the border's background,
i.e. padding/spacing from the border's edge.IllegalArgumentException - If padding is null.public static Border createRoundedBorder(XYEdges padding, int style)
padding - XYEdges object representing the width/thickness of the border's background,
i.e. padding/spacing from the border's edge.style - STYLE_TRANSPARENT, STYLE_SOLID, SYLE_DOTTED, STYLE_DASHED.IllegalArgumentException - If padding is null.public static Border createRoundedBorder(XYEdges padding, int color, int style)
padding - XYEdges object representing the width/thickness of the border's background,
i.e. padding/spacing from the border's edge.color - 32-bit RGB color in 0xAARRGGBB format (includes alpha channel).style - STYLE_TRANSPARENT, STYLE_SOLID, SYLE_DOTTED, STYLE_DASHED.IllegalArgumentException - If padding is null.public static Border createSimpleBorder(XYEdges edges)
edges - XYEdges object representing the width/thickness of the border's
four sides in pixels.IllegalArgumentException - If edges is null.public static Border createSimpleBorder(XYEdges edges, int style)
edges - XYEdges object representing the width/thickness of the border's
four sides in pixels.style - STYLE_TRANSPARENT, STYLE_SOLID, SYLE_DOTTED, STYLE_DASHED.IllegalArgumentException - If edges is null.public static Border createSimpleBorder(XYEdges edges, XYEdges colors, int style)
edges - XYEdges object representing the width/thickness of the border's
four sides in pixels.colors - XYEdges object representing the colors of the border's
four sides in 0xAARRGGBB format (includes alpha channel).style - STYLE_TRANSPARENT, STYLE_SOLID, SYLE_DOTTED, STYLE_DASHED.IllegalArgumentException - If edges is null.public static Border createSimpleBorder(XYEdges edges, XYEdges colors, XYEdges style)
edges - XYEdges object representing the width/thickness of the border's
four sides in pixels.colors - XYEdges object representing the colors of the border's
four sides in 0xAARRGGBB format (includes alpha channel).styles - XYEdges object representing the styles of the border's
four sides: STYLE_TRANSPARENT, STYLE_SOLID, SYLE_DOTTED, STYLE_DASHED.IllegalArgumentException - If padding is null.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2009 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.