Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.Image.dispose()


            }
          }
        }
        event.gc.drawImage(image, 0, 0);
        gc.dispose();
        image.dispose();
      }

    });
  }
View Full Code Here


        display.sleep();
      }
    }

    shell.dispose();
    image.dispose();
  }

  /**
   * Creates the contents
   *
 
View Full Code Here

                swtImage = AWTSWTImageUtils.createSWTImage(rimage);
            }
            if (swtImage != null) {
                gc.drawImage(swtImage, sx1, sy1, Math.abs(sx2-sx1), Math.abs(sy2-sy1),
                        dx1, dy1, Math.abs(dx2-dx1), Math.abs(dy2-dy1) );
                swtImage.dispose();
            }
        } finally {
            if (swtImage != null)
                swtImage.dispose();
        }
View Full Code Here

                        dx1, dy1, Math.abs(dx2-dx1), Math.abs(dy2-dy1) );
                swtImage.dispose();
            }
        } finally {
            if (swtImage != null)
                swtImage.dispose();
        }
   
    }

    /**
 
View Full Code Here

        for( FeatureTypeStyleWrapper featureTypeStyleWrapper : featureTypeStylesWrapperList ) {
            List<RuleWrapper> rulesWrapperList = featureTypeStyleWrapper.getRulesWrapperList();
            BufferedImage tmpImage = Utilities.rulesWrapperToImage(rulesWrapperList, PREVIEWWIDTH, PREVIEWHEIGHT, type);
            Image convertToSWTImage = AWTSWTImageUtils.convertToSWTImage(tmpImage);
            gc.drawImage(convertToSWTImage, 0, 0);
            convertToSWTImage.dispose();
        }
        gc.dispose();
        previewCanvas.redraw();
    }
View Full Code Here

            } finally {
                if (image != null) {
                    image.dispose();
                }
                if (swatch != null) {
                    swatch.dispose();
                }
                if (monitor != null)
                    monitor.worked(3);
            }
        } catch (IOException t) {
View Full Code Here

            for( int i = 0; i < kids.length; i++ ) {
                Control c = kids[i];
                if (c instanceof Button) {
                    Image img = ((Button) c).getImage();
                    if (img != null) {
                        img.dispose();
                        ((Button) c).getImage().dispose();
                    }
                }
                c.dispose();
            }
View Full Code Here

      final Image[] images = ((ImageMapEntry) entry.getValue())
          .getImages();
      for (int i = 0; i < images.length; i++) {
        final Image image = images[i];
        if ((image != null) && (!image.isDisposed())) {
          image.dispose();
        }
      }

      // Clear all the references in the equivalence set
      key.clear();
View Full Code Here

        for (Iterator i = staleImages.iterator(); i.hasNext();) {
          imagesToDispose = (Image[]) i.next();
          for (int j = 0; j < imagesToDispose.length; j++) {
            final Image image = imagesToDispose[j];
            if ((image != null) && (!image.isDisposed())) {
              image.dispose();
            }
          }
        }
        staleImages.clear();
      }
View Full Code Here

                                PlatformUI.getWorkbench().close();
                                //System.exit(1); // need to ask the workbench to exit so this is clean...
                            }
                        } finally {
                            if (image != null)
                                image.dispose();
                            if (path != null)
                                path.dispose();
                        }
                    }
                });
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.