/** * 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)); }
/** * 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 pt the point to translate * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the argument is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> * * @since 3.1 */ public void translate (Point pt) { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (pt == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); NSAutoreleasePool pool = null; if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init(); try { translate (pt.x, pt.y); } finally { if (pool != null) pool.release(); } }