Package org.zkoss.zkmax.zul
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:
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a step at the end.voidAdds a step at the end.booleanback()Activate previous step if possible.intReturn the index of the active step.Return the active step.org.zkoss.zul.ListModel<E>getSteps()Returns the step list model.booleannext()Activate next step if possible.remove(int index) Removes the step at the specified position in this list (optional operation).booleanRemoves the first occurrence of the specified step from this list, if it is present (optional operation).voidsetActiveIndex(int index) Sets the index of the active step.voidsetActiveStep(E step) Sets the active step.intsize()Returns the length of the step list.
-
Method Details
-
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
Sets the active step.- Parameters:
step- the active step.
-
add
Adds a step at the end.- Parameters:
step-
-
add
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
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
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
org.zkoss.zul.ListModel<E> getSteps()Returns the step list model.- Returns:
- steps
-
size
int size()Returns the length of the step list.- Returns:
- steps
-