public interface ProgressStepperModel
Model interface for the progress stepper component.
The step data in the model is immutable after instantiation. Only the current step index can be changed programmatically. Step states are derived from the current step index:
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
addListener(ProgressStepperModelListener listener)Adds a listener to be notified when the current step changes. |
|
public void |
addListeners(java.util.List<ProgressStepperModelListener> listeners)Adds multiple listeners to be notified when the current step changes. |
|
public int |
getCurrentStepIndex()Returns the current step index. |
|
public java.util.List<ProgressStepperModelListener> |
getListeners()Returns a copy of all registered listeners. |
|
public Step |
getStep(int index)Returns the step at the given index. |
|
public int |
getStepCount()Returns the total number of steps. |
|
public StepState |
getStepState(int index)Returns the state of the step at the given index, derived from the current step index. |
|
public void |
nextStep()Advances to the next step if not already at the last step. |
|
public void |
previousStep()Returns to the previous step if not already at the first step. |
|
public void |
removeAllListeners()Removes all registered listeners. |
|
public void |
removeListener(ProgressStepperModelListener listener)Removes a previously added listener. |
|
public void |
setCurrentStepIndex(int index)Sets the current step index. |
Adds a listener to be notified when the current step changes.
listener - the listener to addAdds multiple listeners to be notified when the current step changes.
listeners - the listeners to addReturns the current step index.
Returns a copy of all registered listeners.
This is useful when transferring listeners from one model to another, such as when replacing the model in a component.
Returns the step at the given index.
index - the zero-based step indexReturns the total number of steps.
Returns the state of the step at the given index, derived from the current step index.
index - the zero-based step indexAdvances to the next step if not already at the last step.
Returns to the previous step if not already at the first step.
Removes all registered listeners.
Removes a previously added listener.
listener - the listener to removeSets the current step index.
index - the zero-based index to set as current