Class ActionWithProgress

    • Constructor Detail

      • ActionWithProgress

        public ActionWithProgress​(Component parent,
                                  String progressTitle,
                                  int total,
                                  boolean indeterminate)
        Constructor.
        Parameters:
        parent - the parent component.
        progressTitle - the initial title of the progress.
        total - the total count of work.
        indeterminate - if true, the dialog is indeterminate.
    • Method Detail

      • actionPerformed

        public void actionPerformed​(ActionEvent event)
      • backGroundWork

        public abstract void backGroundWork​(ProgressMonitor monitor)
                                     throws Exception
        Implements here the heavy work to be done.
        Parameters:
        monitor - the monitor that can be used to update the user.
        Throws:
        Exception
      • postWork

        public void postWork()
                      throws Exception
        This is run once the heavy work is done and the button of the action has been enabled again.
        Throws:
        Exception
      • addConnectedAction

        public void addConnectedAction​(AbstractAction action)
      • onError

        public void onError​(Exception e)
        Called if an error occurrs. Can be overridden. SHows dialog by default.
        Parameters:
        e - the exception thrown.