/** * Start the animation. * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public synchronized void start() { checkWidget(); if (active) return; active = true; showStripes = true; final Display display = getDisplay(); final Runnable [] timer = new Runnable [1]; timer [0] = new Runnable () { public void run () { if (!active) return; GC gc = new GC(AnimatedProgress.this); paintStripes(gc); gc.dispose(); display.timerExec (SLEEP, timer [0]); } }; display.timerExec (SLEEP, timer [0]); } /**
/** * Start the animation. * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public synchronized void start() { checkWidget(); if (active) return; active = true; showStripes = true; final Display display = getDisplay(); final Runnable [] timer = new Runnable [1]; timer [0] = new Runnable () { @Override public void run () { if (!active) return; GC gc = new GC(AnimatedProgress.this); paintStripes(gc); gc.dispose(); display.timerExec (SLEEP, timer [0]); } }; display.timerExec (SLEEP, timer [0]); } /**
/** * Start the animation. * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public synchronized void start() { checkWidget(); if (active) return; active = true; showStripes = true; final Display display = getDisplay(); final Runnable [] timer = new Runnable [1]; timer [0] = new Runnable () { @Override public void run () { if (!active) return; GC gc = new GC(AnimatedProgress.this); paintStripes(gc); gc.dispose(); display.timerExec (SLEEP, timer [0]); } }; display.timerExec (SLEEP, timer [0]); } /**
/** * Start the animation. * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public synchronized void start() { checkWidget(); if (active) return; active = true; showStripes = true; final Display display = getDisplay(); final Runnable [] timer = new Runnable [1]; timer [0] = new Runnable () { @Override public void run () { if (!active) return; GC gc = new GC(AnimatedProgress.this); paintStripes(gc); gc.dispose(); display.timerExec (SLEEP, timer [0]); } }; display.timerExec (SLEEP, timer [0]); } /**
/** * Start the animation. * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public synchronized void start() { checkWidget(); if (active) return; active = true; showStripes = true; final Display display = getDisplay(); final Runnable [] timer = new Runnable [1]; timer [0] = new Runnable () { @Override public void run () { if (!active) return; GC gc = new GC(AnimatedProgress.this); paintStripes(gc); gc.dispose(); display.timerExec (SLEEP, timer [0]); } }; display.timerExec (SLEEP, timer [0]); } /**
void paint(PaintEvent event) { GC gc = event.gc; Display disp= getDisplay(); Rectangle rect= getClientArea(); gc.fillRectangle(rect); if (showBorder) { drawBevelRect(gc, rect.x, rect.y, rect.width-1, rect.height-1, disp.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW), disp.getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW)); } paintStripes(gc); } void paintStripes(GC gc) {
void paint(PaintEvent event) { GC gc = event.gc; Display disp= getDisplay(); Rectangle rect= getClientArea(); gc.fillRectangle(rect); if (showBorder) { drawBevelRect(gc, rect.x, rect.y, rect.width-1, rect.height-1, disp.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW), disp.getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW)); } paintStripes(gc); } void paintStripes(GC gc) {
void paint(PaintEvent event) { GC gc = event.gc; Display disp= getDisplay(); Rectangle rect= getClientArea(); gc.fillRectangle(rect); if (showBorder) { drawBevelRect(gc, rect.x, rect.y, rect.width-1, rect.height-1, disp.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW), disp.getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW)); } paintStripes(gc); } void paintStripes(GC gc) {
void paint(PaintEvent event) { GC gc = event.gc; Display disp= getDisplay(); Rectangle rect= getClientArea(); gc.fillRectangle(rect); if (showBorder) { drawBevelRect(gc, rect.x, rect.y, rect.width-1, rect.height-1, disp.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW), disp.getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW)); } paintStripes(gc); } void paintStripes(GC gc) {
void paint(PaintEvent event) { GC gc = event.gc; Display disp= getDisplay(); Rectangle rect= getClientArea(); gc.fillRectangle(rect); if (showBorder) { drawBevelRect(gc, rect.x, rect.y, rect.width-1, rect.height-1, disp.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW), disp.getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW)); } paintStripes(gc); } void paintStripes(GC gc) {
Color color = getDisplay().getSystemColor(SWT.COLOR_LIST_SELECTION); gc.setBackground(color); gc.fillRectangle(rect);
Color color = getDisplay().getSystemColor(SWT.COLOR_LIST_SELECTION); gc.setBackground(color); gc.fillRectangle(rect);
Color color = getDisplay().getSystemColor(SWT.COLOR_LIST_SELECTION); gc.setBackground(color); gc.fillRectangle(rect);
Color color = getDisplay().getSystemColor(SWT.COLOR_LIST_SELECTION); gc.setBackground(color); gc.fillRectangle(rect);
Color color = getDisplay().getSystemColor(SWT.COLOR_LIST_SELECTION); gc.setBackground(color); gc.fillRectangle(rect);