@Override public void handleEvent(Event e) { if (refreshInfoCanvasQueued || !peerInfoCanvas.isVisible()) { return; } // wrap in asyncexec because sc.setMinWidth (called later) doesn't work // too well inside a resize (the canvas won't size isn't always updated) Utils.execSWTThreadLater(100, new AERunnable() { @Override public void runSupport() { if (refreshInfoCanvasQueued) { return; } refreshInfoCanvasQueued = true; if (img != null) { int iOldColCount = img.getBounds().width / BLOCK_SIZE; int iNewColCount = peerInfoCanvas.getClientArea().width / BLOCK_SIZE; if (iOldColCount != iNewColCount) refreshInfoCanvas(); } } }); } });
/** * Returns <code>true</code> if the receiver is visible and all * of the receiver's ancestors are visible and <code>false</code> * otherwise. * * @return the receiver's visibility state * * @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> * * @see #getVisible */ public boolean isVisible () { checkWidget(); return isVisible && parent.isVisible () && parent.hasFocus (); }
/** * Returns <code>true</code> if the receiver is visible and all * of the receiver's ancestors are visible and <code>false</code> * otherwise. * * @return the receiver's visibility state * * @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> * * @see #getVisible */ public boolean isVisible () { checkWidget(); return isVisible && parent.isVisible () && parent.hasFocus (); }
/** * Returns <code>true</code> if the receiver is visible and all * of the receiver's ancestors are visible and <code>false</code> * otherwise. * * @return the receiver's visibility state * * @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> * * @see #getVisible */ public boolean isVisible () { checkWidget(); return isVisible && parent.isVisible () && hasFocus (); }
/** * Returns <code>true</code> if the receiver is visible and all * of the receiver's ancestors are visible and <code>false</code> * otherwise. * * @return the receiver's visibility state * * @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> * * @see #getVisible */ public boolean isVisible () { checkWidget(); return isVisible && parent.isVisible () && parent.hasFocus (); }
/** * Returns <code>true</code> if the receiver is visible and all * of the receiver's ancestors are visible and <code>false</code> * otherwise. * * @return the receiver's visibility state * * @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> * * @see #getVisible */ public boolean isVisible () { checkWidget(); return isVisible && parent.isVisible () && parent.hasFocus (); }
horizontalOffset = selection; redraw (); if (header.isVisible () && drawCount <= 0) header.redraw ();
boolean sizeChanged) if ( drawCanvas == null || drawCanvas.isDisposed() || !drawCanvas.isVisible()){
void onScrollHorizontal (Event event) { ScrollBar hBar = getHorizontalBar (); if (hBar == null) return; int newSelection = hBar.getSelection (); update (); if (itemsCount > 0) { GC gc = new GC (this); gc.copyArea ( 0, 0, clientArea.width, clientArea.height, horizontalOffset - newSelection, 0); gc.dispose (); } else { redraw (); /* ensure that static focus rectangle updates properly */ } if (drawCount <= 0 && header.isVisible ()) { header.update (); Rectangle headerClientArea = header.getClientArea (); GC gc = new GC (header); gc.copyArea ( 0, 0, headerClientArea.width, headerClientArea.height, horizontalOffset - newSelection, 0); gc.dispose (); } horizontalOffset = newSelection; } void onScrollVertical (Event event) {
if (hBar != null) hBar.setSelection (horizontalOffset); redraw (); if (drawCount <= 0 && header.isVisible ()) header.redraw ();
if (drawCount <= 0 && header.isVisible ()) header.redraw ();
if (drawCount <= 0 && header.isVisible ()) header.redraw ();
if (!isVisible ()) return; boolean isFocus = caret != null && caret.isFocusCaret (); if (isFocus) caret.killFocus ();
if (!isVisible ()) return; boolean isFocus = caret != null && caret.isFocusCaret (); if (isFocus) caret.killFocus ();
if (!isVisible ()) return; boolean isFocus = caret != null && caret.isFocusCaret (); if (isFocus) caret.killFocus ();
protected void drawScale(boolean sizeChanged) { if(drawCanvas == null || drawCanvas.isDisposed() || !drawCanvas.isVisible()) return;
protected void drawChart(boolean sizeChanged) { if (drawCanvas == null || drawCanvas.isDisposed() || !drawCanvas.isVisible())
|| !pieceInfoCanvas.isVisible()) { return( result );