Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.5)

E22562-01

oracle.apps.fnd.applcore.flex.runtime.event
Class ModelerProgressEvent.ProgressTracker

java.lang.Object
  extended by oracle.apps.fnd.applcore.flex.runtime.event.ModelerProgressEvent.ProgressTracker
Enclosing class:
ModelerProgressEvent

public static class ModelerProgressEvent.ProgressTracker
extends java.lang.Object

A progress tracker.


Constructor Summary
ModelerProgressEvent.ProgressTracker()
          Creates a progress tracker with one stage.
ModelerProgressEvent.ProgressTracker(ModelerProgressEvent.Stage[] stages)
          Creates a progress tracker.
 
Method Summary
 float catchUp(ModelerProgressEvent.Stage stage)
          Updates this tracker by setting a stage as completed.
 float complete()
          Sets the progress as completed.
 float getProgress()
          Gets the current progress.
 java.lang.String toString()
           
 float update(ModelerProgressEvent event)
          Updates this tracker with the latest progress.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModelerProgressEvent.ProgressTracker

public ModelerProgressEvent.ProgressTracker(ModelerProgressEvent.Stage[] stages)
Creates a progress tracker. The sum of the weights of all stages must be 1.0f; otherwise the progress tracking will not be accurate. This class holds the reference to the given array without making a local copy. Changing the array elements later may lead to unexpected result.

Parameters:
stages - stages to keep track of
Throws:
java.lang.IllegalArgumentException - if the given list is null or empty

ModelerProgressEvent.ProgressTracker

public ModelerProgressEvent.ProgressTracker()
Creates a progress tracker with one stage.

See Also:
ModelerProgressEvent.SINGLE_STAGE
Method Detail

update

public float update(ModelerProgressEvent event)
Updates this tracker with the latest progress.

Parameters:
event - the latest progress update
Returns:
the total progress value
Throws:
java.lang.NullPointerException - if the given map or event is null
java.lang.IllegalArgumentException - if the given stage is not tracked by this object

catchUp

public float catchUp(ModelerProgressEvent.Stage stage)
Updates this tracker by setting a stage as completed.

Parameters:
stage - the stage that is completed
Returns:
the total progress value
Throws:
java.lang.NullPointerException - if the given map or stage is null
java.lang.IllegalArgumentException - if the given stage is not tracked by this object

complete

public float complete()
Sets the progress as completed.

Returns:
1

getProgress

public float getProgress()
Gets the current progress.

Returns:
the current progress

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.5)

E22562-01

Copyright © 2011 Oracle. All Rights Reserved.