Package org.zkoss.zkmax.zul
Class Stepbar
- java.lang.Object
-
- org.zkoss.zk.ui.AbstractComponent
-
- org.zkoss.zk.ui.HtmlBasedComponent
-
- org.zkoss.zul.impl.XulElement
-
- org.zkoss.zkmax.zul.Stepbar
-
- 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 Stepbar extends org.zkoss.zul.impl.XulElementA stepbar. Shows several steps that represent sequential navigation.Only support browsers that support Flex. (IE11, Edge, Chrome, Firefox, Safari)
Default
getZclass(): z-stepbar.- Since:
- 9.0.0
- Author:
- jameschu
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Stepbar()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanback()Activate previous step if possible.voidbeforeChildAdded(org.zkoss.zk.ui.Component child, org.zkoss.zk.ui.Component insertBefore)intgetActiveIndex()Return the index of the active step.StepgetActiveStep()Return the active step.StepModel<?>getModel()Returns the step model associated with this stepbar, or null if this stepbar is not associated with any step model.java.lang.StringgetOrient()Returns the orient.StepRenderergetStepRenderer()java.util.List<Step>getSteps()Returns the steps in this stepbar.java.lang.StringgetZclass()booleaninsertBefore(org.zkoss.zk.ui.Component newChild, org.zkoss.zk.ui.Component refChild)booleanisLinear()Returns whether the steps in this stepbar are displayed by order.booleanisVertical()Returns whether it is a vertical step bar.booleanisWrappedLabels()Returns whether the labels in children steps is wrapped.booleannext()Activate next step if possible.voidonInitRender()voidonPageAttached(org.zkoss.zk.ui.Page newpage, org.zkoss.zk.ui.Page oldpage)voidonPageDetached(org.zkoss.zk.ui.Page page)booleanremoveChild(org.zkoss.zk.ui.Component child)protected voidrenderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer)voidservice(org.zkoss.zk.au.AuRequest request, boolean everError)voidsetActiveIndex(int activeIndex)Sets the index of the active step.voidsetActiveStep(Step step)Sets the active step.voidsetLinear(boolean linear)Sets whether the steps in this stepbar are displayed by order.voidsetModel(StepModel<?> model)Sets the step model associated with this stepbar.voidsetOrient(java.lang.String orient)Sets the orient.voidsetStepRenderer(StepRenderer stepRenderer)voidsetWrappedLabels(boolean wrappedLabels)Sets whether the labels in children steps is wrapped.-
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, getZindex, getZIndex, removeSclass, removeSclass, 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, 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, invalidate, isChildable, isDisabledHostChanged, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onParentChanged, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, 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
-
isWrappedLabels
public boolean isWrappedLabels()
Returns whether the labels in children steps is wrapped.Default: false.
- Returns:
- whether the labels in children steps is wrapped.
-
setWrappedLabels
public void setWrappedLabels(boolean wrappedLabels)
Sets whether the labels in children steps is wrapped.- Parameters:
wrappedLabels- the labels in children steps is wrapped.
-
isLinear
public boolean isLinear()
Returns whether the steps in this stepbar are displayed by order.Default: true.
- Returns:
- whether the steps in this stepbar are displayed by order.
-
setLinear
public void setLinear(boolean linear)
Sets whether the steps in this stepbar are displayed by order.- Parameters:
linear- whether the steps in this stepbar are displayed by order.
-
getActiveIndex
public int getActiveIndex()
Return the index of the active step.Default: 0.
- Returns:
- the index of the active step.
-
setActiveIndex
public void setActiveIndex(int activeIndex)
Sets the index of the active step.- Parameters:
activeIndex- the index of the active step.
-
getActiveStep
public Step getActiveStep()
Return the active step.Default: first step.
- Returns:
- the active step.
-
setActiveStep
public void setActiveStep(Step step)
Sets the active step.- Parameters:
step- the active step.
-
getOrient
public java.lang.String getOrient()
Returns the orient.Default: "horizontal".
- Since:
- 10.2.0
-
setOrient
public void setOrient(java.lang.String orient) throws org.zkoss.zk.ui.WrongValueExceptionSets the orient.Default : "horizontal"
- Parameters:
orient- either "horizontal" or "vertical".- Throws:
org.zkoss.zk.ui.WrongValueException- Since:
- 10.2.0
-
isVertical
public boolean isVertical()
Returns whether it is a vertical step bar.- Since:
- 10.2.0
-
getStepRenderer
public StepRenderer getStepRenderer()
-
setStepRenderer
public void setStepRenderer(StepRenderer stepRenderer)
-
getModel
public StepModel<?> getModel()
Returns the step model associated with this stepbar, or null if this stepbar is not associated with any step model.Default: null.
- Returns:
- the step model.
-
setModel
public void setModel(StepModel<?> model)
Sets the step model associated with this stepbar. If a non-null model is assigned, no matter whether it is the same as the previous, it will always cause re-render.- Parameters:
model- the stepbar model to associate, or null to dis-associate any previous model.- Throws:
org.zkoss.zk.ui.UiException- if failed to initialize with the model
-
onInitRender
public void onInitRender()
-
onPageAttached
public void onPageAttached(org.zkoss.zk.ui.Page newpage, org.zkoss.zk.ui.Page oldpage)- Specified by:
onPageAttachedin interfaceorg.zkoss.zk.ui.sys.ComponentCtrl- Overrides:
onPageAttachedin classorg.zkoss.zk.ui.AbstractComponent
-
onPageDetached
public void onPageDetached(org.zkoss.zk.ui.Page page)
- Specified by:
onPageDetachedin interfaceorg.zkoss.zk.ui.sys.ComponentCtrl- Overrides:
onPageDetachedin classorg.zkoss.zk.ui.AbstractComponent
-
next
public boolean next()
Activate next step if possible.- Returns:
- can activate to previous component or not.
-
back
public boolean back()
Activate previous step if possible.- Returns:
- can activate to step component or not.
-
getSteps
public java.util.List<Step> getSteps()
Returns the steps in this stepbar.It is the same as
AbstractComponent.getChildren().- Returns:
- list of steps
-
beforeChildAdded
public void beforeChildAdded(org.zkoss.zk.ui.Component child, org.zkoss.zk.ui.Component insertBefore)- Specified by:
beforeChildAddedin interfaceorg.zkoss.zk.ui.sys.ComponentCtrl- Overrides:
beforeChildAddedin classorg.zkoss.zk.ui.AbstractComponent
-
insertBefore
public boolean insertBefore(org.zkoss.zk.ui.Component newChild, org.zkoss.zk.ui.Component refChild)- Specified by:
insertBeforein interfaceorg.zkoss.zk.ui.Component- Overrides:
insertBeforein classorg.zkoss.zk.ui.AbstractComponent
-
removeChild
public boolean removeChild(org.zkoss.zk.ui.Component child)
- Specified by:
removeChildin interfaceorg.zkoss.zk.ui.Component- Overrides:
removeChildin classorg.zkoss.zk.ui.AbstractComponent
-
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
-
service
public void service(org.zkoss.zk.au.AuRequest request, boolean everError)- Specified by:
servicein interfaceorg.zkoss.zk.ui.sys.ComponentCtrl- Overrides:
servicein classorg.zkoss.zk.ui.HtmlBasedComponent
-
getZclass
public java.lang.String getZclass()
- Overrides:
getZclassin classorg.zkoss.zk.ui.HtmlBasedComponent
-
-