|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.ui.decor.Background
public abstract class Background
A background represents an unfocusable rectangular region contained within a screen or
a field. It cannot be instantiated directly. Different types of backgrounds can be
created by calling the following methods in the BackgroundFactory:
BackgroundFactory.createSolidBackground(int)BackgroundFactory.createSolidTransparentBackground(int, int)BackgroundFactory.createLinearGradientBackground(int, int, int, int)BackgroundFactory.createBitmapBackground(Bitmap)BackgroundFactory.createBitmapBackground(Bitmap, int, int, int)Background.draw(Graphics, XYRect) and Background.isTransparent().
The background of a field or screen can be set by invoking
Field.setBackground(Background).
| Field Summary | ||
|---|---|---|
static int |
POSITION_X_CENTER
Center horizontal positioning for bitmap backgrounds. |
|
static int |
POSITION_X_INHERIT
Inherit horizontal positioning for bitmap backgrounds. |
|
static int |
POSITION_X_LEFT
Left horizontal positioning for bitmap backgrounds. |
|
static int |
POSITION_X_RIGHT
Right horizontal positioning for bitmap backgrounds. |
|
static int |
POSITION_Y_BOTTOM
Bottom vertical positioning for bitmap backgrounds. |
|
static int |
POSITION_Y_CENTER
Center vertical positioning for bitmap backgrounds. |
|
static int |
POSITION_Y_INHERIT
Inherit vertical positioning for bitmap backgrounds. |
|
static int |
POSITION_Y_TOP
Top vertical positioning for bitmap backgrounds. |
|
static int |
REPEAT_BOTH
Both horizontal and vertical bitmap tiling for bitmap backgrounds. |
|
static int |
REPEAT_HORIZONTAL
Horizontal bitmap tiling for bitmap backgrounds. |
|
static int |
REPEAT_INHERIT
Inherit bitmap tiling properties for bitmap backgrounds. |
|
static int |
REPEAT_NONE
Suppress bitmap tiling for bitmap backgrounds. |
|
static int |
REPEAT_SCALE_TO_FIT
Scale to fit bitmap for bitmap backgrounds. |
|
static int |
REPEAT_VERTICAL
Vertical bitmap tiling for bitmap backgrounds. |
|
| Constructor Summary | ||
|---|---|---|
protected |
Background()
Do not allow direct instantiation. |
|
| Method Summary | ||
|---|---|---|
abstract void |
draw(Graphics graphics,
XYRect rect)
Invoked by paint methods in Field and
Screen. |
|
abstract boolean |
isTransparent()
Specifies whether the background is transparent. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int POSITION_X_INHERIT
public static final int POSITION_X_LEFT
public static final int POSITION_X_RIGHT
public static final int POSITION_X_CENTER
public static final int POSITION_Y_INHERIT
public static final int POSITION_Y_TOP
public static final int POSITION_Y_BOTTOM
public static final int POSITION_Y_CENTER
public static final int REPEAT_INHERIT
public static final int REPEAT_NONE
public static final int REPEAT_HORIZONTAL
Horizontal tiling means that the bitmap will be repeated in the horizaontal direction from the left edge to the right edge.
public static final int REPEAT_VERTICAL
Vertical tiling means that the bitmap will be repeated in the vertical direction from the top edge to the bottom edge.
public static final int REPEAT_BOTH
public static final int REPEAT_SCALE_TO_FIT
| Constructor Detail |
|---|
protected Background()
| Method Detail |
|---|
public abstract void draw(Graphics graphics,
XYRect rect)
Field and
Screen. This is an abstract method;
any class that extends Background must implement this method appropriate to its needs.
graphics - Graphics context on which to draw.rect - Bounding rectangle within graphics context.public abstract boolean isTransparent()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2010 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. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.