Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.Font


        }
    }


    public Font getFont(Object element, int columnIndex) {
        Font font = Display.getCurrent().getFocusControl().getFont();
        if (columnIndex == 1) {
            font = new Font(Display.getCurrent(), new FontData("Arial", 10, SWT.NORMAL));
        }
        return font;
    }
View Full Code Here


    lHeader.setForeground(d.getSystemColor(SWT.COLOR_LIST_SELECTION_TEXT));
    FontData[] fontData = lHeader.getFont().getFontData();
    fontData[0].setStyle(SWT.BOLD);
    int fontHeight = (int)(fontData[0].getHeight() * 1.2);
    fontData[0].setHeight(fontHeight);
    headerFont = new Font(d, fontData);
    lHeader.setFont(headerFont);
    lHeader.setText( " " + MessageText.getString( "authenticator.torrent" ) + " : " + download_manager.getDisplayName().replaceAll("&", "&&"));
    gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_CENTER);
    lHeader.setLayoutData(gridData);
   
View Full Code Here

      descriptionLabel.setLayoutData(labelData);

      /*
       * Change the font to be italic for the description
       */
      Font initialFont = descriptionLabel.getFont();
      FontData[] fontData = initialFont.getFontData();
      for (int i = 0; i < fontData.length; i++) {
        fontData[i].setStyle(fontData[i].getStyle() | SWT.ITALIC);
      }
      descriptionLabel.setFont(new Font(getDisplay(), fontData));

    }

    if ((this.style & SHOW_EXPANDED) != 0) {
      isCollapsed = false;
View Full Code Here

    lHeader.setForeground(d.getSystemColor(SWT.COLOR_LIST_SELECTION_TEXT));
    FontData[] fontData = lHeader.getFont().getFontData();
    fontData[0].setStyle(SWT.BOLD);
    int fontHeight = (int)(fontData[0].getHeight() * 1.2);
    fontData[0].setHeight(fontHeight);
    headerFont = new Font(d, fontData);
    lHeader.setFont(headerFont);
   
    if ( managers.length == 1 ){
      lHeader.setText( " " + MessageText.getString( "authenticator.torrent" ) + " : " + managers[0].getDisplayName().replaceAll("&", "&&"));
    }else{
View Full Code Here

       
        FontData[] fontData = _toolbarLblProject.getFont().getFontData();
        for(int i = 0; i < fontData.length; ++i) {
            fontData[i].setStyle(SWT.BOLD);
        }
        final Font newFont = new Font(getSite().getShell().getDisplay(), fontData);
        _toolbarLblProject.setFont(newFont);
        _toolbarLblProject.addDisposeListener(new DisposeListener() {
            public void widgetDisposed(DisposeEvent e) {
                newFont.dispose();
            }
        });
       
        _toolbarLblLocation = new Label(leftComp, SWT.NONE);
       
View Full Code Here

        if (element instanceof String) {
            FontData[] fds = JFaceResources.getFontRegistry().defaultFont().getFontData();
            for (FontData data : fds) {
                data.setStyle(SWT.BOLD);
            }
            return new Font(Display.getCurrent(), fds);
        }
        return null;
    }
View Full Code Here

  public void init (Shell parentShell) {
    shell = ShellFactory.createShell(parentShell, SWT.BORDER | SWT.TITLE | SWT.CLOSE | SWT.RESIZE);
    Utils.setShellIcon(shell);
    if(Constants.isOSX)
      monospace = new Font(shell.getDisplay(),"Courier",12,SWT.NORMAL);
    else
      monospace = new Font(shell.getDisplay(),"Courier New",8,SWT.NORMAL);
 
    shell.setText(MessageText.getString("window.welcome.title", new String[]{ Constants.AZUREUS_VERSION }));
   
    display = shell.getDisplay();
   
View Full Code Here

    FontData[] fontData = lstLanguage.getFont().getFontData();
    for (int i = 0; i < fontData.length; i++) {
      if (fontData[i].getHeight() < 10)
        fontData[i].setHeight(10);
    }
    final Font font = new Font(rootPanel.getDisplay(), fontData);
    lstLanguage.setFont(font);

    lstLanguage.getShell().addListener(SWT.Show, new Listener() {
      public void handleEvent(Event event) {
        lstLanguage.showSelection();
      }
    });

    lstLanguage.addDisposeListener(new DisposeListener() {
      public void widgetDisposed(DisposeEvent e) {
        if (font != null && !font.isDisposed())
          font.dispose();
      }
    });
  }
View Full Code Here

   
    final Composite composite = new Composite(viewComposite,SWT.BORDER);
    composite.setBackgroundMode(SWT.INHERIT_DEFAULT);
    composite.setBackground(ColorCache.getColor(composite.getDisplay(), "#F1F9F8"));
   
    Font font = composite.getFont();
    FontData fDatas[] = font.getFontData();
    for(int i = 0 ; i < fDatas.length ; i++) {
      fDatas[i].setHeight(150 * fDatas[i].getHeight() / 100);
      if(Constants.isWindows) {
        fDatas[i].setStyle(SWT.BOLD);
      }
    }
   
    textFont1 = new Font(composite.getDisplay(),fDatas);
   
    fDatas = font.getFontData();
    for(int i = 0 ; i < fDatas.length ; i++) {
      fDatas[i].setHeight(120 * fDatas[i].getHeight() / 100);
    }
   
    textFont2 = new Font(composite.getDisplay(),fDatas);
   
    Label preText = new Label(composite,SWT.NONE);
    preText.setForeground(ColorCache.getColor(composite.getDisplay(), "#6D6F6E"));
    preText.setFont(textFont1);
    preText.setText(MessageText.getString("subscriptions.view.help.1"));
View Full Code Here

    FontData[] fDatas = shell.getFont().getFontData();
   
    for(int i = 0 ; i < fDatas.length ; i++) {
      fDatas[i].setStyle(SWT.BOLD);
    }
    boldFont = new Font(display,fDatas);
   
   
    for(int i = 0 ; i < fDatas.length ; i++) {
      if(org.gudy.azureus2.core3.util.Constants.isOSX) {
        fDatas[i].setHeight(12);
      } else {
        fDatas[i].setHeight(10);
      }
    }
    subTitleFont = new Font(display,fDatas);
   
    for(int i = 0 ; i < fDatas.length ; i++) {
      if(org.gudy.azureus2.core3.util.Constants.isOSX) {
        fDatas[i].setHeight(17);
      } else {
        fDatas[i].setHeight(14);
      }
    }
    titleFont = new Font(display,fDatas);
   
   
    for(int i = 0 ; i < fDatas.length ; i++) {
      if(org.gudy.azureus2.core3.util.Constants.isOSX) {
        fDatas[i].setHeight(14);
      } else {
        fDatas[i].setHeight(12);
      }
      fDatas[i].setStyle(SWT.NONE);
    }
    textInputFont = new Font(display,fDatas)
  }
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.