Package de.sciss.gui

Interface ProgressComponent


  • public interface ProgressComponent
    An interface for classes that are capable of displaying progression information to the user
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int CANCELLED  
      static int DONE  
      static int FAILED  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addCancelListener​(java.awt.event.ActionListener l)  
      void displayError​(java.lang.Exception e, java.lang.String processName)
      Asks the component to display an error dialog.
      void finishProgression​(int result)
      Asks the component to indicate that the progression is finished.
      java.awt.Component getComponent()
      Gets the component responsible for displaying progression, such as a ProgressBar.
      void removeCancelListener​(java.awt.event.ActionListener l)  
      void resetProgression()
      Asks the component to reset progression to zero at the beginning of a process.
      void setProgression​(float p)
      Asks the component to update progression amount to the given value.
      void setProgressionText​(java.lang.String text)
      Asks the component to display a custom string describing the current process stage
      void showMessage​(int type, java.lang.String text)
      Asks the component to display a message related to the process.
    • 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_MESSAGE
        text - 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 - an Exception describing the error which occured
        processName - 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)