Package org.eclipse.swt.graphics

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


    gc.drawText(controller.getItem().getText(), textBounds.x, textBounds.y, true);

    gc.setForeground(old);
   
    if (neo != null) {
      neo.dispose();
    }
  }

  private void paintCloseButton(GC gc, StripItemController controller) {
    Rectangle closeButtonBounds = getCloseButtonBounds(controller.getItem());
View Full Code Here


    gc.fillRectangle(bounds);
   
    gc.setBackground(old);
   
    if (neo != null) {
      neo.dispose();
    }
  }

  private void paintImage(GC gc, Item item) {
    if (!item.hasImage()) {
View Full Code Here

    gc.drawText(item.getText(), textBounds.x, textBounds.y, true);
   
    gc.setForeground(old);
   
    if (neo != null) {
      neo.dispose();
    }
  }

  private void paintCloseButton(GC gc, Item item) {
    Rectangle closeButtonBounds = item.getCloseButtonBounds();
View Full Code Here

    gc.setBackground(newBackground);
   
    gc.fillRoundRectangle(x, y, width, height, archSize, archSize);
   
    gc.setBackground(oldBackground);
    newBackground.dispose();
  }
 
  protected void paintImage(GC gc, int x, int y, int width, int height) {
    x += marginLeft;
    y += height / 2;
View Full Code Here

      y -= gc.stringExtent(getText()).y / 2;
      gc.drawText(getText(), x, y, true);
    }
   
    gc.setForeground(oldForeground);
    newForeground.dispose();
  }

  protected void paintCloseButton(GC gc, int x, int y, int width, int height) {
    x += marginLeft;
    y += height / 2;
View Full Code Here

    gc.setBackground(newBackground);
    {
      gc.fillRoundRectangle(bounds.x, bounds.y, bounds.width, bounds.height, arcSize, arcSize);
    }
    gc.setBackground(oldBackground);
    newBackground.dispose();
  }

  private void paintImage(GC gc, StripItem item) {
    if (item.hasImage()) {
      Rectangle bounds = item.getBounds();
View Full Code Here

      gc.setForeground(newForeground);
      {
        gc.drawText(item.getText(), textBounds.x, textBounds.y, true);
      }
      gc.setForeground(oldForeground);
      newForeground.dispose();
    }
  }

  private void paintCloseButton(GC gc, StripItem item) {
    Rectangle bounds = item.getBounds();
View Full Code Here

    }
   
    gc.setBackground(neo);
    gc.fillRectangle(bounds);
    gc.setBackground(old);
    neo.dispose();
  }
 
  private void paintStripItemImage(GC gc, StripItem item) {
    if (item.getImage() == null) {
      return;
View Full Code Here

    }
   
    gc.setForeground(neo);
    gc.drawText(item.getText(), bounds.x, bounds.y, true);
    gc.setForeground(old);
    neo.dispose();
  }
 
  private void paintStripItemCloseButton(GC gc, StripItem item) {
    Image closeButtonImage = UIImageResource.T.closeNormal10();
    Rectangle bounds = item.getCloseButtonBounds();
View Full Code Here

    bounds.x += controller.getOffset();
   
    gc.fillRectangle(bounds);
   
    gc.setBackground(oldColor);
    newColor.dispose();
  }

  private void paintItemImage(GC gc, StripItemController controller) {
    if (!hasItemImage(controller.getItem())) {
      return;
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.