Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

oracle.javatools.ui.checklist
Class DefaultChecklistModel

java.lang.Object
  extended by oracle.javatools.ui.checklist.DefaultChecklistModel
All Implemented Interfaces:
ChecklistModel
Direct Known Subclasses:
XMLChecklistModel

public class DefaultChecklistModel
extends java.lang.Object
implements ChecklistModel

Default implementation of the ChecklistModel. It is recommended to add substeps to a step through addSubstep method from DefaultChecklistModel rather than adding directly to the Step. Whenever a Step or Substep is added ChecklistModelEvent will be fired to the registered ChecklistModelListener.


Constructor Summary
DefaultChecklistModel()
          Creates a DefaultChecklistModel.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultChecklistModel

public DefaultChecklistModel()
Creates a DefaultChecklistModel.

Method Detail

getStepAt

public Step getStepAt(int index)
Returns the Step at the specified index in the model.

Specified by:
getStepAt in interface ChecklistModel

getStepCount

public int getStepCount()
Returns the total number of steps this checklist has. This doesn't include the substeps within the steps.

Specified by:
getStepCount in interface ChecklistModel

getStepIndex

public int getStepIndex(Step step)
Returns the index of the step within this model.

Specified by:
getStepIndex in interface ChecklistModel

getSubstepAt

public Step getSubstepAt(Step step,
                         int index)
Returns the substep at the specified index of the parentStep.

Specified by:
getSubstepAt in interface ChecklistModel

getSubstepCount

public int getSubstepCount(Step step)
Returns the substep count of the specified index of the parentStep.

Specified by:
getSubstepCount in interface ChecklistModel

getSubstepIndex

public int getSubstepIndex(Step parent,
                           Step child)
Returns the substep index within its parent.

Specified by:
getSubstepIndex in interface ChecklistModel

addStep

public void addStep(Step step)
Adds the specified step to the model. This will fire STEP_ADDED ChecklistModelEvent.


addStep

public void addStep(Step step,
                    int index)
Adds the specified step to the model at the index. This will fire STEP_ADDED ChecklistModelEvent.


removeStep

public void removeStep(Step step)
Removes the specified step from the model. This will fire STEP_REMOVED ChecklistModelEvent.


removeStepAt

public void removeStepAt(int index)
Removes the step at the specified index from the model. This will fire STEP_REMOVED ChecklistModelEvent.


removeAllSteps

public void removeAllSteps()
Removes all the steps from the model. This will fire STEP_REMOVED ChecklistModelEvent for each of the removed steps.


addSubstep

public void addSubstep(Step parent,
                       Step child)
Adds a substep to the parent step. This will fire STEP_ADDED ChecklistModelEvent to all the reguistered ChecklistModelListener.


addSubstep

public void addSubstep(Step parent,
                       Step child,
                       int index)
Adds a substep to the parent step at the specified index. This will fire STEP_ADDED ChecklistModelEvent to all the reguistered ChecklistModelListener.


removeSubstep

public void removeSubstep(Step parent,
                          Step child)
Removes a substep from the parent step. This will fire STEP_REMOVED ChecklistModelEvent to all the reguistered ChecklistModelListener.


removeSubstepAt

public void removeSubstepAt(Step parent,
                            int index)
Removes a substep from the parent step at the specified index. This will fire STEP_REMOVED ChecklistModelEvent to all the reguistered ChecklistModelListener.


removeAllSubsteps

public void removeAllSubsteps(Step parent)
Removes all the substep from the specified parent. This will fire STEP_REMOVED ChecklistModelEvent for each of the removed steps to all the registered ChecklistModelListener.


addChecklistModelListener

public void addChecklistModelListener(ChecklistModelListener l)
Add checklist model listener to this model.

Specified by:
addChecklistModelListener in interface ChecklistModel

removeChecklistModelListener

public void removeChecklistModelListener(ChecklistModelListener l)
Remove the checklist model listner from this model.

Specified by:
removeChecklistModelListener in interface ChecklistModel

getChecklistModelListeners

public ChecklistModelListener[] getChecklistModelListeners()
Returns the array of all registered ChecklistModelListeners.


fireStepAdded

protected void fireStepAdded(Step step,
                             int index)
Fire STEP_ADDED ChecklistModelEvent to all registered ChecklistModelListeners.


fireStepRemoved

protected void fireStepRemoved(Step step,
                               int index)
Fire STEP_REMOVED ChecklistModelEvent to all registered ChecklistModelListeners.


Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

Copyright © 1997, 2011, Oracle. All rights reserved.