Status: New
Owner: ----
Labels: Type-Enhancement Priority-Medium Effort-Medium OpSys-All  

New issue 124 by heuermh: Add additional constructors to PSWTImage

Old post to piccolo-dev, referred to in Issue 43.

From: Fabio Zadrozny
Date: Thu Apr 13 10:12:12 EDT 2006

  Sure, thanks... And while we are at it, there is another 'dispose' related
thing I wanted to request... It's not a bug, but a feature-request I find
important... I'm doing an Eclipse plugin, and I manage all the Images and
dispose them carefully (and share it among lot's of objects), so, I've added
the following constructors to PSWTImage, which I think should be in the
'default' distribution, as I think that's pretty common when using SWT
(sharing an image through several objects).




     public PSWTImage(PSWTCanvas canvas) {
         this(canvas, true);

     public PSWTImage(PSWTCanvas canvas, final boolean disposeImage) {

         this.canvas         canvas.addDisposeListener(new DisposeListener()  
             public void widgetDisposed(DisposeEvent de) {
                 if (image !                    image.dispose();

     public PSWTImage(PSWTCanvas canvas, Image newImage) {
         this(canvas, newImage, true);

     public PSWTImage(PSWTCanvas canvas, Image newImage, boolean
disposeImage) {
         this(canvas, disposeImage);

     public PSWTImage(PSWTCanvas canvas, String fileName) {
         this(canvas, fileName, true);

     public PSWTImage(PSWTCanvas canvas, String fileName, boolean
disposeImage) {
         this(canvas, disposeImage);

You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:

Piccolo2D Developers Group:

Reply via email to