Package org.zkoss.zkmax.zul
Class DefaultStepModel<E>
java.lang.Object
org.zkoss.zkmax.zul.DefaultStepModel<E>
- All Implemented Interfaces:
StepModel<E>
A simple step data model that uses
Step to represent a stepbar.- Since:
- 9.0.0
- Author:
- jameschu
-
Constructor Summary
Constructors -
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 item) Sets the active step.intsize()Returns the length of the step list.
-
Constructor Details
-
DefaultStepModel
public DefaultStepModel() -
DefaultStepModel
-
-
Method Details
-
back
public boolean back()Description copied from interface:StepModelActivate previous step if possible. -
next
public boolean next()Description copied from interface:StepModelActivate next step if possible. -
getActiveIndex
public int getActiveIndex()Description copied from interface:StepModelReturn the index of the active step.Default: 0.
- Specified by:
getActiveIndexin interfaceStepModel<E>- Returns:
- the index of the active step.
-
getActiveStep
Description copied from interface:StepModelReturn the active step.Default: first step.
- Specified by:
getActiveStepin interfaceStepModel<E>- Returns:
- the active step.
-
setActiveIndex
public void setActiveIndex(int index) Description copied from interface:StepModelSets the index of the active step.- Specified by:
setActiveIndexin interfaceStepModel<E>- Parameters:
index- the index of the active step.
-
setActiveStep
Description copied from interface:StepModelSets the active step.- Specified by:
setActiveStepin interfaceStepModel<E>- Parameters:
item- the active step.
-
add
Description copied from interface:StepModelAdds a step at the end. -
add
Description copied from interface:StepModelAdds 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). -
remove
Description copied from interface:StepModelRemoves 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. -
remove
Description copied from interface:StepModelRemoves 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. -
getSteps
Description copied from interface:StepModelReturns the step list model. -
size
public int size()Description copied from interface:StepModelReturns the length of the step list.
-