/// <summary>At the end of a task, shut down the progress monitor</summary>
        private void StopProgressMonitor()
        {
            timer.Stop();

            /*if(progressMonitor!=null) {
             * progressMonitor.setProgress(progressMonitor.getMaximum());
             * progressMonitor.close();
             * }*/
            progressBar.SetVisible(false);
            if (glassPane != null)
            {
                glassPane.SetVisible(false);
            }
            // restore input to components
            lpThread    = null;
            parseThread = null;
        }
        /// <summary>Loads a serialized parser specified by given path</summary>
        public virtual void LoadParser(string filename)
        {
            if (filename == null)
            {
                return;
            }
            // check if file exists before we start the worker thread and progress monitor
            File file = new File(filename);

            if (file.Exists())
            {
                lpThread = new ParserPanel.LoadParserThread(this, filename);
                lpThread.Start();
                StartProgressMonitor("Loading Parser", ParserLoadTime);
            }
            else
            {
                JOptionPane.ShowMessageDialog(this, "Could not find file " + filename, null, JOptionPane.ErrorMessage);
                SetStatus("Error loading parser");
            }
        }
 public virtual void LoadJarParser(string jarFile, string model)
 {
     lpThread = new ParserPanel.LoadParserThread(this, jarFile, model);
     lpThread.Start();
     StartProgressMonitor("Loading Parser", ParserLoadTime);
 }