Interface StepModel<E>

  • All Known Implementing Classes:
    DefaultStepModel

    public interface StepModel<E>
    This interface defines the methods for stepbar and use to do sequential navigation.
    Since:
    9.0.0
    Author:
    jameschu
    See Also:
    Stepbar, StepRenderer
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void add​(int index, E step)
      Adds a step at the end.
      void add​(E step)
      Adds a step at the end.
      boolean back()
      Activate previous step if possible.
      int getActiveIndex()
      Return the index of the active step.
      E getActiveStep()
      Return the active step.
      ListModel<E> getSteps()
      Returns the step list model.
      boolean next()
      Activate next step if possible.
      E remove​(int index)
      Removes the step at the specified position in this list (optional operation).
      boolean remove​(E item)
      Removes the first occurrence of the specified step from this list, if it is present (optional operation).
      void setActiveIndex​(int index)
      Sets the index of the active step.
      void setActiveStep​(E step)
      Sets the active step.
      int size()
      Returns the length of the step list.
    • Method Detail

      • back

        boolean back()
        Activate previous step if possible.
        Returns:
        can activate to step component or not.
      • next

        boolean next()
        Activate next step if possible.
        Returns:
        can activate to previous component or not.
      • setActiveIndex

        void setActiveIndex​(int index)
        Sets the index of the active step.
        Parameters:
        index - the index of the active step.
      • setActiveStep

        void setActiveStep​(E step)
        Sets the active step.
        Parameters:
        step - the active step.
      • add

        void add​(E step)
        Adds a step at the end.
        Parameters:
        step -
      • add

        void add​(int index,
                 E step)
        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).
        Parameters:
        index -
        step -
      • remove

        E remove​(int index)
        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.
        Returns:
        step
      • remove

        boolean remove​(E item)
        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.
        Returns:
        remove result
      • getActiveIndex

        int getActiveIndex()
        Return the index of the active step.

        Default: 0.

        Returns:
        the index of the active step.
      • getActiveStep

        E getActiveStep()
        Return the active step.

        Default: first step.

        Returns:
        the active step.
      • getSteps

        ListModel<E> getSteps()
        Returns the step list model.
        Returns:
        steps
      • size

        int size()
        Returns the length of the step list.
        Returns:
        steps