org.xnap.commons.io
Class NullProgressMonitor

java.lang.Object
  extended by org.xnap.commons.io.NullProgressMonitor
All Implemented Interfaces:
ProgressMonitor

public class NullProgressMonitor
extends Object
implements ProgressMonitor

Null pattern implementation of the ProgressMonitor interface.


Field Summary
static NullProgressMonitor MONITOR
          Static instance that can be used so no new null monitors have to be allocated.
 
Constructor Summary
NullProgressMonitor()
           
 
Method Summary
 Component getComponent()
          Returns null.
 boolean isCancelled()
          Returns false.
 void setCancelEnabled(boolean enabled)
          Does nothing.
 void setText(String text)
          Does nothing.
 void setTotalSteps(long max)
          Does nothing.
 void setValue(long value)
          Does nothing.
 void work(long amount)
          Does nothing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MONITOR

public static final NullProgressMonitor MONITOR
Static instance that can be used so no new null monitors have to be allocated.

Constructor Detail

NullProgressMonitor

public NullProgressMonitor()
Method Detail

isCancelled

public boolean isCancelled()
Returns false.

Specified by:
isCancelled in interface ProgressMonitor

setCancelEnabled

public void setCancelEnabled(boolean enabled)
Does nothing.

Specified by:
setCancelEnabled in interface ProgressMonitor

setTotalSteps

public void setTotalSteps(long max)
Does nothing.

Specified by:
setTotalSteps in interface ProgressMonitor

setValue

public void setValue(long value)
Does nothing.

Specified by:
setValue in interface ProgressMonitor
Parameters:
value - min <= value <= max

setText

public void setText(String text)
Does nothing.

Specified by:
setText in interface ProgressMonitor

work

public void work(long amount)
Does nothing.

Specified by:
work in interface ProgressMonitor

getComponent

public Component getComponent()
Returns null.

Specified by:
getComponent in interface ProgressMonitor
Returns:
null, if this monitor is not displayed by a component; the component, otherwise


Copyright © 2004-2007 XNap Commons Team. All Rights Reserved.