org.netbeans.api.progress/1 1.12.1 1

org.netbeans.api.progress
Class ProgressHandleFactory

java.lang.Object
  extended by org.netbeans.api.progress.ProgressHandleFactory

public final class ProgressHandleFactory
extends Object

Factory to create various ProgressHandle instances that allow long lasting tasks to show their progress using various progress UIs.


Method Summary
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)
          Create a progress ui handle for a long lasting task.
static ProgressHandle createHandle(String displayName, Action linkOutput)
          Create a progress ui handle for a long lasting task.
static ProgressHandle createHandle(String displayName, Cancellable allowToCancel)
          Create a progress ui handle for a long lasting task.
static ProgressHandle createHandle(String displayName, Cancellable allowToCancel, Action linkOutput)
          Create a progress ui handle for a long lasting task.
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)
          Create a handle for a long lasting task that is not triggered by explicit user action.
static ProgressHandle createSystemHandle(String displayName, Cancellable allowToCancel)
          Create a cancelable handle for a task that is not triggered by explicit user action.
static ProgressHandle createSystemHandle(String displayName, Cancellable allowToCancel, Action linkOutput)
          Create a progress ui handle for a task that is not triggered by explicit user action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createHandle

public static ProgressHandle createHandle(String displayName)
Create a progress ui handle for a long lasting task.

Parameters:
displayName - to be shown in the progress UI
Returns:
an instance of ProgressHandle, initialized but not started.

createHandle

public static ProgressHandle createHandle(String displayName,
                                          Cancellable allowToCancel)
Create a progress ui handle for a long lasting task.

Parameters:
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 UI
Returns:
an instance of ProgressHandle, initialized but not started.

createHandle

public static ProgressHandle createHandle(String displayName,
                                          Action linkOutput)
Create a progress ui handle for a long lasting task.

Parameters:
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 UI
Returns:
an instance of ProgressHandle, initialized but not started.

createHandle

public static ProgressHandle createHandle(String displayName,
                                          Cancellable allowToCancel,
                                          Action linkOutput)
Create a progress ui handle for a long lasting task.

Parameters:
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 UI
Returns:
an instance of ProgressHandle, initialized but not started.

createProgressComponent

public 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.

Returns:
the component to use in custom UI.

createMainLabelComponent

public 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. The text of the label is changed by calls to ProgressHandle.setDisplayName() method

Returns:
the component to use in custom UI.
Since:
org.netbeans.api.progress 1.8

createDetailLabelComponent

public 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. The text of the label is changed by calls to ProgressHandle.progress(String) method.

Returns:
the component to use in custom UI.
Since:
org.netbeans.api.progress 1.8

createSystemHandle

public static ProgressHandle createSystemHandle(String displayName)
Create a handle for a long lasting task that is not triggered by explicit user action. Such tasks have lower priority in the UI.

Parameters:
displayName - to be shown in the progress UI
Returns:
an instance of ProgressHandle, initialized but not started.

createSystemHandle

public static ProgressHandle createSystemHandle(String displayName,
                                                Cancellable allowToCancel)
Create a cancelable handle for a task that is not triggered by explicit user action. Such tasks have lower priority in the UI.

Parameters:
displayName - to be shown in the progress UI
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.
Returns:
an instance of ProgressHandle, initialized but not started.

createSystemHandle

public static ProgressHandle createSystemHandle(String displayName,
                                                Cancellable allowToCancel,
                                                Action linkOutput)
Create a progress ui handle for a task that is not triggered by explicit user action.

Parameters:
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 UI
Returns:
an instance of ProgressHandle, initialized but not started.

org.netbeans.api.progress/1 1.12.1 1

Built on November 10 2008.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.