public class SwingTaskMonitorComponent extends Object
Task created via the
TaskService.
When the user clicks on the circular progress bar, a frame containing a table summarizing each task progression is displayed.
Each task is rendered in the table with a custom renderer (see
TaskRenderer). First column:
Second column:
Cancelable.cancel(String) for
the displayed task
Before cancellation, a user confirmation dialog can be enabled with
enableCancelConfirmation() or disabled with
disableCancelConfirmation().
| Constructor and Description |
|---|
SwingTaskMonitorComponent(Context context,
boolean estimateTimeLeft,
boolean confirmBeforeCancel,
int size,
boolean undecorated)
Constructs a Swing Task Monitor component - clickable circular progress bar
the component can be accessed with
getComponent(). |
| Modifier and Type | Method and Description |
|---|---|
void |
disableCancelConfirmation()
NO user confirmation required when canceling a task by clicking the task table.
|
void |
enableCancelConfirmation()
User confirmation required when canceling a task by clicking the task table.
|
JComponent |
getComponent()
Retrieves the global clickable progress bar that can be placed in the interface
|
public SwingTaskMonitorComponent(Context context, boolean estimateTimeLeft, boolean confirmBeforeCancel, int size, boolean undecorated)
getComponent().context - SciJava contextestimateTimeLeft - whether registered tasks should display an
estimated remaining timeconfirmBeforeCancel - flags whether a confirmation window should pop up
when canceling a task, can be overridden with
disableCancelConfirmation() and
enableCancelConfirmation()size - of the circular progress bar (preferred size)undecorated - defines whether taskFrame is undecorated or notpublic JComponent getComponent()
public void enableCancelConfirmation()
public void disableCancelConfirmation()
Copyright © 2010–2022 SciJava. All rights reserved.