public interface TaskMonitor
Task
s to modify its user interface.Module: work-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>work-api</artifactId> </dependency>
Modifier and Type | Interface and Description |
---|---|
static class |
TaskMonitor.Level
Used by the
showMessage method to indicate the severity of the message. |
Modifier and Type | Method and Description |
---|---|
void |
setProgress(double progress)
Sets the progress completed by the
Task . |
void |
setStatusMessage(String statusMessage)
Sets the status message that describes what a
Task is currently doing. |
void |
setTitle(String title)
Sets the title of the
Task . |
void |
showMessage(TaskMonitor.Level level,
String message)
Shows a message to the user.
|
void setTitle(String title)
Task
.
The title is a succinct description of the Task
's
purpose. This method should only be called once and at the beginning
of the run
method.title
- Succinct description of the Task's purpose.void setProgress(double progress)
Task
.progress
- A value between 0.0
and 1.0
. Any negative value
sets the progress bar to an indefinite state.void setStatusMessage(String statusMessage)
Task
is currently doing.
This method can be called throughout the course of the run
method.statusMessage
- String that describe what a Task is currently doing.void showMessage(TaskMonitor.Level level, String message)
run
method.
This method should not be used for debugging purposes.
Either use System.out.println
or a logger to issue
debug messages.Copyright 2011 Cytoscape Consortium. All rights reserved.