Package org.eclipse.jface.resource

Examples of org.eclipse.jface.resource.FontRegistry


            eventRunner = new UiThreadEventRunner();
        }

        if ( fontRegistry == null )
        {
            fontRegistry = new FontRegistry( getWorkbench().getDisplay() );
        }

        if ( colorRegistry == null )
        {
            colorRegistry = new ColorRegistry( getWorkbench().getDisplay() );
View Full Code Here


   
    private synchronized void createFontRegistry() {
      if (fontRegistry == null) {
        DisplayUtil.syncExec(new Runnable() {
          public void run() {
            fontRegistry = new FontRegistry(getWorkbench().getDisplay());
           
                    // Forces initializations
                    fontRegistry.getItalic(""); // readOnlyFont
                    fontRegistry.getBold("");   // abstractFont
          }
View Full Code Here

    refreshDiffFonts();
    styleViewer();
  }

  private void refreshDiffFonts() {
    FontRegistry reg = PlatformUI.getWorkbench().getThemeManager()
        .getCurrentTheme().getFontRegistry();
    this.headlineFont = reg.get(THEME_DiffHeadlineFont);
  }
View Full Code Here

        // loop thru sorted list creating upgrade component tree
        for (String componentType : sortedComponentTypes) {
            // create root component type node
            TreeItem componentTypeTreeItem = new TreeItem(getTreeComponentConflicts(), SWT.NONE);
            componentTypeTreeItem.setText(componentType);
            FontRegistry registry = new FontRegistry();
            Font boldFont = registry.getBold(Display.getCurrent().getSystemFont().getFontData()[0].getName());

            componentTypeTreeItem.setFont(boldFont);
            componentTypeTreeItem.setExpanded(true);

            // loop thru each component instance and create named node
View Full Code Here

    }

    protected void handleFailureAndWarningResults() {
        DeployMessageExtractor extractor = new DeployMessageExtractor(deployResultHandler);

        FontRegistry registry = new FontRegistry();
        Font boldFont = registry.getBold(Display.getCurrent().getSystemFont().getFontData()[0].getName());

        Collection<DeployMessage> deploySuccesses = extractor.getDeploySuccesses();
        handleDeploySuccessMessages(deploySuccesses);

        Collection<DeployMessage> deployFailures = extractor.getDeployFailures();
View Full Code Here

    }

    public void updateSummaryLabel(int candidateCnt, String orgUserName) {
        if (lblSummary != null) {
            lblSummary.setText("Found " + candidateCnt + " deployment candidates");
            FontRegistry registry = new FontRegistry();
            Font boldFont = registry.getBold(Display.getCurrent().getSystemFont().getFontData()[0].getName());
            lblSummary.setFont(boldFont);
            lblSummary.update();
        }
    }
View Full Code Here

   * @param key
   * @param style
   * @return Font
   */
  public static Font getThemeFont(String key, int style) {
    FontRegistry fontRegistry = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getFontRegistry();
    if (fontRegistry != null) {
      if (style == SWT.NORMAL)
        return fontRegistry.get(key);
      else if ((style & SWT.BOLD) != 0)
        return fontRegistry.getBold(key);
      else if ((style & SWT.ITALIC) != 0)
        return fontRegistry.getItalic(key);
    }

    return getFont(key);
  }
View Full Code Here

  @SuppressWarnings("restriction")
  public static void zoomNewsText(boolean zoomIn, boolean reset) {

    /* Retrieve Font */
    ITheme theme = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme();
    FontRegistry registry = theme.getFontRegistry();
    FontData[] oldFontDatas = registry.getFontData(NEWS_TEXT_FONT_ID);
    FontData[] newFontDatas = new FontData[oldFontDatas.length];

    /* Set Height */
    for (int i = 0; i < oldFontDatas.length; i++) {
      FontData oldFontData = oldFontDatas[i];
      int oldHeight = oldFontData.getHeight();

      if (reset)
        newFontDatas[i] = new FontData(oldFontData.getName(), DEFAULT_NEWS_TEXT_FONT_HEIGHT, oldFontData.getStyle());
      else
        newFontDatas[i] = new FontData(oldFontData.getName(), zoomIn ? oldHeight + 1 : Math.max(oldHeight - 1, 0), oldFontData.getStyle());
    }

    registry.put(NEWS_TEXT_FONT_ID, newFontDatas);

    /* Store in Preferences */
    String key = org.eclipse.ui.internal.themes.ThemeElementHelper.createPreferenceKey(theme, NEWS_TEXT_FONT_ID);
    String fdString = PreferenceConverter.getStoredRepresentation(newFontDatas);
    String storeString = org.eclipse.ui.internal.util.PrefUtil.getInternalPreferenceStore().getString(key);
View Full Code Here

  theGriddata.horizontalSpan = 7;
  myMonitorOutput.setLayoutData(theGriddata);
  myMonitorOutput.setEditable(false);
  IThemeManager themeManager = PlatformUI.getWorkbench().getThemeManager();
  ITheme currentTheme = themeManager.getCurrentTheme();
  FontRegistry fontRegistry = currentTheme.getFontRegistry();
  myMonitorOutput.setFont(fontRegistry.get("it.baeyens.serial.fontDefinition"));
  myMonitorOutput.setText("Currently there are no serial ports registered - please use the + button to add a port to the monitor.");

  myparent.getShell().setDefaultButton(mySendButton);
  makeActions();
  contributeToActionBars();
View Full Code Here

            this.exceptionHandler = new ExceptionHandler();
        }

        if ( this.fontRegistry == null )
        {
            this.fontRegistry = new FontRegistry( this.getWorkbench().getDisplay() );
        }
        if ( this.colorRegistry == null )
        {
            this.colorRegistry = new ColorRegistry( this.getWorkbench().getDisplay() );
        }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.resource.FontRegistry

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.