if ( ( (Region) object ).isDisposed() ) { return;
/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the receiver */ public String toString () { if (isDisposed()) return "Region {*DISPOSED*}"; return "Region {" + handle + "}"; } }
/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the receiver */ @Override public String toString () { if (isDisposed()) return "Region {*DISPOSED*}"; return "Region {" + handle + "}"; } }
/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the receiver */ @Override public String toString () { if (isDisposed()) return "Region {*DISPOSED*}"; return "Region {" + handle + "}"; }
/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the receiver */ @Override public String toString () { if (isDisposed()) return "Region {*DISPOSED*}"; return "Region {" + handle + "}"; } }
/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the receiver */ @Override public String toString () { if (isDisposed()) return "Region {*DISPOSED*}"; return "Region {" + handle + "}"; } }
@Override public void dispose() { super.dispose(); if (!shellRegion.isDisposed()) shellRegion.dispose(); }
/** * Translate all of the polygons the receiver maintains to describe * its area by the specified point. * * @param x the x coordinate of the point to translate * @param y the y coordinate of the point to translate * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> * * @since 3.1 */ public void translate (int x, int y) { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); translate(new Point(x, y)); }
/** * Translate all of the polygons the receiver maintains to describe * its area by the specified point. * * @param x the x coordinate of the point to translate * @param y the y coordinate of the point to translate * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> * * @since 3.1 */ public void translate (int x, int y) { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); translate(new Point(x, y)); }
/** * Returns <code>true</code> if the receiver does not cover any * area in the (x, y) coordinate plane, and <code>false</code> if * the receiver does cover some area in the plane. * * @return <code>true</code> if the receiver is empty, and <code>false</code> otherwise * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */ public boolean isEmpty() { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); return OS.gdk_region_empty(handle); }
/** * Returns <code>true</code> if the receiver does not cover any * area in the (x, y) coordinate plane, and <code>false</code> if * the receiver does cover some area in the plane. * * @return <code>true</code> if the receiver is empty, and <code>false</code> otherwise * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */ public boolean isEmpty() { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); return OS.gdk_region_empty(handle); }
public void dispose() { if (feedbackShell != null && !feedbackShell.isDisposed()) { Region region = feedbackShell.getRegion(); if (region != null && !region.isDisposed()) region.dispose(); feedbackShell.dispose(); } feedbackShell = null; }
/** * Returns <code>true</code> if the receiver does not cover any * area in the (x, y) coordinate plane, and <code>false</code> if * the receiver does cover some area in the plane. * * @return <code>true</code> if the receiver is empty, and <code>false</code> otherwise * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */ public boolean isEmpty() { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); return OS.gdk_region_empty(handle); }
public void dispose() { if (feedbackShell != null && !feedbackShell.isDisposed()) { Region region = feedbackShell.getRegion(); if (region != null && !region.isDisposed()) { region.dispose(); } feedbackShell.dispose(); } feedbackShell = null; }
public void close() { if (fPopup != null) { if (!fPopup.isDisposed()) { fPopup.close(); } fPopup= null; } releaseWidgetToken(); if (fRegion != null) { if (! fRegion.isDisposed()) { fRegion.dispose(); } } }
public void close() { if (fPopup != null) { if (!fPopup.isDisposed()) { fPopup.close(); } fPopup= null; } releaseWidgetToken(); if (fRegion != null) { if (! fRegion.isDisposed()) { fRegion.dispose(); } } }
public void close() { if (popup != null) { if (!popup.isDisposed()) { popup.close(); } popup = null; } releaseWidgetToken(); if (region != null) { if (!region.isDisposed()) { region.dispose(); } } }
public void close() { if (fPopup != null) { if (!fPopup.isDisposed()) { fPopup.close(); } fPopup= null; } releaseWidgetToken(); if (fRegion != null) { if (! fRegion.isDisposed()) { fRegion.dispose(); } } }
/** * Returns a rectangle which represents the rectangular * union of the collection of polygons the receiver * maintains to describe its area. * * @return a bounding rectangle for the region * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> * * @see Rectangle#union */ public Rectangle getBounds () { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); return DPIUtil.autoScaleDown(getBoundsInPixels()); }
private void defineRegion() { Region rgn = new Region(); for (Rectangle r : rects) { rgn.add(r); rgn.subtract(r.x + 2, r.y + 2, r.width - 4, r.height - 4); } if (feedbackShell.getRegion() != null && !feedbackShell.getRegion().isDisposed()) feedbackShell.getRegion().dispose(); feedbackShell.setRegion(rgn); feedbackShell.redraw(); display.update(); }