public class DefaultChecklistModel extends java.lang.Object implements ChecklistModel
Constructor and Description |
---|
DefaultChecklistModel()
Creates a DefaultChecklistModel.
|
Modifier and Type | Method and Description |
---|---|
void |
addChecklistModelListener(ChecklistModelListener l)
Add checklist model listener to this model.
|
void |
addStep(Step step)
Adds the specified step to the model.
|
void |
addStep(Step step,
int index)
Adds the specified step to the model at the index.
|
void |
addSubstep(Step parent,
Step child)
Adds a substep to the parent step.
|
void |
addSubstep(Step parent,
Step child,
int index)
Adds a substep to the parent step at the specified index.
|
protected void |
fireStepAdded(Step step,
int index)
Fire STEP_ADDED ChecklistModelEvent to all registered
ChecklistModelListeners.
|
protected void |
fireStepRemoved(Step step,
int index)
Fire STEP_REMOVED ChecklistModelEvent to all registered
ChecklistModelListeners.
|
ChecklistModelListener[] |
getChecklistModelListeners()
Returns the array of all registered ChecklistModelListeners.
|
Step |
getStepAt(int index)
Returns the Step at the specified index in the model.
|
int |
getStepCount()
Returns the total number of steps this checklist has.
|
int |
getStepIndex(Step step)
Returns the index of the step within this model.
|
Step |
getSubstepAt(Step step,
int index)
Returns the substep at the specified index of the parentStep.
|
int |
getSubstepCount(Step step)
Returns the substep count of the specified index of the parentStep.
|
int |
getSubstepIndex(Step parent,
Step child)
Returns the substep index within its parent.
|
void |
removeAllSteps()
Removes all the steps from the model.
|
void |
removeAllSubsteps(Step parent)
Removes all the substep from the specified parent.
|
void |
removeChecklistModelListener(ChecklistModelListener l)
Remove the checklist model listner from this model.
|
void |
removeStep(Step step)
Removes the specified step from the model.
|
void |
removeStepAt(int index)
Removes the step at the specified index from the model.
|
void |
removeSubstep(Step parent,
Step child)
Removes a substep from the parent step.
|
void |
removeSubstepAt(Step parent,
int index)
Removes a substep from the parent step at the specified index.
|
public DefaultChecklistModel()
public Step getStepAt(int index)
getStepAt
in interface ChecklistModel
public int getStepCount()
getStepCount
in interface ChecklistModel
public int getStepIndex(Step step)
getStepIndex
in interface ChecklistModel
public Step getSubstepAt(Step step, int index)
getSubstepAt
in interface ChecklistModel
public int getSubstepCount(Step step)
getSubstepCount
in interface ChecklistModel
public int getSubstepIndex(Step parent, Step child)
getSubstepIndex
in interface ChecklistModel
public void addStep(Step step)
public void addStep(Step step, int index)
public void removeStep(Step step)
public void removeStepAt(int index)
public void removeAllSteps()
public void addSubstep(Step parent, Step child)
public void addSubstep(Step parent, Step child, int index)
public void removeSubstep(Step parent, Step child)
public void removeSubstepAt(Step parent, int index)
public void removeAllSubsteps(Step parent)
public void addChecklistModelListener(ChecklistModelListener l)
addChecklistModelListener
in interface ChecklistModel
public void removeChecklistModelListener(ChecklistModelListener l)
removeChecklistModelListener
in interface ChecklistModel
public ChecklistModelListener[] getChecklistModelListeners()
protected void fireStepAdded(Step step, int index)
protected void fireStepRemoved(Step step, int index)