ucot.ui
Interface ProgressBarInterface

All Known Implementing Classes:
DummyProgressBar, ProgressBarDialog

public interface ProgressBarInterface

Interface for a progress bar used in core component to indicate the status of parsing and running the heuristic.

This interface defines all methods required for UCOT core to show progress bars for different slow operations. It is up to the user interface itself to decide whether the showing of the progress bar should disable other functionality of user interface or not, but in either case the progress bar is always spawned from a separate thread in the UCOT core. This way the total jamming of the user interface during slow operations is avoided.

Author:
tujupien

Method Summary
 int getMaximum()
          Gets the maximum value for the progress bar.
 int getMinimum()
          Gets the minimum value for the progress bar.
 double getPercentageComplete()
          Gets the current percentage completed.
 java.lang.String getString()
          Gets the current action description.
 int getValue()
          Gets the current value of the progress bar.
 void setMaximum(int maximum)
          Sets the maximum value of the progress bar.
 void setMinimum(int minimum)
          Sets the minimum value of the progress bar.
 void setString(java.lang.String string)
          Sets the action description string.
 void setValue(int value)
          Sets the current value of the progress bar.
 void setVisible(boolean visible)
          Method for setting the progress bar (dialog) visible or hiding it.
 

Method Detail

getMaximum

int getMaximum()

Gets the maximum value for the progress bar.

Returns:
The maximum value for the progress bar.

getMinimum

int getMinimum()

Gets the minimum value for the progress bar.

Returns:
The minimum value for the progress bar.

getPercentageComplete

double getPercentageComplete()

Gets the current percentage completed. Which is getValue() / (getMaximum() - getMinimum()).

Returns:
Current percentage completed.

getString

java.lang.String getString()

Gets the current action description.

Returns:
Action description.

getValue

int getValue()

Gets the current value of the progress bar.

Returns:
Current value.

setMaximum

void setMaximum(int maximum)

Sets the maximum value of the progress bar.

Parameters:
maximum - Maximum value of the progress bar.

setMinimum

void setMinimum(int minimum)

Sets the minimum value of the progress bar.

Parameters:
minimum - Minimum value of the progress bar.

setString

void setString(java.lang.String string)

Sets the action description string.

Parameters:
string - Current action description.

setValue

void setValue(int value)

Sets the current value of the progress bar.

Parameters:
value - Current value.

setVisible

void setVisible(boolean visible)

Method for setting the progress bar (dialog) visible or hiding it.

Parameters:
visible - Indicates wether the progress bar is visible or invisible.