public class Barcodescanner
extends org.zkoss.zul.impl.XulElement
| Constructor and Description |
|---|
Barcodescanner() |
| 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).
|
Map |
getConstraints()
Returns the constraints.
|
String |
getConstraintsString()
Returns the constraints in JSON String format.
|
boolean |
getContinuous()
Returns the continue scan status of the barcode scanner.
|
boolean |
getEnable()
Returns the enable status of the barcode scanner.
|
double |
getErrorAcceptance()
Returns the error acceptance (used in 1D barcode).
|
double |
getInterval()
Returns the the scan interval of the barcode scanner.
|
String |
getType()
Returns the types which the barcode scanner is dealing with.
|
protected void |
renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) |
void |
service(org.zkoss.zk.au.AuRequest request,
boolean everError) |
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(Map constraints)
Sets the constraints,
if not specify constraints, it will use {video: {facingMode: 'environment'}}.
|
void |
setConstraintsString(String constraints)
Sets the constraints in JSON String format,
if not specify constraints, it will use {video: {facingMode: 'environment'}}.
|
void |
setContinuous(boolean continuous)
Set the continue scan function of barcode scanner, true is enable continue scan function, false is disable
the function
|
void |
setEnable(boolean enable)
Set 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)
Set the scan interval of barcode scanner, it works only when the continuous is true.
|
void |
setType(String type)
A string which is a combination of types, separated by comma,
the widget can detect all the defined types at a same time.
|
clone, getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributesaddSclass, evalCSSFlex, focus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZindex, getZIndex, removeSclass, removeSclass, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectlyaddAnnotation, addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, insertBefore, invalidate, invalidatePartial, isChildable, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerializepublic String getType()
Default: "CODE128".
public void setType(String type)
type - .public boolean getContinuous()
Default: "false".
public void setContinuous(boolean continuous)
continuous - public boolean getEnable()
Default: "true".
public void setEnable(boolean enable)
enable - public double getInterval()
Default: 1000. Unit: millisecond.
public void setInterval(int interval)
interval - public Map getConstraints()
public void setConstraints(Map constraints)
constraints - the constraintspublic String getConstraintsString()
Default: null.
public void setConstraintsString(String constraints)
constraints - the constraints in JSON String formatpublic int getConsistencyBufferSize()
Default: 5.
public void setConsistencyBufferSize(int bufferSize)
bufferSize - buffer size. Must be > 0 and >= threshold.public int getConsistencyThreshold()
Default: 3.
public void setConsistencyThreshold(int threshold)
threshold - threshold. Must be > 0 and <= buffer size.public double getErrorAcceptance()
Default: 0.1 (means 10%)
public void setErrorAcceptance(double acceptance)
acceptance - Error acceptance. Must be >= 0 and <= 1.public void service(org.zkoss.zk.au.AuRequest request,
boolean everError)
service in interface org.zkoss.zk.ui.sys.ComponentCtrlservice in class org.zkoss.zk.ui.HtmlBasedComponentprotected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer)
throws IOException
renderProperties in class org.zkoss.zul.impl.XulElementIOExceptionCopyright © 2026. All rights reserved.