本文整理了Java中javax.swing.Timer.isRunning()
方法的一些代码示例,展示了Timer.isRunning()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Timer.isRunning()
方法的具体详情如下:
包路径:javax.swing.Timer
类名称:Timer
方法名:isRunning
暂无
代码示例来源:origin: kiegroup/optaplanner
@Override
public void actionPerformed(ActionEvent e) {
if (!consumeTimer.isRunning()) {
consumeRateField.setEnabled(false);
consumeTimer.start();
} else {
consumeRateField.setEnabled(true);
consumeTimer.stop();
}
}
};
代码示例来源:origin: kiegroup/optaplanner
@Override
public void actionPerformed(ActionEvent e) {
if (!produceTimer.isRunning()) {
produceRateField.setEnabled(false);
produceTimer.start();
} else {
produceRateField.setEnabled(true);
produceTimer.stop();
}
}
};
代码示例来源:origin: RaiMan/SikuliX2
public boolean isRunning(){
return timer.isRunning();
}
代码示例来源:origin: org.netbeans.api/org-openide-awt
public void startProgressAnimation() {
if (animationTimer != null && !animationTimer.isRunning()) {
animationTimer.start();
}
}
代码示例来源:origin: winder/Universal-G-Code-Sender
/**
* Stop issuing GRBL status request commands.
*/
private void stopPollingPosition() {
if (this.positionPollTimer.isRunning()) {
this.positionPollTimer.stop();
}
}
代码示例来源:origin: org.netbeans.api/org-openide-awt
public void stopProgressAnimation() {
if (animationTimer != null && animationTimer.isRunning()) {
animationTimer.stop();
jLabel.setIcon(findIcon);
jLabel.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
}
}
代码示例来源:origin: magefree/mage
@Override
public void componentResized(ComponentEvent e) {
if (!initComponents) {
if (resizeTimer.isRunning()) {
resizeTimer.restart();
} else {
resizeTimer.start();
}
}
}
};
代码示例来源:origin: winder/Universal-G-Code-Sender
/**
* 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();
}
}
}
代码示例来源:origin: winder/Universal-G-Code-Sender
private void endSend() {
if (timer != null && timer.isRunning()) {
timer.stop();
setText(String.format(COMPLETED_FORMAT, Utils.formattedMillis(backend.getSendDuration())));
}
}
代码示例来源:origin: stackoverflow.com
if (timer != null && timer.isRunning()) {
timer.stop();
setState(MyState.STOP);
setProgress(0);
if (timer != null && timer.isRunning()) {
timer.stop();
代码示例来源:origin: magefree/mage
/**
* 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;
}
代码示例来源:origin: chatty/chatty
/**
* Stops the given timer if it is running.
*
* @param timer
*/
private void stopTimer(Timer timer) {
if (timer != null && timer.isRunning()) {
timer.stop();
}
}
代码示例来源:origin: com.jidesoft/jide-oss
/**
* Stop auto scrolling. The view will stay where it is.
*/
public void stopAutoScrolling() {
if (_scrollTimer != null) {
if (_scrollTimer.isRunning()) {
_scrollTimer.stop();
}
_scrollTimer = null;
}
}
代码示例来源:origin: org.activecomponents.jadex/jadex-runtimetools-swing
/**
* Informs the panel that it should stop all its computation
*/
public IFuture<Void> shutdown()
{
if(timer.isRunning())
timer.stop();
return IFuture.DONE;
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
void abortTimer() {
if ((timer != null) && timer.isRunning()) {
timer.stop();
tree.removeMouseMotionListener(this);
}
}
代码示例来源:origin: Exslims/MercuryTrade
@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));
}
代码示例来源:origin: protegeproject/protege
public void startTask(BackgroundTask task) {
if (!isVisible() && !t.isRunning()){
t.start();
}
}
代码示例来源:origin: nz.ac.waikato.cms.moa/moa
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();
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-xml-xam-ui
private void startTimer() {
performAction();
Timer t = getTimer();
if (t.isRunning()) {
return;
}
repaint();
t.setDelay(400);
t.start();
}
代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf
public void actionPerformed(ActionEvent e) {
if (timer.isRunning()) {
timer.stop();
SlidingTypeDescriptor slidingTypeDescriptor = (SlidingTypeDescriptor) descriptor.getTypeDescriptor(ToolWindowType.SLIDING);
animation.setAlpha(slidingTypeDescriptor.getTransparentRatio());
animation.show();
}
}
}
内容来源于网络,如有侵权,请联系作者删除!