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:
Serializable,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.XulElement
A 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:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zk.ui.HtmlBasedComponent.ExtraCtrlNested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.AbstractComponent.Children, org.zkoss.zk.ui.AbstractComponent.ForwardInfo, org.zkoss.zk.ui.AbstractComponent.TargetInfo -
Field Summary
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
_zclassFields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPEFields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_CLONED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, AFTER_PARENT_CHANGED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanback()Activate previous step if possible.voidbeforeChildAdded(org.zkoss.zk.ui.Component child, org.zkoss.zk.ui.Component insertBefore) intReturn the index of the active step.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.Returns the orient.getSteps()Returns the steps in this stepbar.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.booleanReturns whether it is a vertical step bar.booleanReturns whether the labels in children steps is wrapped.booleannext()Activate next step if possible.voidvoidonPageAttached(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.voidSets the step model associated with this stepbar.voidSets 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, setTooltipAttributesMethods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
addSclass, evalCSSFlex, focus, getAction, getClientAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getSkeleton, 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, setSkeleton, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectlyMethods 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
-
Constructor Details
-
Stepbar
public Stepbar()
-
-
Method Details
-
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
Return the active step.Default: first step.
- Returns:
- the active step.
-
setActiveStep
Sets the active step.- Parameters:
step- the active step.
-
getOrient
Returns the orient.Default: "horizontal".
- Since:
- 10.2.0
-
setOrient
Sets 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
-
setStepRenderer
-
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
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
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
- Overrides:
renderPropertiesin classorg.zkoss.zul.impl.XulElement- Throws:
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
- Overrides:
getZclassin classorg.zkoss.zk.ui.HtmlBasedComponent
-