本文整理了Java中javax.swing.Timer.getInitialDelay()
方法的一些代码示例,展示了Timer.getInitialDelay()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Timer.getInitialDelay()
方法的具体详情如下:
包路径:javax.swing.Timer
类名称:Timer
方法名:getInitialDelay
暂无
代码示例来源:origin: freeplane/freeplane
/**
* Returns the initial delay value.
*
* @return an integer representing the initial delay value,
* in milliseconds
* @see #setInitialDelay
*/
public int getInitialDelay() {
return enterTimer.getInitialDelay();
}
代码示例来源:origin: com.github.insubstantial/flamingo
/**
* Returns the initial delay value.
*
* @return an integer representing the initial delay value, in milliseconds
* @see #setInitialDelay(int)
*/
public int getInitialDelay() {
return initialDelayTimer.getInitialDelay();
}
代码示例来源:origin: com.github.insubstantial/flamingo
/**
* Returns the dismissal delay value.
*
* @return an integer representing the dismissal delay value, in
* milliseconds
* @see #setDismissDelay(int)
*/
public int getDismissDelay() {
return dismissTimer.getInitialDelay();
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
public void scheduleActivatedNodes (Node[] nodes) {
synchronized (this) {
this.nodes = nodes;
if (timer == null) {
// start timer with INIT_DELAY
timer = new Timer (INIT_DELAY, this);
timer.setCoalesce (true);
timer.setRepeats (false);
}
if (timer.isRunning ()) {
// if timer is running then double init delay
if (timer.getInitialDelay () < MAX_DELAY) timer.setInitialDelay (timer.getInitialDelay () * 2);
firstChange = false;
} else {
// the first change is set immediatelly
setActivatedNodes (nodes);
firstChange = true;
}
// make sure timer is running
timer.restart();
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
public void scheduleActivatedNodes (Node[] nodes) {
synchronized (this) {
this.nodes = nodes;
if (timer == null) {
// start timer with INIT_DELAY
timer = new Timer (INIT_DELAY, this);
timer.setCoalesce (true);
timer.setRepeats (false);
}
if (timer.isRunning ()) {
// if timer is running then double init delay
if (timer.getInitialDelay () < MAX_DELAY) timer.setInitialDelay (timer.getInitialDelay () * 2);
firstChange = false;
} else {
// the first change is set immediatelly
setActivatedNodes (nodes);
firstChange = true;
}
// make sure timer is running
timer.restart();
}
}
代码示例来源:origin: org.netbeans.api/org-netbeans-api-progress
void postEvent(final ProgressEvent event, boolean shortenPeriod) {
synchronized (this) {
eventQueue.add(event);
if (!dispatchRunning) {
timerStart = System.currentTimeMillis();
int delay = timer.getInitialDelay();
// period of timer is longer than required by the handle -> shorten it.
if (shortenPeriod && timer.getInitialDelay() > event.getSource().getInitialDelay()) {
delay = event.getSource().getInitialDelay();
}
dispatchRunning = true;
resetTimer(delay, true);
} else if (shortenPeriod) {
// time remaining is longer than required by the handle's initial delay.
// restart with shorter time.
if (System.currentTimeMillis() - timerStart > event.getSource().getInitialDelay()) {
resetTimer(event.getSource().getInitialDelay(), true);
}
}
}
}
代码示例来源:origin: stackoverflow.com
if(timer.getInitialDelay() >= initialDelay) {
timer.setInitialDelay(initialDelay);
内容来源于网络,如有侵权,请联系作者删除!