|
|||||||||
| 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.Border
A border with four edges (top, right, bottom, left) around an unfocusable rectangular region
contained within a screen or a field. It cannot be instantiated directly. Different types
of borders can be created by calling one of the following methods in the BorderFactory:
BorderFactory.createSimpleBorder(net.rim.device.api.ui.XYEdges)BorderFactory.createRoundedBorder(net.rim.device.api.ui.XYEdges)BorderFactory.createBevelBorder(net.rim.device.api.ui.XYEdges)BorderFactory.createRoundedBorder(net.rim.device.api.ui.XYEdges)
Each border must (at least) implement #draw(Graphics, XYRect) and isTransparent().
The paint(Graphics, XYRect) method is called by the paint framework in
Field and Screen.
A border can be set via Field.setBorder(Border).
| Field Summary | ||
static int |
STYLE_DASHED
Defines a dashed (---) style applicable to simple and rounded borders. |
|
static int |
STYLE_DOTTED
Defines a dotted (...) style applicable to simple and rounded borders. |
|
static int |
STYLE_FILLED
Defines a filled style applicable to rounded borders. |
|
static int |
STYLE_SOLID
Defines a solid (___) style applicable to simple and rounded borders. |
|
static int |
STYLE_TRANSPARENT
Defines a transparent style applicable to simple and rounded borders. |
|
| Constructor Summary | ||
protected |
Border(XYEdges edges,
int style)
Do not allow direct instantiation. |
|
| Method Summary | ||
Background |
getBackground()
Retrieves the border's background if it exists. |
|
int |
getBottom()
Retrieves the width/thickness of the border's bottom edge. |
|
XYEdges |
getEdges()
Retrieve the XYEdges object representing the width/thickness of the border's four sides in pixels. |
|
void |
getEdges(XYEdges edges)
Copies the width/thickness of the border's four sides in pixels into the specified XYEdges object. |
|
int |
getLeft()
Retrieves the width/thickness of the border's left edge. |
|
int |
getRight()
Retrieves the width/thickness of the border's right edge. |
|
int |
getStyle()
Retrieves the style of the border. |
|
int |
getTop()
Retrieves the width/thickness of the border's top edge. |
|
boolean |
isTransparent()
Specifies whether the border is transparent based on set style. |
|
abstract void |
paint(Graphics graphics,
XYRect rect)
Invoked by paint methods in Field and
Screen. |
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int STYLE_DASHED
public static final int STYLE_DOTTED
public static final int STYLE_FILLED
public static final int STYLE_SOLID
public static final int STYLE_TRANSPARENT
| Constructor Detail |
protected Border(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.| Method Detail |
public Background getBackground()
public final int getBottom()
public final XYEdges getEdges()
public final void getEdges(XYEdges edges)
edges - XYEdges object in which to copy border widths/thickness.public final int getLeft()
public final int getRight()
public final int getStyle()
public final int getTop()
public final boolean isTransparent()
|
|||||||||
| 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.