com.tensegrity.generic.util
Interface ProgressListener

All Known Implementing Classes:
ProgressBar

public interface ProgressListener

This listener can be used if the progress of a long time process should be observed. Such a process has a defined minimal and maximal value for his accomplishment.

Version:
$Id: ProgressListener.java,v 1.5 2003/09/03 17:51:47 MichaelKegel Exp $
Author:
SharokhKhani

Method Summary
 int getMaximum()
          Returns the used max value of the listener.
 int getMinimum()
          Returns the used minimal value of the listener.
 double getPercentage()
          Will be called from the running task, to retrieve the current progress state as a percentage value.
 int getProgress()
          Will be called from the running task, to retrieve the current progress state.
 void setMaximum(int max)
          Sets the max value used by the listener.
 void setMinimum(int min)
          Sets the minimal value used by the listener.
 void setPercentage(double value)
          Will be called from the running task, indicating that a new progress state (given as percentage value) has reached.
 void setProgress(int value)
          Will be called from the running task, indicating that a new progress state was reached.
 void setProgress(int progressValue, boolean absolut)
          Sets a new progress value discerning between the two modes Add or Set.
 

Method Detail

getMinimum

public int getMinimum()
Returns the used minimal value of the listener.

Returns:
the set minimal value.

getMaximum

public int getMaximum()
Returns the used max value of the listener.

Returns:
the set maximal value.

setMinimum

public void setMinimum(int min)
Sets the minimal value used by the listener.

Parameters:
min - the minimal value to be set.

setMaximum

public void setMaximum(int max)
Sets the max value used by the listener.

Parameters:
max - the maximal value to be set.

setProgress

public void setProgress(int progressValue,
                        boolean absolut)
Sets a new progress value discerning between the two modes Add or Set.

Parameters:
progressValue - the value to add to the currently set value or to set the current value to.
absolut - determines whether to add or to set the given value.

setProgress

public void setProgress(int value)
Will be called from the running task, indicating that a new progress state was reached.

Parameters:
value - the value to be set.

getProgress

public int getProgress()
Will be called from the running task, to retrieve the current progress state.

Returns:
the current progress state.

setPercentage

public void setPercentage(double value)
Will be called from the running task, indicating that a new progress state (given as percentage value) has reached.

Parameters:
value - the percentual value to be set.

getPercentage

public double getPercentage()
Will be called from the running task, to retrieve the current progress state as a percentage value.

Returns:
the current progress state as a percentual value.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.