Package org.eclipse.swt.graphics

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


   
        Rectangle bounds = item.getBounds(0);
        GC gc = new GC(table);
        gc.setBackground(blue);
        gc.fillRectangle(oldPoint.x,oldPoint.y,bounds.width,2);
        gc.dispose();
      }
    });

    shell.pack();
    Point p = shell.getSize();
View Full Code Here


      if (image != null)
        size.x += GAP;
    } else {
      size.y = Math.max(size.y, gc.getFontMetrics().getHeight());
    }
    gc.dispose();

    return size;
  }

  @Override
View Full Code Here

      gc.fillRectangle(0, 0, 32, 10);

      gc.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_BLACK));
      gc.drawRectangle(0, 0, 31, 9);

      gc.dispose();

      fColorItem.setImage(fColorImage);
    }

    private void onSelectColor() {
View Full Code Here

  private void initMetrics() {
    GC gc = new GC(this);
    gc.setFont(JFaceResources.getDialogFont());
    fFontMetrics = gc.getFontMetrics();
    gc.dispose();
  }

  private void initComponents() {

    /* Apply Gridlayout */
 
View Full Code Here

   */
  public static Point getTextSize(Drawable drawable, Font font, String text) {
    GC gc = new GC(drawable);
    gc.setFont(font);
    Point p = gc.textExtent(text);
    gc.dispose();

    return p;
  }

  /**
 
View Full Code Here

    gc.fillRectangle(0, 0, 12, 12);

    gc.setForeground(display.getSystemColor(SWT.COLOR_BLACK));
    gc.drawRectangle(0, 0, 11, 11);

    gc.dispose();
    color.dispose();

    return image;
  }
View Full Code Here

    GC gc = new GC(fFeedLinkInput);
    gc.setFont(JFaceResources.getDialogFont());
    FontMetrics fontMetrics = gc.getFontMetrics();
    int entryFieldWidth = Dialog.convertHorizontalDLUsToPixels(fontMetrics, IDialogConstants.ENTRY_FIELD_WIDTH);
    gc.dispose();

    ((GridData) fFeedLinkInput.getLayoutData()).widthHint = entryFieldWidth; //Required to avoid large spanning dialog for long Links
    fFeedLinkInput.setFocus();

    if (StringUtils.isSet(fInitialLink) && !fInitialLink.equals(URIUtils.HTTP)) {
View Full Code Here

   */
  public static Point getTextSize(Composite drawable, Font font, String text) {
    GC gc = new GC(drawable);
    gc.setFont(font);
    Point p = gc.textExtent(text);
    gc.dispose();

    return p;
  }

  /**
 
View Full Code Here

   */
  public static Point getTextSize(Composite drawable, Font font, String text) {
    GC gc = new GC(drawable);
    gc.setFont(font);
    Point p = gc.textExtent(text);
    gc.dispose();

    return p;
  }

  /**
 
View Full Code Here

        drawGradient(gc, clArea);

        /* Fix Region Shape */
        fixRegion(gc, clArea);

        gc.dispose();

        titleCircle.setBackgroundImage(fTitleBgImage);

        if (oldBgImage != null)
          oldBgImage.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.