Package de.sciss.gui
Interface ProgressComponent
-
public interface ProgressComponentAn interface for classes that are capable of displaying progression information to the user
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddCancelListener(java.awt.event.ActionListener l)voiddisplayError(java.lang.Exception e, java.lang.String processName)Asks the component to display an error dialog.voidfinishProgression(int result)Asks the component to indicate that the progression is finished.java.awt.ComponentgetComponent()Gets the component responsible for displaying progression, such as a ProgressBar.voidremoveCancelListener(java.awt.event.ActionListener l)voidresetProgression()Asks the component to reset progression to zero at the beginning of a process.voidsetProgression(float p)Asks the component to update progression amount to the given value.voidsetProgressionText(java.lang.String text)Asks the component to display a custom string describing the current process stagevoidshowMessage(int type, java.lang.String text)Asks the component to display a message related to the process.
-
-
-
Field Detail
-
DONE
static final int DONE
- See Also:
- Constant Field Values
-
FAILED
static final int FAILED
- See Also:
- Constant Field Values
-
CANCELLED
static final int CANCELLED
- See Also:
- Constant Field Values
-
-
Method Detail
-
getComponent
java.awt.Component getComponent()
Gets the component responsible for displaying progression, such as a ProgressBar.
-
resetProgression
void resetProgression()
Asks the component to reset progression to zero at the beginning of a process.
-
setProgression
void setProgression(float p)
Asks the component to update progression amount to the given value.- Parameters:
p- the new progression amount between 0 and 1
-
finishProgression
void finishProgression(int result)
Asks the component to indicate that the progression is finished.
-
setProgressionText
void setProgressionText(java.lang.String text)
Asks the component to display a custom string describing the current process stage- Parameters:
text- text to display in the progression component
-
showMessage
void showMessage(int type, java.lang.String text)Asks the component to display a message related to the process.- Parameters:
type- what type of message it is. Values are those from JOptionPane : INFORMATION_MESSAGE, WARNING_MESSAGE PLAIN_MESSAGE or ERROR_MESSAGEtext- the message text to output
-
displayError
void displayError(java.lang.Exception e, java.lang.String processName)Asks the component to display an error dialog.- Parameters:
e- anExceptiondescribing the error which occuredprocessName- the name of the process in which the error occured. this is usually used as a dialog's title string
-
addCancelListener
void addCancelListener(java.awt.event.ActionListener l)
-
removeCancelListener
void removeCancelListener(java.awt.event.ActionListener l)
-
-