|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.ui.Field
net.rim.device.api.ui.Manager
net.rim.device.api.ui.Screen
net.rim.device.api.ui.container.FullScreen
net.rim.device.api.ui.container.MainScreen
net.rim.device.api.ui.extension.container.ZoomScreen
public final class ZoomScreen
A screen for zooming-in, and panning around images. Includes an overlay graphic illustrating the viewed portion of the image. On touch screen devices, this screen supports a two finger touch feature where two-fingers-down define the diagonally opposite corners of the region to zoom.
This class supports image orientation either through the use of embedded JPEG EXIF data, or by explicitly specifying an orientation in the constructor.
ZoomScreen supports the following orientation values:
ZoomScreen.ROTATE_0_DEGREESFFFFFF FF FFFF FF FF
ZoomScreen.ROTATE_90_DEGREESFF FF FF FFFFFFFFFF
ZoomScreen.ROTATE_180_DEGREES
FF
FF
FFFF
FF
FFFFFF
ZoomScreen.ROTATE_270_DEGREES
FFFFFFFFFF
FF FF
FF
| Field Summary | ||
|---|---|---|
static int |
ROTATE_0_DEGREES
EXIF orientation value for correctly displaying images with no rotation. |
|
static int |
ROTATE_180_DEGREES
EXIF orientation value for correctly displaying images that are rotated by 180 degrees. |
|
static int |
ROTATE_270_DEGREES
EXIF orientation value for correctly displaying images that are rotated clockwise by 90 degrees. |
|
static int |
ROTATE_90_DEGREES
EXIF orientation value for correctly displaying images that are rotated counter clockwise by 90 degrees. |
|
| Fields inherited from class net.rim.device.api.ui.Screen |
|---|
DEFAULT_CLOSE, DEFAULT_MENU, NO_SYSTEM_MENU_ITEMS |
| Fields inherited from class net.rim.device.api.ui.Manager |
|---|
BOTTOMMOST, DOWNWARD, HORIZONTAL_SCROLL, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_MASK, HORIZONTAL_SCROLL_MASK, LEAVE_BLANK_SPACE, LEFTMOST, LEFTWARD, NO_HORIZONTAL_SCROLL, NO_HORIZONTAL_SCROLLBAR, NO_SCROLL_RESET, NO_VERTICAL_SCROLL, NO_VERTICAL_SCROLLBAR, QUANTA_FONT, RIGHTMOST, RIGHTWARD, TOPMOST, UPWARD, VERTICAL_SCROLL, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_MASK, VERTICAL_SCROLL_MASK |
| Constructor Summary | ||
|---|---|---|
ZoomScreen(EncodedImage encodedImage)
Constructs a new ZoomScreen. |
||
ZoomScreen(EncodedImage encodedImage,
int orientation)
Constructs a new ZoomScreen using the specified orientation to display the image. |
||
| Method Summary | ||
|---|---|---|
protected boolean |
keyChar(char c,
int status,
int time)
Delegates key generation event to the controlled field with focus. |
|
protected boolean |
navigationClick(int status,
int time)
Increases (multiplies) the amount of zoom by the specified increment. |
|
protected boolean |
navigationMovement(int dx,
int dy,
int status,
int time)
Pans around the zoomed image. |
|
protected void |
paint(Graphics graphics)
Paints this screen's visible region. |
|
protected void |
sublayout(int width,
int height)
Lays out this screen's controlled fields. |
|
protected boolean |
touchEvent(TouchEvent message)
Handles touch events. |
|
| Methods inherited from class net.rim.device.api.ui.container.MainScreen |
|---|
addMenuItem, getField, getFieldCount, getFieldWithFocus, getFieldWithFocusIndex, getMainManager, keyCharUnhandled, makeMenu, onSavePrompt, removeAllMenuItems, removeMenuItem, setBanner, setId, setStatus, setTitle, setTitle, setTitle |
| Methods inherited from class net.rim.device.api.ui.Manager |
|---|
addAll, deleteAll, getHorizontalScroll, getPreferredHeightOfChild, getPreferredWidthOfChild, getVerticalScroll, getVirtualHeight, getVirtualWidth, getVisibleHeight, getVisibleWidth, invalidateFieldRange, isDownArrowShown, isUpArrowShown, isValidLayout, layout, layoutChild, moveFocus, moveFocus, nextFocus, nextFocus, paintChild, setFocus, setHorizontalScroll, setHorizontalScroll, setPositionChild, setScrollListener, setScrollingInertial, setVerticalScroll, setVirtualExtent, subpaint |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ROTATE_0_DEGREES
public static final int ROTATE_180_DEGREES
public static final int ROTATE_90_DEGREES
public static final int ROTATE_270_DEGREES
| Constructor Detail |
|---|
public ZoomScreen(EncodedImage encodedImage)
encodedImage is a JPEG any
embedded EXIF orientation data is applied but can be overridden using the
alternative constructor ZoomScreen.ZoomScreen(EncodedImage, int).
encodedImage - the image to display.
public ZoomScreen(EncodedImage encodedImage,
int orientation)
ROTATE_90_DEGREES
If no rotation is necessary, use ROTATE_0_DEGREES or the alternative constructor
ZoomScreen.ZoomScreen(EncodedImage).
encodedImage - the image to display.orientation - a rotation constant to specify how the image should be rotated
before being displayed. One of ROTATE_* values. Any other values will be
ignored and will act as if ROTATE_0_DEGREES had been passed.| Method Detail |
|---|
protected void sublayout(int width,
int height)
sublayout in class FullScreenwidth - Horizontal space available to this screen.height - Vertical space available to this screen.protected void paint(Graphics graphics)
paint in class Screengraphics - Graphics context used to draw the background.
protected boolean navigationMovement(int dx,
int dy,
int status,
int time)
navigationMovement in class Screendx - Magnitude of navigational motion: negative for a move left
and positive for a move right.dy - Magnitude of navigational motion: negative for an upwards
move, and positive for a downwards move.status - Modifier key status at time of move.time - Number of milliseconds since the device was turned on. One scenario that calls this method is
when a Screen object is pushed to an application and a Navigation event is injected
into the same application. When this scenario occurs, this method is called using 0 for the time parameter.
protected boolean touchEvent(TouchEvent message)
touchEvent in class Screenmessage - TouchEvent object containing various input parameters
including the event type and touch coordinates.
protected boolean navigationClick(int status,
int time)
navigationClick in class Screenstatus - State of the modifier keys.time - Number of milliseconds since the device was turned on. One scenario that calls this method is
when a Screen object is pushed to an application and a Navigation event is injected
into the same application. When this scenario occurs, this method is called using 0 for the time parameter.
protected boolean keyChar(char c,
int status,
int time)
keyChar in class Screenc - Character generated.status - Modifier key status.time - Number of milliseconds since the device was turned on.
|
|||||||||
| 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.