|
|||||||||
| 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.ScrollView
net.rim.device.api.ui.Manager
net.rim.device.api.ui.container.AbsoluteFieldManager
net.rim.device.api.amms.control.camera.ViewfinderOverlay
public class ViewfinderOverlay
Provides an overlay for the viewfinder window for augmentation purposes.
After construction, ViewfinderOverlay.getCanvas() will return a ComponentCanvas that overlaying UI components
can be added to. In addition, this class supports adding ViewfinderOverlay.VideoControlOverlayField that will always be positioned
directly on top of the viewfinder window.
ImageDecoder decoder = new ...
ImageDecoderListener listener = new ...
ImageScanner scanner = new ImageScanner( decoder, listener );
ViewfinderOverlay overlay = new ViewfinderOverlay( scanner.getViewfinder() );
ViewfinderOverlay.VideoControlOverlayField windowOverlay = new ViewfinderOverlay.VideoControlOverlayField {
protected void paint(Graphics graphics) {
// drawing on top of the viewfinder window
}
};
overlay.getCanvas().add( windowOverlay );
| Nested Class Summary | ||
|---|---|---|
static class |
ViewfinderOverlay.OverlayCanvas
A ComponentCanvas that always has the same extent as the provided viewfinder, and positions its ViewfinderOverlay.OverlayCanvas.Positionable
Fields after layout. |
|
static class |
ViewfinderOverlay.VideoControlOverlayField
ViewfinderOverlay.VideoControlOverlayField is a Field that matches the dimensions of the video window controlled by a given
VideoControl, and overlays it directly. |
|
| Field Summary |
|---|
| 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 | ||
|---|---|---|
ViewfinderOverlay(Field viewfinder)
Creates a new instance of ViewfinderOverlay. |
||
ViewfinderOverlay(Field viewfinder,
int x,
int y)
Creates a new instance of ViewfinderOverlay. |
||
| Method Summary | ||
|---|---|---|
ViewfinderOverlay.OverlayCanvas |
getCanvas()
Returns the ComponentCanvas to add ui components to that will overlay
the viewfinder. |
|
| Methods inherited from class net.rim.device.api.ui.container.AbsoluteFieldManager |
|---|
add, getPreferredHeight, getPreferredWidth, insert, nextFocus, setPosChild, sublayout |
| Methods inherited from class net.rim.device.api.ui.ScrollView |
|---|
configurationChanged, getHorizontalAdjustment, getVerticalAdjustment, getVisibleHeight, getVisibleWidth, onDisplay, onExposed, onUndisplay, setCurrentLocation, setExtent, setHorizontalAdjustment, setHorizontalScroll, setHorizontalScroll, setScrollListener, setVerticalAdjustment, setVerticalScroll, setVerticalScroll, valueChanged, waitForScrolling |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ViewfinderOverlay(Field viewfinder)
ViewfinderOverlay.
The provided viewfinder and ViewfinderOverlay.OverlayCanvas are positioned at (0, 0).
viewfinder - Viewfinder returnd by ImageScanner.getViewfinder().
IllegalArgumentException - if viewfinder is null.
public ViewfinderOverlay(Field viewfinder,
int x,
int y)
ViewfinderOverlay.
The provided viewfinder and ViewfinderOverlay.OverlayCanvas are positioned at the provided coordinates.
viewfinder - Viewfinder returnd by ImageScanner.getViewfinder().x - the x coordinate for the viewfinder and overlay.y - the y coordinate for the viewfinder and overlay.
IllegalArgumentException - if viewfinder is null.| Method Detail |
|---|
public ViewfinderOverlay.OverlayCanvas getCanvas()
ComponentCanvas to add ui components to that will overlay
the viewfinder.
ComponentCanvas
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal