public final class ProgressHandleFactory extends Object
ProgressHandle
.Modifier and Type | Method and Description |
---|---|
static JLabel |
createDetailLabelComponent(ProgressHandle handle)
Get the detail messages component for use in custom dialogs, the task won't
show in the progress bar anymore.
|
static ProgressHandle |
createHandle(String displayName)
Deprecated.
|
static ProgressHandle |
createHandle(String displayName,
Action linkOutput)
|
static ProgressHandle |
createHandle(String displayName,
Cancellable allowToCancel)
|
static ProgressHandle |
createHandle(String displayName,
Cancellable allowToCancel,
Action linkOutput)
|
static JLabel |
createMainLabelComponent(ProgressHandle handle)
Get the task title component for use in custom dialogs, the task won't
show in the progress bar anymore.
|
static JComponent |
createProgressComponent(ProgressHandle handle)
Get the progress bar component for use in custom dialogs, the task won't
show in the progress bar anymore.
|
static ProgressHandle |
createSystemHandle(String displayName)
|
static ProgressHandle |
createSystemHandle(String displayName,
Cancellable allowToCancel)
|
static ProgressHandle |
createSystemHandle(String displayName,
Cancellable allowToCancel,
Action linkOutput)
|
static ProgressHandle |
createSystemUIHandle(String displayName,
Cancellable allowToCancel,
Action linkOutput)
Create a progress UI handle for a task that is not triggered by explicit user action.
|
static ProgressHandle |
createUIHandle(String displayName,
Cancellable allowToCancel,
Action linkOutput)
Create a progress UI handle for a long lasting task.
|
@Deprecated public static ProgressHandle createHandle(String displayName)
ProgressHandle.createHandle(java.lang.String)
displayName
- to be shown in the progress UIProgressHandle
, initialized but not started.@Deprecated public static ProgressHandle createHandle(String displayName, Cancellable allowToCancel)
allowToCancel
- either null, if the task cannot be cancelled or
an instance of Cancellable
that will be called when user
triggers cancel of the task.displayName
- to be shown in the progress UIProgressHandle
, initialized but not started.@Deprecated public static ProgressHandle createHandle(String displayName, Action linkOutput)
ProgressHandle.createHandle(java.lang.String, org.openide.util.Cancellable, javax.swing.Action)
1.59
, this method was
migrated to basic Progress API
.linkOutput
- an Action
instance that links the running task in the progress bar
to an output of the task. The action is assumed to open the apropriate component with the task's output.displayName
- to be shown in the progress UIProgressHandle
, initialized but not started.@Deprecated public static ProgressHandle createHandle(String displayName, Cancellable allowToCancel, Action linkOutput)
ProgressHandle.createHandle(java.lang.String, org.openide.util.Cancellable, javax.swing.Action)
1.59
, this method was
migrated to basic Progress API
. This implementation delegates to
ProgressHandle.createHandle(java.lang.String, org.openide.util.Cancellable, javax.swing.Action)
to enable smooth transition of older Progress API clients.allowToCancel
- either null, if the task cannot be cancelled or
an instance of Cancellable
that will be called when user
triggers cancel of the task.linkOutput
- an Action
instance that links the running task in the progress bar
to an output of the task. The action is assumed to open the appropriate component with the task's output.displayName
- to be shown in the progress UIProgressHandle
, initialized but not started.public static ProgressHandle createUIHandle(String displayName, Cancellable allowToCancel, Action linkOutput)
allowToCancel
- either null, if the task cannot be cancelled or
an instance of Cancellable
that will be called when user
triggers cancel of the task.linkOutput
- an Action
instance that links the running task in the progress bar
to an output of the task. The action is assumed to open the appropriate component with the task's output.displayName
- to be shown in the progress UIProgressHandle
, initialized but not started.public static JComponent createProgressComponent(ProgressHandle handle)
public static JLabel createMainLabelComponent(ProgressHandle handle)
ProgressHandle.setDisplayName()
methodpublic static JLabel createDetailLabelComponent(ProgressHandle handle)
ProgressHandle.progress(String)
method.@Deprecated public static ProgressHandle createSystemHandle(String displayName)
1.59
, the functionality moves to basic Progress API
; this method is retained for smooth transition of older API clients.displayName
- to be shown in the progress UIProgressHandle
, initialized but not started.@Deprecated public static ProgressHandle createSystemHandle(String displayName, Cancellable allowToCancel)
1.59
, the functionality moves to basic Progress API
; this method is retained
for smooth transition of older API clients.displayName
- to be shown in the progress UIallowToCancel
- either null, if the task cannot be cancelled or
an instance of Cancellable
that will be called when user
triggers cancel of the task.ProgressHandle
, initialized but not started.@Deprecated public static ProgressHandle createSystemHandle(String displayName, Cancellable allowToCancel, Action linkOutput)
ProgressHandle.createSystemHandle(java.lang.String, org.openide.util.Cancellable, javax.swing.Action)
1.59
, this method is fully superseded by ProgressHandle.createSystemHandle(java.lang.String, org.openide.util.Cancellable, javax.swing.Action)
.
Since 1.59
, the functionality moves to basic Progress API
; this method is retained for smooth transition of older API clients.allowToCancel
- either null, if the task cannot be cancelled or
an instance of Cancellable
that will be called when user
triggers cancel of the task.linkOutput
- an Action
instance that links the running task in the progress bar
to an output of the task. The action is assumed to open the apropriate component with the task's output.displayName
- to be shown in the progress UIProgressHandle
, initialized but not started.public static ProgressHandle createSystemUIHandle(String displayName, Cancellable allowToCancel, Action linkOutput)
allowToCancel
- either null, if the task cannot be cancelled or
an instance of Cancellable
that will be called when user
triggers cancel of the task.linkOutput
- an Action
instance that links the running task in the progress bar
to an output of the task. The action is assumed to open the apropriate component with the task's output.displayName
- to be shown in the progress UIProgressHandle
, initialized but not started.