|
|||||||||
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.amms.control.camera.ViewfinderOverlay.VideoControlOverlayField
net.rim.device.api.barcodelib.BarcodeScannerOverlayField
public class BarcodeScannerOverlayField
Provides an overlay for the viewfinder when using a BarcodeDecoder
.
Field Summary |
---|
Constructor Summary | ||
---|---|---|
BarcodeScannerOverlayField(BarcodeDecoder decoder,
VideoControl videoControl)
Creates a new instance of BarcodeScannerOverlayField . |
Method Summary | ||
---|---|---|
void |
addResultPoint(ResultPoint point)
The DecodeHintType.NEED_RESULT_POINT_CALLBACK that's registered calls this method to add
ResultPoint for painting. |
|
void |
enableRectangeHint(boolean enable)
Enables a rectange hint that can help users place a barcode. |
|
void |
enableScanLineHint(boolean enable)
Enables a scan line hint that can help users place a barcode. |
|
protected void |
paint(Graphics graphics)
Invoked by the framework to redraw a portion of this field. |
Methods inherited from class net.rim.device.api.amms.control.camera.ViewfinderOverlay.VideoControlOverlayField |
---|
getDisplayHeight, getDisplayWidth, getPreferredHeight, getPreferredWidth, getXPosition, getYPosition, layout |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BarcodeScannerOverlayField(BarcodeDecoder decoder, VideoControl videoControl)
BarcodeScannerOverlayField
.
If the BarcodeDecoder
is configured to scan for 1D barcodes, this BarcodeScannerOverlayField
may be augmented with a
hint that will help scan 1D barcodes. Similarly, if the BarcodeDecoder
is configured to scan for 2D barcodes,
this BarcodeScannerOverlayField
may be augmented with a hint that will help scan 2D barcodes.
decoder
- BarcodeDecoder
that owns this overlay.control
- VideoControl
that owns this overlay.
IllegalArgumentException
- if videoControl is null
.
IllegalArgumentException
- if decoder is null
.Method Detail |
---|
public void addResultPoint(ResultPoint point)
DecodeHintType.NEED_RESULT_POINT_CALLBACK
that's registered calls this method to add
ResultPoint
for painting. Can be overriden with no-op to disable result points.
point
- ResultPoint
of interest. If point is null
this method does nothing.public void enableRectangeHint(boolean enable)
enable
- true
to enable the hint, false
otherwise.public void enableScanLineHint(boolean enable)
enable
- true
to enable the hint, false
otherwise.protected void paint(Graphics graphics)
Field
This is an abstract method; any class that extends Field
must implement this method appropriate to its needs.
A field's manager invokes this method when an area of this field has been marked as invalid. All painting should be done in field-local coordinates (for example, (0,0) is the top left corner of the field's pane).
The clipping rectangle is available (in local coordinates) through
Graphics.getClippingRect()
. You can use this rectangle to
determine the minimal amount of drawing required to satisfy the paint
request. Large controls should make use of this for more efficient
painting, particularly during scroll operations.
Preconditions for the paint method
Routines that invoke this method on a field ensure that
this.getFont()
returns an equivalent value to
graphics.getFont()
and that the
appropriate clipping rect and transformation stack are set up, so that
this method draws on the appropriate area of this field.
Should you implement a layout manager (for example) of your own, be aware that you must ensure these conditions are met before invoking this method in child Fields.
paint
in class Field
graphics
- The graphics context for drawing in this field.Field.paint(net.rim.device.api.ui.Graphics)
|
|||||||||
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