public class Barcode
extends org.zkoss.zul.impl.XulElement
A barcode is a component to handle 1D and 2D barcode image.
| Constructor and Description |
|---|
Barcode() |
| Modifier and Type | Method and Description |
|---|---|
int |
getBarWidth()
Returns the width of single bar (only for 1D barcode).
|
boolean |
getDisplayValue()
Returns the visibility of the value of barcode component (only for 1D barcode).
|
int |
getFontSize()
Returns the fontSize of barcode (only for 1D barcode).
|
String |
getType()
Returns the encode and decode type of this component.
|
String |
getValue()
Returns the value of the barcode image.
|
protected void |
renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) |
void |
setBarWidth(int barWidth)
Sets the width of single bar.
|
void |
setDisplayValue(boolean displayValue)
Sets the visibility of the value of barcode component.
|
void |
setFontSize(int fontSize)
Sets the fontSize of barcode.
|
void |
setType(String type)
Sets the encode and decode type of this component.
|
void |
setValue(String value)
Sets the value that will be encoded to the barcode image.
|
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, service, 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 - decide the render type function.public String getValue()
Default: "".
public void setValue(String value)
value - The value to be encoded into barcode.public boolean getDisplayValue()
Default: false.
public void setDisplayValue(boolean displayValue)
displayValue - Whether to show the value text or not, only for 1D barcode.public int getFontSize()
Default: 10.
public void setFontSize(int fontSize)
fontSize - The fontSize of the barcode text, only for 1D barcode.public int getBarWidth()
Default: 2.
public void setBarWidth(int barWidth)
barWidth - The single width of the 1D barcode bar. It would affect the total width of the barcode;protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer)
throws IOException
renderProperties in class org.zkoss.zul.impl.XulElementIOExceptionCopyright © 2026. All rights reserved.