Class 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.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:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent

        org.zkoss.zk.ui.HtmlBasedComponent.ExtraCtrl
      • Nested 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

        _zclass
      • Fields inherited from interface org.zkoss.zk.ui.Component

        APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
      • Fields 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 
      Constructor Description
      Stepbar()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean back()
      Activate previous step if possible.
      void beforeChildAdded​(org.zkoss.zk.ui.Component child, org.zkoss.zk.ui.Component insertBefore)  
      int getActiveIndex()
      Return the index of the active step.
      Step getActiveStep()
      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.String getOrient()
      Returns the orient.
      StepRenderer getStepRenderer()  
      java.util.List<Step> getSteps()
      Returns the steps in this stepbar.
      java.lang.String getZclass()  
      boolean insertBefore​(org.zkoss.zk.ui.Component newChild, org.zkoss.zk.ui.Component refChild)  
      boolean isLinear()
      Returns whether the steps in this stepbar are displayed by order.
      boolean isVertical()
      Returns whether it is a vertical step bar.
      boolean isWrappedLabels()
      Returns whether the labels in children steps is wrapped.
      boolean next()
      Activate next step if possible.
      void onInitRender()  
      void onPageAttached​(org.zkoss.zk.ui.Page newpage, org.zkoss.zk.ui.Page oldpage)  
      void onPageDetached​(org.zkoss.zk.ui.Page page)  
      boolean removeChild​(org.zkoss.zk.ui.Component child)  
      protected void renderProperties​(org.zkoss.zk.ui.sys.ContentRenderer renderer)  
      void service​(org.zkoss.zk.au.AuRequest request, boolean everError)  
      void setActiveIndex​(int activeIndex)
      Sets the index of the active step.
      void setActiveStep​(Step step)
      Sets the active step.
      void setLinear​(boolean linear)
      Sets whether the steps in this stepbar are displayed by order.
      void setModel​(StepModel<?> model)
      Sets the step model associated with this stepbar.
      void setOrient​(java.lang.String orient)
      Sets the orient.
      void setStepRenderer​(StepRenderer stepRenderer)  
      void setWrappedLabels​(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
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Stepbar

        public Stepbar()
    • 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.WrongValueException
        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
      • 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:
        onPageAttached in interface org.zkoss.zk.ui.sys.ComponentCtrl
        Overrides:
        onPageAttached in class org.zkoss.zk.ui.AbstractComponent
      • onPageDetached

        public void onPageDetached​(org.zkoss.zk.ui.Page page)
        Specified by:
        onPageDetached in interface org.zkoss.zk.ui.sys.ComponentCtrl
        Overrides:
        onPageDetached in class org.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:
        beforeChildAdded in interface org.zkoss.zk.ui.sys.ComponentCtrl
        Overrides:
        beforeChildAdded in class org.zkoss.zk.ui.AbstractComponent
      • insertBefore

        public boolean insertBefore​(org.zkoss.zk.ui.Component newChild,
                                    org.zkoss.zk.ui.Component refChild)
        Specified by:
        insertBefore in interface org.zkoss.zk.ui.Component
        Overrides:
        insertBefore in class org.zkoss.zk.ui.AbstractComponent
      • removeChild

        public boolean removeChild​(org.zkoss.zk.ui.Component child)
        Specified by:
        removeChild in interface org.zkoss.zk.ui.Component
        Overrides:
        removeChild in class org.zkoss.zk.ui.AbstractComponent
      • renderProperties

        protected void renderProperties​(org.zkoss.zk.ui.sys.ContentRenderer renderer)
                                 throws java.io.IOException
        Overrides:
        renderProperties in class org.zkoss.zul.impl.XulElement
        Throws:
        java.io.IOException
      • service

        public void service​(org.zkoss.zk.au.AuRequest request,
                            boolean everError)
        Specified by:
        service in interface org.zkoss.zk.ui.sys.ComponentCtrl
        Overrides:
        service in class org.zkoss.zk.ui.HtmlBasedComponent
      • getZclass

        public java.lang.String getZclass()
        Overrides:
        getZclass in class org.zkoss.zk.ui.HtmlBasedComponent