@Override public void actionPerformed(ActionEvent e) { if (!consumeTimer.isRunning()) { consumeRateField.setEnabled(false); consumeTimer.start(); } else { consumeRateField.setEnabled(true); consumeTimer.stop(); } } };
@Override public void actionPerformed(ActionEvent e) { if (!produceTimer.isRunning()) { produceRateField.setEnabled(false); produceTimer.start(); } else { produceRateField.setEnabled(true); produceTimer.stop(); } } };
public boolean isRunning(){ return timer.isRunning(); }
public void startProgressAnimation() { if (animationTimer != null && !animationTimer.isRunning()) { animationTimer.start(); } }
/** * Stop issuing GRBL status request commands. */ private void stopPollingPosition() { if (this.positionPollTimer.isRunning()) { this.positionPollTimer.stop(); } }
public void stopProgressAnimation() { if (animationTimer != null && animationTimer.isRunning()) { animationTimer.stop(); jLabel.setIcon(findIcon); jLabel.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); } }
@Override public void componentResized(ComponentEvent e) { if (!initComponents) { if (resizeTimer.isRunning()) { resizeTimer.restart(); } else { resizeTimer.start(); } } } };
/** * Begin issuing GRBL status request commands. */ private void beginPollingPosition() { // Start sending '?' commands if supported and enabled. if (this.isReady && this.capabilities != null && this.getStatusUpdatesEnabled()) { if (this.positionPollTimer.isRunning() == false) { this.outstandingPolls = 0; this.positionPollTimer.start(); } } }
private void endSend() { if (timer != null && timer.isRunning()) { timer.stop(); setText(String.format(COMPLETED_FORMAT, Utils.formattedMillis(backend.getSendDuration()))); } }
/** * Free resources so GC can remove unused objects from memory */ public void cleanUp() { saveDividerLocationsAndDeckAreaSettings(); if (updateDeckTask != null) { updateDeckTask.cancel(true); } if (countdown != null) { if (countdown.isRunning()) { countdown.stop(); } for (ActionListener al : countdown.getActionListeners()) { countdown.removeActionListener(al); } } this.cardSelector.cleanUp(); this.deckArea.cleanUp(); this.remove(bigCard); this.bigCard = null; }
/** * Stops the given timer if it is running. * * @param timer */ private void stopTimer(Timer timer) { if (timer != null && timer.isRunning()) { timer.stop(); } }
/** * Stop auto scrolling. The view will stay where it is. */ public void stopAutoScrolling() { if (_scrollTimer != null) { if (_scrollTimer.isRunning()) { _scrollTimer.stop(); } _scrollTimer = null; } }
/** * Informs the panel that it should stop all its computation */ public IFuture<Void> shutdown() { if(timer.isRunning()) timer.stop(); return IFuture.DONE; }
void abortTimer() { if ((timer != null) && timer.isRunning()) { timer.stop(); tree.removeMouseMotionListener(this); } }
@Override public void mouseEntered(MouseEvent e) { setBorder(BorderFactory.createLineBorder(AppThemeColor.TEXT_DEFAULT, 1)); if (timer != null && timer.isRunning()) { timer.stop(); } cell.setBorder(BorderFactory.createLineBorder(AppThemeColor.TEXT_DEFAULT, 2)); }
public void startTask(BackgroundTask task) { if (!isVisible() && !t.isRunning()){ t.start(); } }
public void updateAutoRefreshTimer() { int autoDelay = autoFreqTimeSecs[this.autoRefreshComboBox.getSelectedIndex()]; if (autoDelay > 0) { if (this.autoRefreshTimer.isRunning()) { this.autoRefreshTimer.stop(); } this.autoRefreshTimer.setDelay(autoDelay * 1000); this.autoRefreshTimer.start(); } else { this.autoRefreshTimer.stop(); } }
private void startTimer() { performAction(); Timer t = getTimer(); if (t.isRunning()) { return; } repaint(); t.setDelay(400); t.start(); }
public void actionPerformed(ActionEvent e) { if (timer.isRunning()) { timer.stop(); SlidingTypeDescriptor slidingTypeDescriptor = (SlidingTypeDescriptor) descriptor.getTypeDescriptor(ToolWindowType.SLIDING); animation.setAlpha(slidingTypeDescriptor.getTransparentRatio()); animation.show(); } } }