public class Barcodescanner extends Widget
$weave, auDelay, autag, bindLevel, className, desktop, effects_, firstChild, id, insertingBefore_, inServer, lastChild, nChildren, nextSibling, parent, previousSibling, uuid, widgetName
Modifier and Type | Method and Description |
---|---|
int |
getConsistencyBufferSize()
Returns the consistency buffer size (used in 1D barcode).
|
int |
getConsistencyThreshold()
Returns the consistency threshold (used in 1D barcode).
|
String |
getConstraints()
Returns the constraints in JSON format String,
About allowed constraints setting,
see https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamConstraints
Default: null.
|
double |
getErrorAcceptance()
Returns the error acceptance (used in 1D barcode).
|
int |
getInterval()
Returns the the scan interval of the barcode scanner.
|
String |
getType()
Returns the types which the barcode scanner is dealing with.
|
boolean |
isContinuous()
Returns the continuous scanning status of the barcode scanner.
|
boolean |
isEnable()
Returns the enable status of the barcode scanner.
|
static void |
registerLibrary(java.lang.Object constructor,
String libname,
Array types)
A method that to register the library into the widget at class level.
|
void |
setConsistencyBufferSize(int bufferSize)
Sets the consistency buffer size (used in 1D barcode).
|
void |
setConsistencyThreshold(int threshold)
Sets the consistency threshold (used in 1D barcode).
|
void |
setConstraints(String constraints)
Sets the constraints in JSON format String,
if not specify constraints, it will use {video: {facingMode: 'environment'}}.
|
void |
setContinuous(boolean continuous)
Sets the continuous scanning mechanism for barcode scanner, true is enable continue scan mechanism, false is disable the mechanism.
|
void |
setEnable(boolean enable)
Sets the enable status of barcode scanner, true is enable the scanner function, false is disable the scanner
function.
|
void |
setErrorAcceptance(double acceptance)
Sets the error acceptance (used in 1D barcode).
0 means no error allowed, 1 (100%) means no check.
|
void |
setInterval(int interval)
Sets the scan rate of barcode scanner, only it works when the continuous is true.
|
void |
setType(boolean type)
A string which is a combination of types separated by commas.
|
afterKeyDown_, beforeCtrlKeys_, getContext, getCtrlKeys, getOpenTooltip, getPopup, getTooltip, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip
$, $f, $f, $f, $init, $n, $n, $o, $s, $service, afterAnima_, afterParentChanged_, appendChild, appendChild, beforeParentChanged_, beforeSendAU_, bind_, bind, bindChildren_, bindDoubleTap_, bindMissingAncestors, bindSwipe_, bindTapHold_, canActivate, cleanDrag_, clear, clearCache, cloneDrag_, deferRedraw_, deferRedrawHTML_, detach, doBlur_, doClick_, doDoubleClick_, doFocus_, doKeyDown_, doKeyPress_, doKeyUp_, domAttrs_, domClass_, domListen_, doMouseDown_, doMouseMove_, doMouseOut_, doMouseOver_, doMouseUp_, domStyle_, domTextStyleAttr_, domTooltiptext_, domUnlisten_, doPaste_, doResizeScroll_, doRightClick_, doSelect_, doSwipe_, doTooltipOut_, doTooltipOver_, dropEffect_, extraBind_, fire, fireX, focus_, focus, forcerender, fromPageCoord, get, getAction, getCaveNode, getChildAt, getChildIndex, getClass, getCssflex, getDraggable, getDragMessage_, getDragNode, getDragOptions_, getDrop_, getDroppable, getElementsById, getElementsByName, getFirstNode_, getFloatZIndex_, getHeight, getHflex, getId, getLeft, getMold, getOldWidget_, getPage, getRenderdefer, getSclass, getScrollLeft, getScrollTop, getStyle, getTabindex, getTextNode, getTooltiptext, getTop, getTopWidget, getVflex, getWidth, getZclass, getZIndex, hide, ignoreDescendantFloatUp_, ignoreDrag_, initDrag_, insertBefore, insertChildHTML_, isAutoId, isBinding, isFloating_, isListen, isRealElement, isRealVisible, isRealVisible, isVisible, isVisible, isWatchable_, listen, listenOnFitSize_, mimicMouseDown_, newInstance, nextUuid, onAfterSize, onChildAdded_, onChildRemoved_, onChildRenderDefer_, onChildReplaced_, onChildVisible_, onDrop_, redraw, redrawHTML_, register, removeChild, removeChild, removeChildHTML_, removeHTML_, replaceCavedChildren_, replaceChildHTML_, replaceHTML, replaceWidget, rerender, rerender, rerenderLater_, rerenderNow_, scrollIntoView, sendAU_, set, set, setAction, setChildren, setCssflex, setDomVisible_, setDraggable, setDroppable, setFloating_, setFloatZIndex_, setHeight, setHflex, setId, setLeft, setListener, setListener, setListeners, setMold, setRenderdefer, setSclass, setScrollLeft, setScrollTop, setStyle, setTabindex, setTooltiptext, setTop, setTopmost, setVflex, setVisible, setWidth, setZclass, setZIndex, shallChildROD_, shallFireSizedLaterWhenAddChd_, shallIgnoreClick_, show, smartUpdate, unbind_, unbind, unbindChildren_, unbindDoubleTap_, unbindSwipe_, unbindTapHold_, uncloneDrag_, unlisten, unlistenOnFitSize_, updateDomClass_, updateDomStyle_, uuid, zsync
$init, $instanceof, $super, $super, $supers, $supers, afterInit, isAssignableFrom, isInstance, proxy
public void setType(boolean type)
registerLibrary(java.lang.Object, _global_.String, _global_.Array)
type
- public String getType()
Default: "code128".
public void setEnable(boolean enable)
enable
- public boolean isEnable()
Default: "true".
public void setContinuous(boolean continuous)
continuous
- public boolean isContinuous()
Default: "false".
public void setInterval(int interval)
interval
- public int getInterval()
Default: 1000. Unit: millisecond.
public void setConstraints(String constraints)
constraints
- constraints in JSON format Stringpublic String getConstraints()
public void setConsistencyBufferSize(int bufferSize)
bufferSize
- buffer size. Must be > 0 and >= threshold.public int getConsistencyBufferSize()
Default: 5.
public void setConsistencyThreshold(int threshold)
threshold
- threshold. Must be > 0 and <= buffer size.public int getConsistencyThreshold()
Default: 3.
public void setErrorAcceptance(double acceptance)
acceptance
- Error acceptance. Must be >= 0 and <= 1.public double getErrorAcceptance()
Default: 0.1 (means 10%)
public static void registerLibrary(java.lang.Object constructor, String libname, Array types)
{
create: create is a js barcode detector object, given by a library.
name: the name of the reader, and you can call the reader by wgt._'name'+'Reader';
init: a function to initialize the reader properties,
enable: a function to enable the detecting function,
execute: a function to exeutec the reader decode method, it should content the contenting function.
setType: a function to connect the reader and widget types function,
other: a json properties to let you to attend the reader method.(future feature)
}
zinit, zdestroy, zexecute, zenable are reader's methods and enable and name are reader's properties.
zinit is a method to set the initial properties to the detecting object.
zdestroy is a method to destroy the reader.
zexecute is a mothod for detecting. It should provide a single detecting and continue scanning method.
zenable is a method to control the detector.constructor
- A barcode detector object.libname
- The library name you use.types
- An array of types which your library can handle.Copyright © 2005-2023 Potix Corporation. All Rights Reserved.