|
Cytoscape 2.6.2 (c) 2006,2007 ISB, MSKCC, UCSD | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container java.awt.Window java.awt.Dialog javax.swing.JDialog cytoscape.task.ui.JTask
public class JTask
Common UI element for visually monitoring task progress.
Field Summary |
---|
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.WindowConstants |
---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
JTask(Task task,
JTaskConfig config)
Constructor. |
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent e)
Capture All Action Events. |
boolean |
errorOccurred()
Returns true if Task Has Encountered An Error. |
boolean |
haltRequested()
Returns true if User Has Requested to Halt the Task. |
void |
setCancel(boolean enable)
Call to externally control whether the cancel button is enabled or disabled. |
void |
setDone()
Indicates that the worker task is done processing. |
void |
setEstimatedTimeRemaining(long time)
Sets Estimated Time Remaining. |
void |
setException(Throwable t,
String userErrorMessage)
Reports an Error in Task Processing. |
void |
setException(Throwable t,
String userErrorMessage,
String recoveryTip)
Indicates to a parent application that a task has encountered an error while processing. |
void |
setPercentCompleted(int percent)
Sets Percentage Complete. |
void |
setStatus(String message)
Sets the Status Message. |
Methods inherited from class javax.swing.JDialog |
---|
getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, update |
Methods inherited from class java.awt.Dialog |
---|
addNotify, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JTask(Task task, JTaskConfig config)
task
- Task we are monitoring, and may need to cancel.config
- JTaskConfig Object.Method Detail |
---|
public void setPercentCompleted(int percent)
setPercentCompleted
in interface TaskMonitor
percent
- Percentage Complete.public void setEstimatedTimeRemaining(long time)
setEstimatedTimeRemaining
in interface TaskMonitor
time
- Time Remaining, in milliseconds.public void setException(Throwable t, String userErrorMessage)
setException
in interface TaskMonitor
t
- Throwable t.userErrorMessage
- Human Readable Error Message.public void setException(Throwable t, String userErrorMessage, String recoveryTip) throws IllegalThreadStateException
TaskMonitor
This method provides a convenient mechanism for reporting errors back to the end-user.
This method is used to report non-recoverable fatal errors, and must be called at the very end of a run() method (for example, in a catch block).
setException
in interface TaskMonitor
t
- an exception that occurred while processing of
the task.userErrorMessage
- a user-presentable error message describing the
nature of the exception; may be
null
.recoveryTip
- a use-presentable tip on how to recover from the error.
IllegalThreadStateException
- TaskMonitor
can only
be be called from the thread that
invokes the task run()
.public void setDone()
public void setCancel(boolean enable)
enable
- if true, enable the cancel buttonpublic void setStatus(String message)
setStatus
in interface TaskMonitor
message
- status message.public boolean errorOccurred()
public boolean haltRequested()
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
e
- Timer Event.
|
www.cytoscape.org | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |