Package org.eclipse.swt.graphics

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


    if (infoObj == null)
      return;

    Image img = (Image)infoObj.getData("PiecesImage");
    if (img != null && !img.isDisposed())
      img.dispose();

    infoObj.setData("PiecesImageBuffer", null);
    infoObj.setData("PiecesImage", null);
  }
 
View Full Code Here


      bImageChanged = imageBounds.width != newWidth ||
                      imageBounds.height != newHeight;
    }
    if (bImageChanged) {
      if (image != null && !image.isDisposed()) {
        image.dispose();
      }
      image = new Image(SWTThread.getInstance().getDisplay(),
                        newWidth, newHeight);
      imageBounds = image.getBounds();
      bImageBufferValid = false;
View Full Code Here

  private void disposeCellIcon(TableCell cell) {
    final Image img = ((TableCellSWT) cell).getIcon();
    if (img != null) {
      ((TableCellSWT) cell).setIcon(null);
      if (!img.isDisposed()) {
        img.dispose();
      }
    }
  }
 
  public boolean inplaceValueSet(TableCell cell, String value, boolean finalEdit) {
View Full Code Here

   
    gcBuffer.dispose();
    GC gcPanel = new GC(panel);
    gcPanel.drawImage(buffer,0,0);
    gcPanel.dispose();
    buffer.dispose();  
  }
 
  public void peerManagerWillBeAdded( PEPeerManager  peer_manager ){}
  public void peerManagerAdded(PEPeerManager manager) {}
  public void peerManagerRemoved(PEPeerManager manager) {}
View Full Code Here

    Graphic graphic = cell.getGraphic();
    if (graphic instanceof UISWTGraphic)
    {
      final Image img = ((UISWTGraphic) graphic).getImage();
      if (img != null && !img.isDisposed())
        img.dispose();
    }
  }

 
  private class Cell implements TableCellLightRefreshListener {
View Full Code Here

      Image piecesImage = null;
     
      if (graphic instanceof UISWTGraphic)
        piecesImage = ((UISWTGraphic) graphic).getImage();
      if (piecesImage != null && !piecesImage.isDisposed())
        piecesImage.dispose();
     
      if (!running) {
        cell.setGraphic(null);
        return;
      }
View Full Code Here

  }

  public void dispose(TableCell cell) {
    Image img = ((TableCellSWT) cell).getGraphicSWT();
    if (img != null && !img.isDisposed())
      img.dispose();
  }

  public void refresh(TableCell cell) {
    PEPiece pePiece = (PEPiece) cell.getDataSource();
    if (pePiece == null) {
View Full Code Here

      ((TableCellSWT) cell).setGraphic(image);
    } else {
      cell.setGraphic(new UISWTGraphicImpl(image));
    }
    if (oldImage != null && !oldImage.isDisposed())
      oldImage.dispose();

    gcImage.dispose();
  }
}
View Full Code Here

    gc.setBackground(color);
    gc.fillRectangle(0,0,25,10);
    gc.dispose();
    colorChooser.setImage(img);
    if(oldImg != null && ! oldImg.isDisposed())
      oldImg.dispose();
  }

  public Control getControl() {
    return colorChooser;
  }
View Full Code Here

    if (infoObj == null)
      return;

    Image img = (Image) infoObj.getUserData("PiecesImage");
    if (img != null && !img.isDisposed())
      img.dispose();

    infoObj.setUserData("PiecesImageBuffer", null);
    infoObj.setUserData("PiecesImage", null);
  }
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.