Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.Font


    }
        return true;
  }
   
    private void createProjectEditor(Composite parent) {
        Font font = parent.getFont();
        Group group = new Group(parent, SWT.NONE);
        group.setText("&Project:");
        GridData gd = new GridData(GridData.FILL_HORIZONTAL);
        group.setLayoutData(gd);
        GridLayout layout = new GridLayout();
View Full Code Here


            : new ProjectBlock();
    }

  public void createControl(Composite parent)
  {
    Font font = parent.getFont();

    Composite comp = new Composite(parent, SWT.NONE);
    setControl(comp);

    GridLayout topLayout = new GridLayout();
View Full Code Here

    /**
     * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(Composite)
     */
    public void createControl(Composite parent)
    {
        Font font = parent.getFont();
        Composite comp = new Composite(parent, SWT.NONE);
        GridLayout layout = new GridLayout(1, true);
        comp.setLayout(layout);
        comp.setFont(font);

View Full Code Here

 
  public static double textAscent(String fontName, int fontSize,
      FontStyle... styles) {
    // TODO: optimize this
    FontData fd = new FontData(fontName, fontSize, FontStyle.toStyleMask(styles));
    Font f = new Font(device, fd);
    setGC();
    gc.setFont(f);
    double result = gc.getFontMetrics().getAscent();
    f.dispose();
    return result;
  }
View Full Code Here

  public static double textDescent(String fontName, int fontSize,
      FontStyle... styles) {
    // TODO: optimize this
    FontData fd = new FontData(fontName, fontSize, FontStyle.toStyleMask(styles));
    Font f = new Font(device, fd);
    setGC();
    gc.setFont(f);
    double result = gc.getFontMetrics().getDescent();
    f.dispose();
    return result;
  }
View Full Code Here

  public static double textWidth(String s, String fontName, int fontSize,
      FontStyle... styles) {
    // TODO: optimize this
    FontData fd = new FontData(fontName, fontSize, FontStyle.toStyleMask(styles));
    Font f = new Font(device, fd);
    setGC();
    gc.setFont(f);
    double result = gc.textExtent(s).x;
    f.dispose();
    return result;
  }
View Full Code Here

     *
     * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
     */
    public void createControl(Composite parent)
    {
        Font font = parent.getFont();

        //Composite group = new Composite(parent, SWT.NONE);
        Group group = new Group(parent, SWT.NONE);
       
        GridLayout workingDirLayout = new GridLayout();
View Full Code Here

        fLaunchConfigAttr = launchConfigAttr;
    }

    public void createControl(Composite parent)
    {
        Font font = parent.getFont();

        Group group = new Group(parent, SWT.NONE);
        setControl(group);
        GridLayout topLayout = new GridLayout();
        group.setLayout(topLayout);
View Full Code Here

 
  /**
   * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(Composite)
   */
  public void createControl(Composite parent) {
    Font font = parent.getFont();

    Composite comp = new Composite(parent, SWT.NONE);
    setControl(comp);
    GridLayout topLayout = new GridLayout();
    comp.setLayout(topLayout);
View Full Code Here

    fButton.setImage(fImage);
  }
 
  protected Point computeImageSize(Control window) {
    GC gc= new GC(window);
    Font f= JFaceResources.getFontRegistry().get(JFaceResources.DEFAULT_FONT);
    gc.setFont(f);
    int height= gc.getFontMetrics().getHeight();
    gc.dispose();
    Point p= new Point(height * 3 - 6, height);
    return p;
View Full Code Here

TOP

Related Classes of org.eclipse.swt.graphics.Font

Copyright © 2018 www.massapicom. 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.