@Override
 protected void done() {
   super.done();
   try {
     this.get();
     listener.done();
   } catch (InterruptedException e) {
     listener.setStatus("Interrupted Exception: " + e.getMessage());
     e.printStackTrace(new PrintStream(callbacks.getStderr()));
   } catch (ExecutionException e) {
     listener.setStatus("Execution Exception: " + e.getMessage());
     e.printStackTrace(new PrintStream(callbacks.getStderr()));
   } catch (Throwable e) {
     listener.setStatus(e.getMessage());
     e.printStackTrace(new PrintStream(callbacks.getStderr()));
   }
 }
    @Override
    protected void done() {
      if (acceptedJobsListModel == null) {
        acceptedJobsListModel = new listModel();
        acceptedJobList = new JList<Object>(acceptedJobsListModel);

        acceptedJobList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        acceptedJobList.addListSelectionListener(new ListSelectionHandler());
        acceptedJobList.setCellRenderer(new customListRenderer());
        operationsData.add(acceptedJobList);

        hSplitPane.setDividerLocation(0.35);
      } else {
        acceptedJobList.revalidate();
        acceptedJobList.repaint();
      }
      super.done();
    }
예제 #3
0
    @Override
    protected void done() {
      super.done();
      try {
        String content = this.get();

        this.model.openfile = this.file;
        this.model.nbLines = this.nbTotalRows;
        this.model.updateNumberOfLines();
        this.model.view.getContentTextarea().setText(content);

      } catch (Exception e) {
        this.model.view.alert(e.getMessage());
      }
      progressBar.setIndeterminate(false);
      this.model.enableOpenFileButton();
      this.model.enableSplitButton();
    }
예제 #4
0
  @Override
  protected void done() {
    super.done();

    SwingUtilities.invokeLater(
        new Runnable() {

          @Override
          public void run() {
            if (btn_login == null) {
              if (result != null && result.result == true) {
                loginForm.setVisible(false);
                loginForm.dispose();

                new MyDocsForm(result).setVisible(true);
                ;

              } else {
                loginForm.setVisible(false);
                loginForm.dispose();
                new LoginForm().setVisible(true);
              }
              return;
            }
            if (result != null && result.result == true) {
              // Main Form to show after the Login Form..
              loginForm.setVisible(false);
              loginForm.dispose();
              Global.password = password;

              new MyDocsForm(result).setVisible(true);

            } else {
              btn_login.setEnabled(true);
              JOptionPane.showMessageDialog(
                  loginForm, "Username or password not correct", "Login Error", 0);
            }
          }
        });
  }