public void setInterval(int interval) { timer.setDelay(interval); }
/** * Sets the delay between the last "concurrent" edit and when the document * is re-parsed. * * @param millis The new delay, in milliseconds. This must be greater * than <code>0</code>. * @see #getDelay() */ public void setDelay(int millis) { if (running) { timer.stop(); } timer.setInitialDelay(millis); timer.setDelay(millis); if (running) { timer.start(); } }
public void actionPerformed(ActionEvent ae) { gainX++; int alpha = Math.max(250 - gainX, 200); setCenterColor(new Color(2 * gainX, 210, 255, alpha)); repaint(); if (gainX >= 100) { setCenterColor(new Color(200, 210, 0, 200)); gainX = 100; if (faderGainLife != null) { faderGainLife.stop(); faderGainLife.setRepeats(false); faderGainLife.setDelay(50000); } } } });
public void actionPerformed(ActionEvent ae) { loseX++; int alpha = Math.max(250 - loseX, 200); setCenterColor(new Color(250 - loseX / 2, 130 + loseX, 0, alpha)); repaint(); if (loseX >= 100) { setCenterColor(new Color(200, 210, 0, 200)); loseX = 100; stopLifeDisplay(); if (faderLoseLife != null) { faderLoseLife.stop(); faderLoseLife.setRepeats(false); faderLoseLife.setDelay(50000); } } } });
/** * Sets the number of milliseconds the animation will sleep between each frame. * <p> * If set to 0, the animation will stop. * </p> * @param delay number of milliseconds the animation will sleep between each frame. */ public synchronized void setFrameDelay(int delay) {timer.setDelay(delay);}
/** * Sets the interval in milliseconds that will be used for the blinking * Parameter will be within the range from 100 - 10000 ms * @param TIMER_PERIOD */ public void setTimerPeriod(final int TIMER_PERIOD) { timerPeriod = TIMER_PERIOD < 100 ? 100 : (TIMER_PERIOD > 10000 ? 10000 : TIMER_PERIOD); TIMER.setDelay(timerPeriod); }
@Override public void stateChanged(ChangeEvent e) { timer.setDelay((Integer) refreshSpinner.getValue()); } });
public void actionPerformed(ActionEvent e) { plugintimer.stop(); if (time_ > 0) { plugintimer.setDelay(time_); plugintimer.start(); } } }
javax.swing.Timer timer1 = new javax.swing.Timer(0, new ActionListener() { @Override public void actionPerformed(ActionEvent e) { label.setText(new Date()); } }); timer1.setRepeats(true); timer1.setDelay(1000);
private void updateTimer(MouseEvent e) { if (_timer != null) { _timer.setDelay(getDelay(e)); } }
public void customResultAvailable(Object result) { IClockService clock = (IClockService)result; clock.removeChangeListener(clocklistener); vptimer.setDelay(delay); vptimer.start(); } public void customExceptionOccurred(Exception exception)
public TableFocusTracker timerDelay( int delay ){ if( delay<1 )throw new IllegalArgumentException( "delay<1" ); synchronized(this){ Timer t = getTimer(); if( t!=null ){ t.setDelay(delay); } } return this; }
SwingFuture(Callable<V> call, long initialDelay, long interval, TimeUnit unit) { super(call); timer = new javax.swing.Timer(1, this); timer.setInitialDelay(Math.max(1, (int) unit.toMillis(initialDelay))); // set the between-event delay timer.setDelay(Math.max(1, (int) unit.toMillis(interval))); // Don't coalesce events - some code will depend on the timer being // fired every time. timer.setCoalesce(false); }
public void actionPerformed(ActionEvent e) { int pass = passes.getAndIncrement(); if (pass < maxPasses) { triggerModelNode.setAnimateColor(shades[pass]); timer.setDelay(delays[pass]); } else { triggerModelNode.setAnimateColor(null); timer.stop(); } } }
private void $completeSetup() { allComponentsCreated = true; if (log.isDebugEnabled()) { log.debug(this); } // apply 3 property setters setBackground(Color.WHITE); setForeground(Color.BLACK); timer.setDelay(delay); $afterCompleteSetup(); }
/** Set the delay between stopping * mouse movement and displaying * of the tooltip in milliseconds. */ public void setInitialDelay(int delay) { if (enterTimer.getDelay() != delay) { int oldDelay = enterTimer.getDelay(); enterTimer.setDelay(delay); firePropertyChange(PROP_INITIAL_DELAY, new Integer(oldDelay), new Integer(enterTimer.getDelay())); } }
private void startTimer() { performAction(); Timer t = getTimer(); if (t.isRunning()) { return; } repaint(); t.setDelay(400); t.start(); }
private void performFind() { if(this.settingText) { return; } searchStartedHandler.handleSearchStarted(); timer.setDelay((int) OWLEntityFinderPreferences.getInstance().getSearchDelay()); timer.restart(); }