Overview | Package | Class | Tree | Deprecated | Index | Help
| Protégé-OWL 3.4 rc2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.stanford.smi.protegex.owl.model
Interface ProgressManager

    public interface ProgressManager

An interface for objects that can manage the status and cancellation of a longish operation on an OWLModel. The use contract of this is

1. run()
2. ( set...() | isCancelled() )*
3. end()

A typical implementation of this interface would display a status dialog with a status text, perhaps an icon, and perhaps a status bar showing progress from left to right.

Author:
  Holger Knublauch

Method Summary
`void` | `begin(String title, boolean canBeCancelled)` Notifies the manager that a new modal process is about to start.
`void` | `end()` Notifies the manager that the recently started process has ended.
`boolean` | `isCancelled()` Checks if the user has cancelled the current process.
`void` | `setIcon(Class iconBaseClass, String iconName)` Specifies an (optional) icon that can be displayed alongside with the status text.
`void` | `setProgress(double progress)` Sets an (optional) value for progress bars.
`void` | `setText(String text)` Changes the status text that is being displayed.

Method Detail

### begin

    void begin(String title,
               boolean canBeCancelled)

  Notifies the manager that a new modal process is about to start. Calling this method is only valid if no other process is currently managed by this instance.

  Parameters:
    `title` - an (optional) title that could be displayed in a dialog etc.

### end

    void end()

  Notifies the manager that the recently started process has ended. This method must always be called after a process was terminated so that the manager can close windows, etc.

### isCancelled

    boolean isCancelled()

  Checks if the user has cancelled the current process. The process can call this method occasionally to interrupt itself, and then invoke `endProcess()`
  Returns:
    true if the user wants to cancel

### setProgress

    void setProgress(double progress)

  Sets an (optional) value for progress bars. The caller typically makes sure that the values increase continuously from 0 to 1

  Parameters:
    `progress` - the progress value between 0 and 1

### setIcon

    void setIcon(Class iconBaseClass,
                 String iconName)

  Specifies an (optional) icon that can be displayed alongside with the status text.

  Parameters:
    `iconBaseClass` - the Class that the icon is relative to
    `iconName` - the file name relative to the base class

### setText

    void setText(String text)

  Changes the status text that is being displayed.

  Parameters:
    `text` - the new text

Overview | Package | Class | Tree | Deprecated | Index | Help
| Protégé-OWL 3.4 rc2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug report or feature request
Copyright (c) 1998-2009 Stanford University.