de.fh_mannheim.mm.dms.utils
Class Progress

java.lang.Object
  extended byde.fh_mannheim.mm.dms.utils.Progress

public class Progress
extends java.lang.Object

Progress is a text only progressbar and can be used to extend gui progressbars.

Version:
$Revision: 1.2 $
Author:
Jan Löffler, mail@jlsoft.de

Constructor Summary
Progress()
          Constructor.
Progress(int nMax)
          Constructor.
 
Method Summary
 double getPercent()
          Get the current percentage.
 java.lang.String getPercentText()
          Get the current percentage as text.
 int getValue()
          Get the current value.
 int next()
          Increase the current value.
 void reset()
          Reset the current value.
 void setMaximum(int nMax)
          Set the maximum value.
 void setValue(int nPosition)
          Set the current value.
 int showMaximum()
          Increase the current value and show it as System.out.
 int showNext()
          Increase the current value and show it as System.out.
 int showValue(int nPosition)
          Set the current value and show it as System.out.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Progress

public Progress()
Constructor.


Progress

public Progress(int nMax)
Constructor.

Parameters:
nMax - Maximum value
Method Detail

getPercent

public double getPercent()
Get the current percentage.

Returns:
Current percentage

getPercentText

public java.lang.String getPercentText()
Get the current percentage as text.

Returns:
Current percentage as string

getValue

public int getValue()
Get the current value.

Returns:
Current value

next

public int next()
Increase the current value.

Returns:
Current position

reset

public void reset()
Reset the current value.


setMaximum

public void setMaximum(int nMax)
Set the maximum value.

Parameters:
nMax - Maximum value

setValue

public void setValue(int nPosition)
Set the current value.

Parameters:
nPosition - Current value

showMaximum

public int showMaximum()
Increase the current value and show it as System.out.

Returns:
Maximum position

showNext

public int showNext()
Increase the current value and show it as System.out.

Returns:
Current position

showValue

public int showValue(int nPosition)
Set the current value and show it as System.out.

Parameters:
nPosition - Current value