Class DefaultStepModel<E>

java.lang.Object
org.zkoss.zkmax.zul.DefaultStepModel<E>
All Implemented Interfaces:
StepModel<E>

public class DefaultStepModel<E> extends Object implements StepModel<E>
A simple step data model that uses Step to represent a stepbar.
Since:
9.0.0
Author:
jameschu
  • Constructor Details

    • DefaultStepModel

      public DefaultStepModel()
    • DefaultStepModel

      public DefaultStepModel(ListModelList<E> steps)
  • Method Details

    • back

      public boolean back()
      Description copied from interface: StepModel
      Activate previous step if possible.
      Specified by:
      back in interface StepModel<E>
      Returns:
      can activate to step component or not.
    • next

      public boolean next()
      Description copied from interface: StepModel
      Activate next step if possible.
      Specified by:
      next in interface StepModel<E>
      Returns:
      can activate to previous component or not.
    • getActiveIndex

      public int getActiveIndex()
      Description copied from interface: StepModel
      Return the index of the active step.

      Default: 0.

      Specified by:
      getActiveIndex in interface StepModel<E>
      Returns:
      the index of the active step.
    • getActiveStep

      public E getActiveStep()
      Description copied from interface: StepModel
      Return the active step.

      Default: first step.

      Specified by:
      getActiveStep in interface StepModel<E>
      Returns:
      the active step.
    • setActiveIndex

      public void setActiveIndex(int index)
      Description copied from interface: StepModel
      Sets the index of the active step.
      Specified by:
      setActiveIndex in interface StepModel<E>
      Parameters:
      index - the index of the active step.
    • setActiveStep

      public void setActiveStep(E item)
      Description copied from interface: StepModel
      Sets the active step.
      Specified by:
      setActiveStep in interface StepModel<E>
      Parameters:
      item - the active step.
    • add

      public void add(E item)
      Description copied from interface: StepModel
      Adds a step at the end.
      Specified by:
      add in interface StepModel<E>
    • add

      public void add(int index, E item)
      Description copied from interface: StepModel
      Adds a step at the end. Inserts the specified element at the specified position in this list. Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).
      Specified by:
      add in interface StepModel<E>
    • remove

      public E remove(int index)
      Description copied from interface: StepModel
      Removes the step at the specified position in this list (optional operation). Shifts any subsequent elements to the left (subtracts one from their indices). Returns the step that was removed from the list.
      Specified by:
      remove in interface StepModel<E>
      Returns:
      step
    • remove

      public boolean remove(E item)
      Description copied from interface: StepModel
      Removes the first occurrence of the specified step from this list, if it is present (optional operation). If this list does not contain the step, it is unchanged.
      Specified by:
      remove in interface StepModel<E>
      Returns:
      remove result
    • getSteps

      public ListModel<E> getSteps()
      Description copied from interface: StepModel
      Returns the step list model.
      Specified by:
      getSteps in interface StepModel<E>
      Returns:
      steps
    • size

      public int size()
      Description copied from interface: StepModel
      Returns the length of the step list.
      Specified by:
      size in interface StepModel<E>
      Returns:
      steps