Package org.zkoss.stateless.sul
Interface IBarcode
- All Superinterfaces:
IAnyGroup<IBarcode>,IComponent<IBarcode>,IHtmlBasedComponent<IBarcode>,IXulElement<IBarcode>
Immutable
Barcode component
A barcode is a component to handle 1D and 2D barcode image.
- Author:
- katherine
- See Also:
-
Barcode
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classBuilds instances of typeIBarcode.static classBuilds an updater of typeIBarcodeforUiAgent.smartUpdate(Locator, SmartUpdater). -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault intReturns the width of single bar (only for 1D barcode).default booleanReturns the visibility of the value of barcode component (only for 1D barcode).default intReturns the fontSize of barcode (only for 1D barcode).default StringgetType()Returns the encoded and decoded type of this component.default StringgetValue()Returns the value of the barcode image.default StringReturns the client widget class.static IBarcodeReturns the instance with the given valuestatic IBarcodeReturns the instance with the given id.static IBarcodeReturns the instance with the given type and valuewithBarWidth(int barWidth) Returns a copy ofthisimmutable component with the specifiedbarWidth.withDisplayValue(boolean displayValue) Returns a copy ofthisimmutable component with the specifieddisplayValue.withFontSize(int fontSize) Returns a copy ofthisimmutable component with the specifiedfontSize.Returns a copy ofthisimmutable component with the specifiedtype.Returns a copy ofthisimmutable component with the specifiedvalue.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.barcode.Barcode"- Specified by:
getWidgetClassin interfaceIComponent<IBarcode>
-
getType
Returns 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
Default:
"CODE128".- Returns:
- A value of the barcode current type.
-
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
-
getDisplayValue
default boolean getDisplayValue()Returns the visibility of the value of barcode component (only for 1D barcode).Default:
false. -
withDisplayValue
Returns a copy ofthisimmutable component with the specifieddisplayValue.Sets the visibility of the value of barcode component (only for 1D barcode).
- Parameters:
displayValue- The visibility of the value of barcode componentDefault:
false.- Returns:
- A modified copy of the
thisobject
-
getValue
Returns the value of the barcode image.Default:
"". -
withValue
Returns a copy ofthisimmutable component with the specifiedvalue.Sets the value of the barcode image.
- Parameters:
value- The value of the barcode image.Default:
"".- Returns:
- A modified copy of the
thisobject
-
getFontSize
default int getFontSize()Returns the fontSize of barcode (only for 1D barcode).Default:
10. -
withFontSize
Returns a copy ofthisimmutable component with the specifiedfontSize.Sets the fontSize of barcode (only for 1D barcode).
- Parameters:
fontSize- The fontSize of barcode (only for 1D barcode).Default:
10.- Returns:
- A modified copy of the
thisobject
-
getBarWidth
default int getBarWidth()Returns the width of single bar (only for 1D barcode).Default:
2. -
withBarWidth
Returns a copy ofthisimmutable component with the specifiedbarWidth.Sets the width of single bar (only for 1D barcode).
- Parameters:
barWidth- The width of single bar (only for 1D barcode).Default:
2.- Returns:
- A modified copy of the
thisobject
-
of
Returns the instance with the given value- Parameters:
value- The value of the component
-
ofType
Returns the instance with the given type and value- Parameters:
type- The encoded or decoded type of the component.value- The value of the component
-
ofId
Returns the instance with the given id.- Parameters:
id- The id to identify this component
-