|
Cytoscape 2.8.0 API | |||||||||
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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JDialog |
---|
JDialog.AccessibleJDialog |
Nested classes/interfaces inherited from class java.awt.Dialog |
---|
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType |
Nested classes/interfaces inherited from class java.awt.Window |
---|
Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JDialog |
---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Dialog |
---|
DEFAULT_MODALITY_TYPE |
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 java.awt.Dialog |
---|
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setModalityType, setResizable, setTitle, setUndecorated, setVisible, show, toBack |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, 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.
|
Cytoscape 2.8.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |