Esempio n. 1
0
 public Object getIndex() {
   if (worker == null || !worker.isDone()) {
     return null;
   } else {
     try {
       return worker.get();
     } catch (Exception ex) {
       MessageUtils.showMessage(ex.getMessage());
     }
     return null;
   }
 }
Esempio n. 2
0
 private void cancelButtonActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_cancelButtonActionPerformed
   if (worker != null) {
     worker.cancel(true);
   }
   setVisible(false);
 } // GEN-LAST:event_cancelButtonActionPerformed
Esempio n. 3
0
  private void goButtonActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_goButtonActionPerformed

    if (worker.isDone() || worker.isCancelled()) {
      setVisible(false);
    } else {
      goButton.setEnabled(false);
      worker.execute();
      jLabel1.setVisible(true);
      // Haven't worked out how to publish progress yet, just going to set it to indeterminate
      if (fileType == FileType.VCF) {
        IndexCreatorDialog.this.progressBar.setIndeterminate(true);
        jLabel1.setText("Creating index...");
      }
    }
  } // GEN-LAST:event_goButtonActionPerformed