Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.Font


 
  @Override
  public Font getFont(Object element) {
    for (IBaseLabelProvider p : providers) {
      if (p instanceof IFontProvider) {
        Font font = ((IFontProvider) p).getFont(element);
        if (font != null) {
          return font;
        }
      }
    }
View Full Code Here


      } catch (Throwable e) {
        System.err.println("Unable to set underline or strikeout" + " (probably on a non-Windows platform). "
            + e);
      }
    }
    Font font = new Font(Display.getDefault(), fd);
    resources.put(fontName, font);
    return font;
  }
View Full Code Here

        // Change the font
        FontData[] fontData = filterLabel.getFont().getFontData();
        fontData[0].setStyle(SWT.BOLD);
        //fontData[0].setHeight(fontData[0].getHeight() + 1);
        filterLabel.setFont(new Font(textPanel.getDisplay(), fontData));

        // Set the layout for the label
        GridData filterLabelLayout = new GridData();
        filterLabelLayout.horizontalAlignment = GridData.BEGINNING;
        filterLabelLayout.verticalAlignment = GridData.CENTER;
View Full Code Here

        // Change the font
        FontData[] fontData = priorityLabel.getFont().getFontData();
        fontData[0].setStyle(SWT.BOLD);
        //fontData[0].setHeight(fontData[0].getHeight() + 1);
        priorityLabel.setFont(new Font(priorityPanel.getDisplay(), fontData));

        // Set the layout for the label
        GridData priorityLabelLayout = new GridData();
        priorityLabelLayout.horizontalAlignment = GridData.BEGINNING;
        priorityLabelLayout.verticalAlignment = GridData.CENTER;
        priorityLabelLayout.horizontalSpan = 2;
        priorityLabel.setLayoutData(priorityLabelLayout);

        // Create the slider widget to control priority filtering
        Slider prioritySlider = new Slider(priorityPanel, SWT.HORIZONTAL);
        prioritySlider.setValues(0, 0, 100, 10, 1, 25);
        GlazedListsSWT.lowerThresholdViewer(priorityList, prioritySlider);
        GridData prioritySliderLayout = new GridData();
        prioritySliderLayout.horizontalAlignment = GridData.FILL;
        prioritySliderLayout.verticalAlignment = GridData.BEGINNING;
        prioritySliderLayout.horizontalSpan = 2;
        prioritySliderLayout.grabExcessHorizontalSpace = true;
        prioritySliderLayout.grabExcessVerticalSpace = false;
        prioritySlider.setLayoutData(prioritySliderLayout);

        // Create the lower end Label
        Label lowPriorityLabel = new Label(priorityPanel, SWT.HORIZONTAL | SWT.SHADOW_NONE | SWT.CENTER);
        lowPriorityLabel.setText("Low");

        // Change the font to bold
        FontData[] lowerEndFontData = lowPriorityLabel.getFont().getFontData();
        lowerEndFontData[0].setStyle(SWT.BOLD);
        lowPriorityLabel.setFont(new Font(priorityPanel.getDisplay(), lowerEndFontData));

        // Set the layout for the label
        GridData lowPriorityLabelLayout = new GridData();
        lowPriorityLabelLayout.horizontalAlignment = GridData.BEGINNING;
        lowPriorityLabelLayout.verticalAlignment = GridData.CENTER;
        lowPriorityLabel.setLayoutData(lowPriorityLabelLayout);

        // Create the higher end Label
        Label highPriorityLabel = new Label(priorityPanel, SWT.HORIZONTAL | SWT.SHADOW_NONE | SWT.CENTER);
        highPriorityLabel.setText("High");

        // Change the font to bold
        FontData[] higherEndFontData = highPriorityLabel.getFont().getFontData();
        higherEndFontData[0].setStyle(SWT.BOLD);
        highPriorityLabel.setFont(new Font(priorityPanel.getDisplay(), higherEndFontData));

        // Set the layout for the label
        GridData highPriorityLabelLayout = new GridData();
        highPriorityLabelLayout.horizontalAlignment = GridData.END;
        highPriorityLabelLayout.verticalAlignment = GridData.CENTER;
View Full Code Here

        // Change the font
        FontData[] fontData = usersListLabel.getFont().getFontData();
        fontData[0].setStyle(SWT.BOLD);
        //fontData[0].setHeight(fontData[0].getHeight() + 1);
        usersListLabel.setFont(new Font(usersListPanel.getDisplay(), fontData));

        // Set the layout for the label
        GridData usersListLabelLayout = new GridData();
        usersListLabelLayout.horizontalAlignment = GridData.BEGINNING;
        usersListLabelLayout.verticalAlignment = GridData.BEGINNING;
View Full Code Here

        private void formatDescription(Description description, int rowOffset) {
            // Print the user name
            TableItem userName = new TableItem(descriptionsTable, SWT.LEFT, rowOffset);
            FontData[] userNameFontData = userName.getFont().getFontData();
            userNameFontData[ 0 ].setStyle(SWT.BOLD);
            Font userNameFont = new Font(descriptionsTable.getDisplay(), userNameFontData);
            userName.setFont(userNameFont);
            userName.setText(description.getWho() + ":");
            rowOffset++;

            // Print the details on several lines if necessary
View Full Code Here

        compositeStyleInfo.setLayout(new RowLayout(SWT.VERTICAL));
        compositeStyleInfo.setLayoutData(new RowData(180, 160));
                       
        Label lblStyleName = new Label (compositeStyleInfo, SWT.HORIZONTAL | SWT.BOLD);
        lblStyleName.setText(Messages.Wizard_CloudMade_PreviewName);
        Font boldFont = JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT);
        lblStyleName.setFont(boldFont);
       
        lblStyleNameValue = new Label (compositeStyleInfo, SWT.HORIZONTAL);
        lblStyleNameValue.setText(""); //$NON-NLS-1$
       
View Full Code Here

        text.setText("Here you can load a TMS tiles folder that was exported with the Spatial Toolbox and the JGrasstools tiler.");
        // endregion

        Label lblUrl = new Label(control, SWT.HORIZONTAL | SWT.BOLD);
        lblUrl.setText("Select the tiles file definition (*.mapurl)");
        Font boldFont = JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT);
        lblUrl.setFont(boldFont);
        GridData lblUrlGD = new GridData(SWT.FILL, SWT.FILL, true, false);
        lblUrlGD.horizontalSpan = 2;
        lblUrl.setLayoutData(lblUrlGD);

View Full Code Here

       
        //region URL
        Label lblUrl = new Label (control, SWT.HORIZONTAL | SWT.BOLD);
        lblUrl.setText(Messages.Wizard_CS_Url);
       
        Font boldFont = JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT);
        lblUrl.setFont(boldFont);
       
        txtUrl = new Text (control, SWT.BORDER);
        txtUrl.setLayoutData(new RowData(380, 20));
        txtUrl.setText(Messages.Wizard_CS_UrlDefault);
View Full Code Here

            listener.selectionChanged(event);
        }
    }

    public void createControl(Composite ancestor) {
        Font font = ancestor.getFont();
        Composite parent= SWTFactory.createComposite(ancestor, font, 2, 1, GridData.FILL_BOTH);
        fControl = parent;

        SWTFactory.createLabel(parent, "Installed Drools Runtimes", 2);
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.