chemaxon.alchemist.utils
Class AlchemistProgressMonitor

java.lang.Object
  extended by chemaxon.alchemist.utils.AlchemistProgressMonitor
All Implemented Interfaces:
chemaxon.marvin.modelling.util.ProgressMonitor

public class AlchemistProgressMonitor
extends java.lang.Object
implements chemaxon.marvin.modelling.util.ProgressMonitor


Constructor Summary
AlchemistProgressMonitor()
           
AlchemistProgressMonitor(long taskLength)
           
 
Method Summary
 void close()
          Close by setting maximal value
 java.lang.String getMessage()
          Returns a message (or null) about progress
 int getProgressPercent()
          This method returns the progress percent based on taskLength and taskValue
 long getTaskLength()
          Returns the length of task
 long getTaskValue()
          Returns the current value of task
 void init(int maxValue)
          Initiate ProgressMonitor Reinit must be handled.
 boolean isCanceled()
           
 boolean isDone()
           
 void reset()
          This method sets the progress monitor to a default state by setting value to 0 and done and canceled to false NOTE: length remains unchanged
 void set(int value)
          Set actual value
 void setCanceled(boolean canceled)
           
 void setDone(boolean done)
           
 void setMessage(java.lang.String message)
          Sets a progres message can be used to display informations about the progress
 void setTaskLength(long taskLength)
          Sets the length of task
 void setTaskValue(long taskValue)
          Sets the value of task
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlchemistProgressMonitor

public AlchemistProgressMonitor()

AlchemistProgressMonitor

public AlchemistProgressMonitor(long taskLength)
Method Detail

getTaskLength

public long getTaskLength()
Returns the length of task

Returns:
the length of task

setTaskLength

public void setTaskLength(long taskLength)
Sets the length of task

Parameters:
taskLength - is the length of task

getTaskValue

public long getTaskValue()
Returns the current value of task

Returns:
the current value of task

setTaskValue

public void setTaskValue(long taskValue)
Sets the value of task

Parameters:
taskValue - is the value of task

isCanceled

public boolean isCanceled()

setCanceled

public void setCanceled(boolean canceled)

isDone

public boolean isDone()

setDone

public void setDone(boolean done)

reset

public void reset()
This method sets the progress monitor to a default state by setting value to 0 and done and canceled to false NOTE: length remains unchanged


getProgressPercent

public int getProgressPercent()
This method returns the progress percent based on taskLength and taskValue

Returns:
percent of progress done

setMessage

public void setMessage(java.lang.String message)
Sets a progres message can be used to display informations about the progress

Parameters:
message - is the message

getMessage

public java.lang.String getMessage()
Returns a message (or null) about progress

Returns:
a message or null

close

public void close()
Description copied from interface: chemaxon.marvin.modelling.util.ProgressMonitor
Close by setting maximal value

Specified by:
close in interface chemaxon.marvin.modelling.util.ProgressMonitor

init

public void init(int maxValue)
Description copied from interface: chemaxon.marvin.modelling.util.ProgressMonitor
Initiate ProgressMonitor Reinit must be handled. After reinit a new process starts and ProgressMonitor must handle it.

Specified by:
init in interface chemaxon.marvin.modelling.util.ProgressMonitor
Parameters:
maxValue - value for 100%

set

public void set(int value)
Description copied from interface: chemaxon.marvin.modelling.util.ProgressMonitor
Set actual value

Specified by:
set in interface chemaxon.marvin.modelling.util.ProgressMonitor