Examples of FontData


Examples of org.eclipse.swt.graphics.FontData

      String _currOrderId = orderId != null && orderId.length()>0? "," + orderId : "";
      xmlDetailsConfigFilename = new File(xmlPaths, cJobchain.getText()+ _currOrderId + ".config.xml").getCanonicalPath();

      if(xmlDetailsConfigFilename != null && xmlDetailsConfigFilename.trim().length() > 0 && new File(xmlDetailsConfigFilename).exists() ) {
        FontData fontDatas[] = this.getFont().getFontData();
        FontData fdata = fontDatas[0];
        Font font = new Font(Display.getCurrent(), fdata.getName(), fdata.getHeight(), SWT.BOLD);
        butDetails.setFont(font);
        butRemove.setEnabled(true);
      } else {

        FontData fontDatas[] = this.getFont().getFontData();
        FontData fdata = fontDatas[0];
        Font font = new Font(Display.getCurrent(), fdata.getName(), fdata.getHeight(), SWT.NORMAL);
        butDetails.setFont(font);
        butRemove.setEnabled(false);
      }

View Full Code Here

Examples of org.eclipse.swt.graphics.FontData

    butTemp.setVisible(false);

    butApply = new Button(parameterGroup, SWT.NONE);   
    butApply.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
    butApply.setEnabled(isEditable);
    FontData fontDatas[] = butApply.getFont().getFontData();
    FontData data = fontDatas[0];
    butApply.setFont(new Font(Display.getCurrent(), data.getName(), data.getHeight(), SWT.BOLD));
    butApply.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(final SelectionEvent e) {
       
        save();
      }
View Full Code Here

Examples of org.eclipse.swt.graphics.FontData

     
   }
  
   public SchedulerEditorFontDialog(String fontName_, int fontSize_, int fontStyle_, RGB foreGround_) {
    super();
      this.fontData = new FontData(fontName_,fontSize_,fontStyle_);
      this.foreGround = foreGround_;
   }
View Full Code Here

Examples of org.eclipse.swt.graphics.FontData

      this.foreGround = foreGround_;
   }
  
   public SchedulerEditorFontDialog(String fontName_, int fontSize_, int fontType_) {
    super();
      this.fontData = new FontData(fontName_,fontSize_,SWT.NORMAL);
    this.foreGround = new RGB(0,0,0);
   }
View Full Code Here

Examples of org.eclipse.swt.graphics.FontData

   }
  
   public SchedulerEditorFontDialog(String fontData_) {
    super();
    this.foreGround = new RGB(0,0,0);
      this.fontData = new FontData(fontData_);
   }
View Full Code Here

Examples of org.eclipse.swt.graphics.FontData

   }
  
  public void readFontData() {
    String s = Options.getProperty("script_editor_font");
    if (s == null) {
     this.fontData = new FontData("Courier New",8,SWT.NORMAL);
      }else {
         this.fontData = new FontData(s);
      }
      
    s = Options.getProperty("script_editor_font_color");
    if (s == null) s = "";
       s = s.replaceAll("RGB.*\\{(.*)\\}", "$1");
View Full Code Here

Examples of org.eclipse.swt.graphics.FontData

          FontDialog fd = new FontDialog(s, SWT.NONE);
          fd.setText("Select Font");
          fd.setRGB(t.getForeground().getRGB());
          fd.setFontList(t.getFont().getFontData());

           FontData newFont = fd.open();
          if(newFont==null)
              return;
          t.setFont(new Font(d, newFont));
          t.setForeground(new Color(d, fd.getRGB()));
         
View Full Code Here

Examples of org.eclipse.swt.graphics.FontData

        if ( value != null )
        {
            if ( value.isEmpty() )
            {
                FontData[] fontData = Display.getDefault().getSystemFont().getFontData();
                FontData fontDataBoldItalic = new FontData( fontData[0].getName(), fontData[0].getHeight(), SWT.BOLD
                    | SWT.ITALIC );
                return BrowserCommonActivator.getDefault().getFont( new FontData[]
                    { fontDataBoldItalic } );
            }
        }
        if ( attribute != null && value == null )
        {
            if ( !attribute.isConsistent() )
            {
                FontData[] fontData = Display.getDefault().getSystemFont().getFontData();
                FontData fontDataBoldItalic = new FontData( fontData[0].getName(), fontData[0].getHeight(), SWT.BOLD
                    | SWT.ITALIC );
                return BrowserCommonActivator.getDefault().getFont( new FontData[]
                    { fontDataBoldItalic } );
            }
        }
View Full Code Here

Examples of org.eclipse.swt.graphics.FontData

  }
 
  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();
View Full Code Here

Examples of org.eclipse.swt.graphics.FontData

  }

  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();
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.