private void schedule () { if ( this.scheduled ) { return; } this.scheduled = true; this.display.timerExec ( delay, this.runnable ); }
private void schedule () { if ( this.scheduled ) { return; } this.scheduled = true; this.display.timerExec ( delay, this.runnable ); }
void setCurrentCaret (Caret caret) { currentCaret = caret; int blinkRate = currentCaret != null ? currentCaret.blinkRate : -1; timerExec (blinkRate, caretTimer); }
public void start(Point controlPos, AbstractScrollHandler targetScrollHandler) { this.fControlPos = controlPos; this.fTargetScrollHandler = targetScrollHandler; if (controlPos != null && targetScrollHandler != null) { // First one is 200 millis fDisplay.timerExec(200, this); } }
void registerItem(HandledContributionItem item) { if (!itemsToCheck.contains(item)) { itemsToCheck.add(item); // Start the timer on the first item registered if (itemsToCheck.size() == 1) display.timerExec(400, this); } }
public void run() { if ( !display.isDisposed()){ display.timerExec( 2500,disposer ); } } });
@Override public void run() { if (fAutoScrollDirection == SWT.DOWN) { int top= getInclusiveTopIndex(); fCachedTextViewer.setTopIndex(top +1); expandSelection(top +1 + fCachedViewportSize); display.timerExec(TIMER_INTERVAL, this); } } };
private void setPageLater() { Display.getCurrent().timerExec(1000, new Runnable() { public void run() { synchronized(CompareEditor.this) { if (getState() == INITIALIZING) { setState(STILL_INITIALIZING); createCompareControl(); } } } }); }
/** Executes the given runnable in the UI thread after the given delay. */ public static void timerExec(int ms, Runnable runnable) { initSwtThreads(); display.timerExec(ms, runnable); }
@Override public void run() { if (fAutoScrollDirection == SWT.UP) { int top= getInclusiveTopIndex(); if (top > 0) { fCachedTextViewer.setTopIndex(top -1); expandSelection(top -1); display.timerExec(TIMER_INTERVAL, this); } } } };
@Override public void run() { if (fAutoScrollDirection == SWT.DOWN) { int top= getInclusiveTopIndex(); fCachedTextViewer.setTopIndex(top +1); expandSelection(top +1 + fCachedViewportSize); display.timerExec(TIMER_INTERVAL, this); } } };
public void mouseDown(MouseEvent event) { cancelRepeater(); if (event.button == 1) { // Left click buttonPressed(event.stateMask, event.time); repeater = new Repeater(event.stateMask); getDisplay().timerExec(initialRepeatDelay, repeater); } }
public void modifyText(ModifyEvent e) { if (e.widget == textFilter) { if (delayedEvent != null) { delayedEvent.CANCEL = true; } delayedEvent = new DelayedEvent(); Display.getCurrent().timerExec(400, delayedEvent); } } }
@Override public void run() { if (canvas.isDisposed()) return; if (busy) { index++; if (index == images.length) index = 0; canvas.redraw(); } display.timerExec(150, this); } });
@Override public Disposable schedule(Runnable task, long delay, TimeUnit unit) { if (delay <= 0) { return schedule(task); } if (!display.isDisposed()) { SwtScheduledDirectAction a = new SwtScheduledDirectAction(task); display.timerExec((int)unit.toMillis(delay), a); return a; } throw Exceptions.failWithRejected(); }
@Override public void run () { if (!active) return; GC gc = new GC(AnimatedProgress.this); paintStripes(gc); gc.dispose(); display.timerExec (SLEEP, timer [0]); } };
public void run () { if (!active) return; GC gc = new GC(AnimatedProgress.this); paintStripes(gc); gc.dispose(); display.timerExec (SLEEP, timer [0]); } };
@Override public Disposable schedule(Runnable action, long delayTime, TimeUnit unit) { if (delayTime <= 0) { return schedule(action); } if (!unsubscribed && !display.isDisposed()) { SwtScheduledAction a = new SwtScheduledAction(action, this); display.timerExec((int)unit.toMillis(delayTime), a); return a; } throw Exceptions.failWithRejected(); }
public void run() { if (!isDisposed()) { redraw(); getDisplay().timerExec(redrawInterval, this); } } });