org.javaseis.util
Class Pacifier

java.lang.Object
  extended by org.javaseis.util.Pacifier

public class Pacifier
extends java.lang.Object

Simple class to facilitate feedback to the user via a log file entry or by updating a variable used maintian the percent completed.


Constructor Summary
Pacifier(double percentIncrement_in, double maxTimeIncrement_in, PaciferCallback parent_in)
           
 
Method Summary
 void init(long numElements_in)
           
static void main(java.lang.String[] args)
           
 void update(long currentElement)
          Looks at the progress and only calls the statusMsg callback if the progress meets the specifications or the interval has been exceeded.
 void update(long currentElement, java.lang.String comment)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pacifier

public Pacifier(double percentIncrement_in,
                double maxTimeIncrement_in,
                PaciferCallback parent_in)
Parameters:
percentIncrement_in - amount of progress before the next update is created
maxTimeIncrement_in - max timeout to trigger an update if the increment hasn't been exceeded
parent_in - callback interface
Method Detail

init

public void init(long numElements_in)

main

public static void main(java.lang.String[] args)

update

public void update(long currentElement)
Looks at the progress and only calls the statusMsg callback if the progress meets the specifications or the interval has been exceeded. The callback for percentDone is called on every iteration. This usually sets a local variable in the containing class that then can by querried via the exec/ui periodically to display progress in the UI.


update

public void update(long currentElement,
                   java.lang.String comment)