Examples of SwingWorker


Examples of KFM.SwingWorker

                Rectangle tR2 = tDialog.getBounds();
                tDialog.setLocation(tRect.x + (tRect.width - tR2.width) / 2,
                                    tRect.y + (tRect.height - tR2.height) / 2);
                */

                SwingWorker tWorker;
                mRS = aRS;
                if(mUseTableModel) { // build table model
                    tWorker = new SwingWorker() {
                        public Object construct() {
                            try {
                                mModel = new TsqlTableModel(mRS);
                            } catch(SQLException e) {
                                System.err.println("new TableModel: " + e);
                            }
                            TsqlProgressDialog.getInstance().hide();
                            return null;
                        }
                    };
                    tWorker.start();
                    tDialog.show();

                    mAbortedQuery = tDialog.isAborted();
                } else {
                    mModel = null;
                }

                tWorker = new SwingWorker() {
                    public Object construct() {
                        try {
                            printResultSet(mModel, mRS);
                        } catch(Exception e) {
                            System.err.println("printResultSet: " + e);
                        }
                        TsqlProgressDialog.getInstance().hide();
                        return null;
                    }
                };

                tDialog.setTitle("Printing Resultset");
                tWorker.start();
                tDialog.show();
            } finally {
                // enable output textarea
                mInQuery = false;
                _outputGui(mInQuerySB.toString());
View Full Code Here

Examples of com.bbn.openmap.util.SwingWorker

     * LinkListener from a new thread.
     */
    public void startUp() {
        // Have to use a swing worker so that the calling thread
        // doesn't get hung up on launching the runnable.
        SwingWorker sw = new SwingWorker() {
            public Object construct() {
                if (Debug.debugging("link")) {
                    Debug.output("LinkListener self-starting...");
                }
                getListener().start();
                return null;
            }
        };
        sw.execute();
    }
View Full Code Here

Examples of com.salas.bb.utils.swingworker.SwingWorker

            }
        };
        itemsList.addActionListener(listener);

        // Start populating
        SwingWorker scanner = model.scan();
        scanner.addPropertyChangeListener(new ScannerListener());
        scanner.execute();
    }
View Full Code Here

Examples of com.visitrend.ndvis.deprecated.SwingWorker

   * This is pretty much already built for you, you would put your task code
   * in the doSomething method which you would override. However, you can also
   * override this method if you like.
   */
  public void go() {
    final SwingWorker worker = new SwingWorker() {
      public Object construct() {
        progress = 0;
        done = false;
        canceled = false;
        statMessage = null;
        return doSomething();
      }

      public void finished() {
        complete();
      }
    };
    worker.start();
  }
View Full Code Here

Examples of com.vividsolutions.jtstest.testbuilder.ui.SwingWorker

 
  private SwingWorker worker = null;
 
  private void runFunctionWorker()
  {
    worker = new SwingWorker() {
      Stopwatch timer;
     
      public Object construct()
      {
        return computeResult();
View Full Code Here

Examples of edu.stanford.genetics.treeview.SwingWorker

    * Called to start the task. I don't know why we bother with the ActualTask class, so don't ask.
    */
    void go(DataModel tvmodel) {
      final DataModel model = tvmodel;
      setCurrent(0);
      final SwingWorker worker = new SwingWorker() {
        public Object construct() {
          return new ActualTask(model);
        }
      };
      worker.start();
    }
View Full Code Here

Examples of edu.stanford.genetics.treeview.SwingWorker

    /**
    * Called to start the task. I don't know why we bother with the ActualTask class, so don't ask.
    */
    void go() {
      setCurrent(0);
      final SwingWorker worker = new SwingWorker() {
        public Object construct() {
          return new ActualTask();
        }
      };
      worker.start();
    }
View Full Code Here

Examples of edu.stanford.genetics.treeview.SwingWorker

  /**
   * @throws Exception
   */
  private void attemptRegistration() throws Exception {
    loadProgress = new LoadProgress("Registering Java Treeview...", null);
      final SwingWorker worker = new SwingWorker() {
        public Object construct() {
          run();
          return null;
        }
      };
      // start up the worker thread
      worker.start();
      loadTimer.start();

      // show a modal dialog, should block until loading done...
      loadProgress.setIndeterminate(true);
      loadProgress.pack();
View Full Code Here

Examples of edu.stanford.genetics.treeview.SwingWorker

  }
 
  public void loadInto() throws LoadException {
    loadProgress = new LoadProgress2(targetModel.getFileSet().getRoot(), parent);
    loadProgress.setPhases(phases);
    final SwingWorker worker = new SwingWorker() {
      public Object construct() {
        run();
        return null;
      }
    };
    // start up the worker thread
    worker.start();
    loadTimer = new javax.swing.Timer(200, new TimerListener());
    loadTimer.start();
    // show a modal dialog, should block until loading done...
    loadProgress.setIndeterminate(true);
    ((LoadProgress2) loadProgress).pack();
    loadProgress.setVisible(true);
   
    // but just in case it doesn't, we'll join on the worker
    try {
      worker.join();
    } catch (InterruptedException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
    // System.out.println("loadNew 6, ex: " + fileLoader.getException());
View Full Code Here

Examples of fr.soleil.utils.swingworker.SwingWorker

        }
        else {
            System.out.println("Usage : [Counter] [Diffractometer]");
        }

        final SwingWorker worker = new SwingWorker() {
            Tumba application;

            public Object construct() {
                application = new Tumba();
                application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                application.setModel(model);
                application.getSplash().progress(3);
                application.getSplash().setVisible(false);
                application.setVisible(true);
                return application;
            }

            // Runs on the event-dispatching thread.
            public void finished() {
                application.setVisible(true);
            }
        };
        worker.start();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.