Package javax.swing

Examples of javax.swing.Timer.start()


  }

  private void delaySwingExec(int millies, ActionListener action) {
    Timer timer = new Timer(millies, action);
    timer.setRepeats(false);
    timer.start();
  }

  public void partBroughtToTop(IWorkbenchPart part) {
    if (part == this) {
      delaySwingExec(DELAYED_TIME, new ChangeLnfAction());
View Full Code Here


                    enableHelpAnnotation();
                    viewController.gotoScene();
                }
            });
            timer.setRepeats(false);
            timer.start();
        }

        protected void enableHelpAnnotation()
        {
            if (this.helpLayer != null)
View Full Code Here

        ActionListener periodicTaskInitiator = new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                queueScheduledTasks(false);
            }};
        Timer t = new Timer(millisPerHour, periodicTaskInitiator);
        t.start();
    }
   
    private synchronized void queueScheduledTasks(boolean isStartup) {
        queueLogMessage(isStartup ? "Running startup tasks"
                : "Running periodic tasks");
View Full Code Here

            public void actionPerformed(ActionEvent e) {
                startExecutingTasks();
            }};
        Timer t = new Timer((int) delayMillis + 5000, taskRestarter);
        t.setRepeats(false);
        t.start();

        if (bte != null) {
            if (waitMillis > 0)
                bte.waitForTermination(waitMillis);
        }
View Full Code Here

        timeToShowSplash = timeToShowSplash < minTimeToShowSplash ?
                               minTimeToShowSplash : timeToShowSplash;

        Timer displayTimeTimer = new Timer(timeToShowSplash, this);
        displayTimeTimer.setRepeats(false);
        displayTimeTimer.start();
    }
   
    private Object syncLock = new Object();

    public void okayToDispose() {
View Full Code Here

                Timer t = new Timer(delay, new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        doTweak(dialog);
                    }});
                t.setRepeats(false);
                t.start();
            }
        }
    }

    public void doTweak(JDialog dialog) {
View Full Code Here

                public void actionPerformed(ActionEvent e) {
                    maybeShow();
                }
            });
            t.setRepeats(false);
            t.start();
        } else {
            // if the caller wants the dialog to be displayed immediately,
            // run events on the Swing dispatch thread to show it.
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
View Full Code Here

            Timer t = new Timer(200, new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    windowIsVisible = true;
                }});
            t.setRepeats(false);
            t.start();
        }

        public void windowIconified(WindowEvent e) {
            if (windowIsVisible && isHideAppropriate()) {
                windowIsVisible = false;
View Full Code Here

          System.out.println("I can't hear what you said.\n");
        }
      }
    });
    t.setRepeats(true);
    t.start();
    // while (true) {
    // System.out.println("Start speaking. Press Ctrl-C to quit.\n");
    //
    // Result result = recognizer.recognize();
    //
View Full Code Here

    button.addActionListener(new ActionListener() {
     
      @Override
      public void actionPerformed(ActionEvent e) {
        if(!timer.isRunning())
          timer.start();
        else System.out.println("already running");
      }
    });
    fr.add(button);
    fr.setVisible(true);
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.