Package org.zkoss.zkmax.zul
Class Barcode
- java.lang.Object
-
- org.zkoss.zk.ui.AbstractComponent
-
- org.zkoss.zk.ui.HtmlBasedComponent
-
- org.zkoss.zul.impl.XulElement
-
- org.zkoss.zkmax.zul.Barcode
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,org.zkoss.zk.ui.Component,org.zkoss.zk.ui.ext.Scope,org.zkoss.zk.ui.sys.ComponentCtrl
public class Barcode extends org.zkoss.zul.impl.XulElementRepresents a barcodeA barcode is a component to handle 1D and 2D barcode image.
- Since:
- 8.6.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Barcode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBarWidth()Returns the width of single bar (only for 1D barcode).booleangetDisplayValue()Returns the visibility of the value of barcode component (only for 1D barcode).intgetFontSize()Returns the fontSize of barcode (only for 1D barcode).java.lang.StringgetType()Returns the encoded and decoded type of this component.java.lang.StringgetValue()Returns the value of the barcode image.protected voidrenderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer)voidsetBarWidth(int barWidth)Sets the width of single bar.voidsetDisplayValue(boolean displayValue)Sets the visibility of the value of barcode component.voidsetFontSize(int fontSize)Sets the fontSize of barcode.voidsetType(java.lang.String type)Sets the encode and decode type of this component.voidsetValue(java.lang.String value)Sets the value that will be encoded to the barcode image.-
Methods inherited from class org.zkoss.zul.impl.XulElement
clone, getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributes
-
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
addSclass, evalCSSFlex, focus, getAction, getClientAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZindex, getZIndex, removeSclass, removeSclass, service, setAction, setClass, setClientAction, 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, setZIndexDirectly
-
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, destroyIndexCacheMap, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, disableHostChanged, enableBindingAnnotation, enableHostChanged, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, 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, getForwards, getId, getIndexCacheMap, getLastChild, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, initIndexCacheMap, insertBefore, invalidate, isChildable, isDisabledHostChanged, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onParentChanged, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, renderPropertiesOnly, 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, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
-
-
-
-
Method Detail
-
getType
public java.lang.String 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.
-
setType
public void setType(java.lang.String type)
Sets the encode and decode type of this component. Example: type="code128", type="qr"- Parameters:
type- decide the render type function.
-
getValue
public java.lang.String getValue()
Returns the value of the barcode image.Default: "".
- Returns:
- The barcode's value
-
setValue
public void setValue(java.lang.String value)
Sets the value that will be encoded to the barcode image.- Parameters:
value- The value to be encoded into barcode.
-
getDisplayValue
public boolean getDisplayValue()
Returns the visibility of the value of barcode component (only for 1D barcode).Default: false.
- Returns:
- true if displaying value is enable.
-
setDisplayValue
public void setDisplayValue(boolean displayValue)
Sets the visibility of the value of barcode component.- Parameters:
displayValue- Whether to show the value text or not, only for 1D barcode.
-
getFontSize
public int getFontSize()
Returns the fontSize of barcode (only for 1D barcode).Default: 10.
- Returns:
- the font size of the barcode text.
-
setFontSize
public void setFontSize(int fontSize)
Sets the fontSize of barcode.- Parameters:
fontSize- The fontSize of the barcode text, only for 1D barcode.
-
getBarWidth
public int getBarWidth()
Returns the width of single bar (only for 1D barcode).Default: 2.
- Returns:
- the single bar width
-
setBarWidth
public void setBarWidth(int barWidth)
Sets the width of single bar.- Parameters:
barWidth- The single width of the 1D barcode bar. It would affect the total width of the barcode;
-
renderProperties
protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) throws java.io.IOException- Overrides:
renderPropertiesin classorg.zkoss.zul.impl.XulElement- Throws:
java.io.IOException
-
-