Package org.eclipse.jface.resource

Examples of org.eclipse.jface.resource.FontRegistry


     */
    public void propertyChange(org.eclipse.core.runtime.Preferences.PropertyChangeEvent event) {
      if (event.getProperty().equals(ClientPlugin.PREF_CHAT_FONT)) {
        final String fontName = ClientPlugin.getDefault().getPluginPreferences().getString(ClientPlugin.PREF_CHAT_FONT);
        if (!(fontName == null) && !(fontName.equals(""))) { //$NON-NLS-1$
          final FontRegistry fr = ClientPlugin.getDefault().getFontRegistry();
          final FontData[] newFont = {new FontData(fontName)};

          fr.put(CHAT_OUTPUT_FONT, newFont);
          textoutput.setFont(fr.get(CHAT_OUTPUT_FONT));
        }
      }
    }
View Full Code Here


    textoutput = createStyledTextWidget(chattingComposite);
    textoutput.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    final String fontName = ClientPlugin.getDefault().getPluginPreferences().getString(ClientPlugin.PREF_CHAT_FONT);
    if (!(fontName == null) && !(fontName.equals(""))) { //$NON-NLS-1$
      final FontRegistry fr = ClientPlugin.getDefault().getFontRegistry();
      final FontData[] newFont = {new FontData(fontName)};

      fr.put(CHAT_OUTPUT_FONT, newFont);
      textoutput.setFont(fr.get(CHAT_OUTPUT_FONT));
    }

    ClientPlugin.getDefault().getPluginPreferences().addPropertyChangeListener(new FontPropertyChangeListener());

    textoutput.append(initText);
View Full Code Here

   * The constructor.
   */
  public ClientPlugin() {
    super();
    plugin = this;
    this.fontRegistry = new FontRegistry();
  }
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.