Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.Font


    /* (non-Javadoc)
     * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
     */
    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


     */
    protected Control createDialogArea(Composite parent) {
        // page group
        Composite composite = (Composite) super.createDialogArea(parent);

        Font font = parent.getFont();
        composite.setFont(font);

        createMessageArea(composite);

        viewer = new ListViewer(composite, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
View Full Code Here

        Label label = new Label(commonPanel, SWT.NONE);
        label.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
        label.setText("Feel free to support " + pluginName+ " plugin in the way you like:");

        Font font = JFaceResources.getFontRegistry().getBold(
                JFaceResources.getDialogFont().getFontData()[0].getName());

        Link link = new Link(commonPanel, SWT.NONE);
        link.setFont(font);
        link.setText(" - <a>visit homepage</a>");
View Full Code Here

    FontData[] fontData = font.getFontData();
    for (int i = 0; i < fontData.length; i++) {
      fontData[i].setHeight(size);
      fontData[i].setStyle(style);
    }
    return new Font(device, fontData);   
  }
View Full Code Here

        titleLabel.setForeground(shell.getForeground());
        FontData[] fds = shell.getFont().getFontData();
        for (int i = 0; i < fds.length; i++) {
          fds[i].setStyle(fds[i].getStyle() | SWT.BOLD);
        }
        final Font font = new Font(shell.getDisplay(), fds);
        titleLabel.addListener(SWT.Dispose, new Listener() {
          public void handleEvent(Event event) {
            font.dispose();
          }
        });
        titleLabel.setFont(font);
        selectionControls.add(titleLabel);
      }
View Full Code Here

    dialog.setClipBoard(true);
   
    SchedulerEditorFontDialog fd = new SchedulerEditorFontDialog();
      fd.readFontData();
       dialog.getStyledText().setFont(new Font(null, fd.getFontData()));
      dialog.getStyledText().setForeground(new Color(null, fd.getForeGround()));


    dialog.getStyledText().setEditable(bApply);   
    dialog.setVisibleApplyButton(bApply);   
View Full Code Here

        if(elem.getAttributes().size()>0)
          isBold = true;
      }
    }

    Font font = null;
    if(isBold){
      font = new Font(Display.getCurrent(), data.getName(), data.getHeight(), SWT.BOLD);           
    } else {     
      font = new Font(Display.getCurrent(), data.getName(), data.getHeight(), SWT.NONE);

    }
    item.setFont(font);

  }
View Full Code Here

      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

    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

          }
        });
    }

    private void setFont(FontData f, RGB foreGround) {
       tSource.setFont(new Font(this.getDisplay(), f));
       tSource.setForeground(new Color(this.getDisplay(), foreGround));   
       }
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.