Interface IBarcodescanner
- All Superinterfaces:
IAnyGroup<IBarcodescanner>,IComponent<IBarcodescanner>,IHtmlBasedComponent<IBarcodescanner>,IXulElement<IBarcodescanner>
Barcodescanner component
Only works for Chrome, Firefox and Edge. iOS Safari is supported since 11. (iOS WebView browsers like Chrome are not supported yet)
Support @Action
| Name | Action Type |
|---|---|
| onDetect | ActionData: DetectData
Notifies if the barcode scanner detect a barcode message. |
- Author:
- katherine
- See Also:
-
Barcodescanner
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classBuilds instances of typeIBarcodescanner.static classBuilds an updater of typeIBarcodescannerforUiAgent.smartUpdate(Locator, SmartUpdater). -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IBarcodescannerConstant for default attributes of this immutable component. -
Method Summary
Modifier and TypeMethodDescriptiondefault intReturns the consistency buffer size (used in 1D barcode).default intReturns the consistency threshold (used in 1D barcode).Returns the constraints.default doubleReturns the error acceptance (used in 1D barcode).default doubleReturns the scan interval of the barcode scanner.default StringgetType()Returns the types which the barcode scanner is dealing with.default StringReturns the client widget class.default booleanReturns the continuous scan status of the barcode scanner.default booleanisEnable()Returns the enabled status of the barcode scanner.static IBarcodescannerReturns the instance with the given id.static IBarcodescannerofInterval(int interval) Returns the instance with the given intervalstatic IBarcodescannerReturns the instance with the given typewithConsistencyBufferSize(int consistencyBufferSize) Returns a copy ofthisimmutable component with the specifiedconsistencyBufferSize.withConsistencyThreshold(int consistencyThreshold) Returns a copy ofthisimmutable component with the specifiedconsistencyThreshold.withConstraints(Map<String, ? extends Object> constraints) Returns a copy ofthisimmutable component with the specifiedconstraints.withContinuous(boolean continuous) Returns a copy ofthisimmutable component with the specifiedcontinuous.withEnable(boolean enable) Returns a copy ofthisimmutable component with the specifiedenable.withErrorAcceptance(double errorAcceptance) Returns a copy ofthisimmutable component with the specifiederrorAcceptance.withInterval(double interval) Returns a copy ofthisimmutable component with the specifiedinterval.Returns a copy ofthisimmutable component with the specifiedtype.Methods inherited from interface org.zkoss.stateless.sul.IComponent
getAction, getActions, getClientAttributes, getId, getMold, getWidgetListeners, getWidgetOverrides, isVisible, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withActions, withActions, withClientAttribute, withClientAttributes, withId, withMold, withVisible, withWidgetClass, withWidgetListener, withWidgetListeners, withWidgetOverride, withWidgetOverridesMethods inherited from interface org.zkoss.stateless.sul.IHtmlBasedComponent
getClientAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getSkeleton, getStyle, getTabindex, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZIndex, isFocus, withClientAction, withDraggable, withDroppable, withFocus, withHeight, withHflex, withLeft, withRenderdefer, withSclass, withSkeleton, withStyle, withTabindex, withTabindex, withTooltiptext, withTop, withVflex, withWidth, withZclass, withZIndexMethods inherited from interface org.zkoss.stateless.sul.IXulElement
getContext, getCtrlKeys, getPopup, getTooltip, withContext, withCtrlKeys, withPopup, withTooltip
-
Field Details
-
DEFAULT
Constant for default attributes of this immutable component.
-
-
Method Details
-
getWidgetClass
Returns the client widget class.Default:
"zkmax.barscanner.Barcodescanner"- Specified by:
getWidgetClassin interfaceIComponent<IBarcodescanner>
-
getConstraints
Returns the constraints. About allowed constraints setting, see MediaStreamConstraintsDefault:
null. -
withConstraints
Returns a copy ofthisimmutable component with the specifiedconstraints.Sets the constraints. About allowed constraints setting, see MediaStreamConstraints
- Parameters:
constraints- The constraints setting.Default:
null.- Returns:
- A modified copy of the
thisobject
-
getType
Returns the types which the barcode scanner is dealing with.Default:
"CODE128". -
withType
Returns a copy ofthisimmutable component with the specifiedtype.Sets the encoded and decoded type of this component. The built-in types are
- CODE family: CODE39, CODE128, CODE128A, CODE128B, CODE128C
- EAN family: EAN13, EAN8, EAN5, EAN2
- ITF family: ITF14, ITF
- MSI family: MSI, MSI10, MSI11, MSI1010, MSI1110
- others: UPC, PHARMACODE , CODABAR, QR
- Parameters:
type- The encoded and decoded type of this component.Default:
"CODE128".- Returns:
- A modified copy of the
thisobject
-
getInterval
default double getInterval()Returns the scan interval of the barcode scanner.Default:
1000. Unit: millisecond. -
withInterval
Returns a copy ofthisimmutable component with the specifiedinterval.Sets the scan interval of the barcode scanner.
- Parameters:
interval- The scan interval of the barcode scanner.Default:
1000. Unit: millisecond.- Returns:
- A modified copy of the
thisobject
-
getConsistencyBufferSize
default int getConsistencyBufferSize()Returns the consistency buffer size (used in 1D barcode).Default:
5. -
withConsistencyBufferSize
Returns a copy ofthisimmutable component with the specifiedconsistencyBufferSize.Sets the consistency buffer size (used in 1D barcode).
- Parameters:
consistencyBufferSize- The consistency buffer size (used in 1D barcode).Default:
5.- Returns:
- A modified copy of the
thisobject
-
getConsistencyThreshold
default int getConsistencyThreshold()Returns the consistency threshold (used in 1D barcode). In other way, the result is required to be scanned at least N times out of consistency buffer size.Default:
3. -
withConsistencyThreshold
Returns a copy ofthisimmutable component with the specifiedconsistencyThreshold.Sets the consistency threshold (used in 1D barcode).
- Parameters:
consistencyThreshold- The consistency threshold (used in 1D barcode).Default:
3.- Returns:
- A modified copy of the
thisobject
-
getErrorAcceptance
default double getErrorAcceptance()Returns the error acceptance (used in 1D barcode).Default:
0.1(means 10%) -
withErrorAcceptance
Returns a copy ofthisimmutable component with the specifiederrorAcceptance.Sets the error acceptance (used in 1D barcode).
- Parameters:
errorAcceptance- The error acceptance (used in 1D barcode).Default:
0.1(means 10%).- Returns:
- A modified copy of the
thisobject
-
isContinuous
default boolean isContinuous()Returns the continuous scan status of the barcode scanner.Default:
false.- Returns:
- boolean
-
withContinuous
Returns a copy ofthisimmutable component with the specifiedcontinuous.Sets the continuous scan status of the barcode scanner.
- Parameters:
continuous- The continuous scan status of the barcode scanner.Default:
false.- Returns:
- A modified copy of the
thisobject
-
isEnable
default boolean isEnable()Returns the enabled status of the barcode scanner.Default:
true. -
withEnable
Returns a copy ofthisimmutable component with the specifiedenable.Sets the enabled status of the barcode scanner.
- Parameters:
enable- The enabled status of the barcode scanner.Default:
true.- Returns:
- A modified copy of the
thisobject
-
ofType
Returns the instance with the given type- Parameters:
type- The encoded or decoded type of the component.
-
ofInterval
Returns the instance with the given intervalBy calling this,
isContinuous()to be true.- Parameters:
interval- The scan interval of the barcode scanner.
-
ofId
Returns the instance with the given id.- Parameters:
id- The id to identify this component
-