Package org.geotools.gce.grassraster
Class DummyProgressListener
- Object
-
- DummyProgressListener
-
- All Implemented Interfaces:
ProgressListener
public class DummyProgressListener extends Object implements ProgressListener
A dummy progress listener.- Author:
- Andrea Antonello (www.hydrologis.com)
-
-
Constructor Summary
Constructors Constructor Description DummyProgressListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
complete()
Notifies this listener that the operation has finished.void
dispose()
Releases any resources used by this listener.void
exceptionOccurred(Throwable exception)
Reports an exception.String
getDescription()
float
getProgress()
Returns the current progress as a percent completed.InternationalString
getTask()
Returns the description of the current task being performed, ornull
if none.boolean
isCanceled()
Returnstrue
if this job is cancelled.void
progress(float percent)
Notifies this listener of progress in the lengthly operation.void
setCanceled(boolean cancel)
Indicates that task should be cancelled.void
setDescription(String description)
void
setTask(InternationalString task)
Sets the description of the current task being performed.void
started()
Notifies this listener that the operation begins.void
warningOccurred(String source, String location, String warning)
Reports a warning.
-
-
-
Method Detail
-
complete
public void complete()
Description copied from interface:ProgressListener
Notifies this listener that the operation has finished. The progress indicator will shows 100% or disappears, at implementor choice. If warning messages were pending, they will be displayed now.- Specified by:
complete
in interfaceProgressListener
-
dispose
public void dispose()
Description copied from interface:ProgressListener
Releases any resources used by this listener. If the progress were reported in a window, this window may be disposed.- Specified by:
dispose
in interfaceProgressListener
-
exceptionOccurred
public void exceptionOccurred(Throwable exception)
Description copied from interface:ProgressListener
Reports an exception. This method may prints the stack trace to the standard error stream or display it in a dialog box, at implementor choice.- Specified by:
exceptionOccurred
in interfaceProgressListener
- Parameters:
exception
- The exception to report.
-
getDescription
public String getDescription()
-
getProgress
public float getProgress()
Description copied from interface:ProgressListener
Returns the current progress as a percent completed.- Specified by:
getProgress
in interfaceProgressListener
- Returns:
- Percent completed between 0 and 100 inclusive.
-
getTask
public InternationalString getTask()
Description copied from interface:ProgressListener
Returns the description of the current task being performed, ornull
if none. It is assumed that if the task isnull
applications may simply report that the process is "in progress" or "working" as represented in the current locale.- Specified by:
getTask
in interfaceProgressListener
- Returns:
- Description of the task being performed, or
null
if none.
-
isCanceled
public boolean isCanceled()
Description copied from interface:ProgressListener
Returnstrue
if this job is cancelled.- Specified by:
isCanceled
in interfaceProgressListener
- Returns:
true
if this job is cancelled.
-
progress
public void progress(float percent)
Description copied from interface:ProgressListener
Notifies this listener of progress in the lengthly operation. Progress are reported as a value between 0 and 100 inclusive. Values out of bounds will be clamped.- Specified by:
progress
in interfaceProgressListener
- Parameters:
percent
- The progress as a value between 0 and 100 inclusive.
-
setCanceled
public void setCanceled(boolean cancel)
Description copied from interface:ProgressListener
Indicates that task should be cancelled.- Specified by:
setCanceled
in interfaceProgressListener
- Parameters:
cancel
-true
for cancelling the task.
-
setDescription
public void setDescription(String description)
-
setTask
public void setTask(InternationalString task)
Description copied from interface:ProgressListener
Sets the description of the current task being performed. This method is usually invoked before any progress begins. However, it is legal to invoke this method at any time during the operation, in which case the description display is updated without any change to the percentage accomplished.- Specified by:
setTask
in interfaceProgressListener
- Parameters:
task
- Description of the task being performed, ornull
if none.
-
started
public void started()
Description copied from interface:ProgressListener
Notifies this listener that the operation begins.- Specified by:
started
in interfaceProgressListener
-
warningOccurred
public void warningOccurred(String source, String location, String warning)
Description copied from interface:ProgressListener
Reports a warning. This warning may be logged, printed to the standard error stream, appears in a windows or be ignored, at implementor choice.- Specified by:
warningOccurred
in interfaceProgressListener
- Parameters:
source
- Name of the warning source, ornull
if none. This is typically the filename in process of being parsed or the URL of the data being processedlocation
- Text to write on the left side of the warning message, ornull
if none. This is typically the line number where the error occured in thesource
file or the feature ID of the feature that produced the messagewarning
- The warning message.
-
-