jklustor-overlap-0.0.2-20140619012940 (ChemAxon)


com.chemaxon.calculations.common
Class ConsolePO

Object
  extended by com.chemaxon.calculations.common.ConsolePO
All Implemented Interfaces:
com.chemaxon.calculations.common.CancelObserver, com.chemaxon.calculations.common.ProgressObserver, com.chemaxon.calculations.common.SubProgressObserver

@Beta
public class ConsolePO
extends Object
implements com.chemaxon.calculations.common.SubProgressObserver

Stupid progressObserver to write to console.

Note that this implementation is incomplete, subtasks are not supported. Also API contracts are not enforced, thus a client code which works with this implementation might fail with a stricter implementation.

Please note that this class is marked with Beta annotation, so it can be subject of incompatible changes or removal in later releases.

Author:
Gabor Imre

Field Summary
 
Fields inherited from interface com.chemaxon.calculations.common.CancelObserver
FIRED_PROPERTY_NAME
 
Constructor Summary
ConsolePO(ConsolePO parent, PrintStream console, String name, long targetDelay)
          Construct a new instance.
ConsolePO(String name, long targetDelay)
          Construct a new instance.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
           
 void done()
           
 boolean isCancelled()
           
 void removePropertyChangeListener(PropertyChangeListener listener)
           
 com.chemaxon.calculations.common.SubProgressObserver subTask(String name, long work)
           
 void switchToDeterminate(long totalWork)
           
 String toString()
           
 void worked(long work)
           
 void worked(long work, boolean force)
          Report work unit completion.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConsolePO

public ConsolePO(String name,
                 long targetDelay)
Construct a new instance.

Parameters:
name - Name to display
targetDelay - Delay for console update

ConsolePO

ConsolePO(ConsolePO parent,
          PrintStream console,
          String name,
          long targetDelay)
Construct a new instance.

Parameters:
parent - Parent observer or null for top level
name - Name to display
targetDelay - Delay for console update
Method Detail

switchToDeterminate

public void switchToDeterminate(long totalWork)
Specified by:
switchToDeterminate in interface com.chemaxon.calculations.common.ProgressObserver

worked

public void worked(long work,
                   boolean force)
Report work unit completion.

Parameters:
work - Work units completed
force - If true then printout is forced regardless of underlying autothrottle status

worked

public void worked(long work)
Specified by:
worked in interface com.chemaxon.calculations.common.ProgressObserver

subTask

public com.chemaxon.calculations.common.SubProgressObserver subTask(String name,
                                                                    long work)
Specified by:
subTask in interface com.chemaxon.calculations.common.ProgressObserver

isCancelled

public boolean isCancelled()
Specified by:
isCancelled in interface com.chemaxon.calculations.common.CancelObserver

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Specified by:
addPropertyChangeListener in interface com.chemaxon.calculations.common.CancelObserver

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Specified by:
removePropertyChangeListener in interface com.chemaxon.calculations.common.CancelObserver

done

public void done()
Specified by:
done in interface com.chemaxon.calculations.common.SubProgressObserver

toString

public String toString()
Overrides:
toString in class Object

jklustor-overlap-0.0.2-20140619012940 (ChemAxon)