Tabnine Logo
FontDialog.setFontList
Code IndexAdd Tabnine to your IDE (free)

How to use
setFontList
method
in
org.eclipse.swt.widgets.FontDialog

Best Java code snippets using org.eclipse.swt.widgets.FontDialog.setFontList (Showing top 18 results out of 315)

origin: pentaho/pentaho-kettle

 public void widgetSelected( SelectionEvent arg0 ) {
  FontDialog fd = new FontDialog( shell );
  fd.setFontList( new FontData[] { fixedFontData } );
  FontData newfd = fd.open();
  if ( newfd != null ) {
   fixedFontData = newfd;
   fixedFont.dispose();
   fixedFont = new Font( display, fixedFontData );
   wFFont.redraw();
  }
 }
} );
origin: pentaho/pentaho-kettle

 public void widgetSelected( SelectionEvent arg0 ) {
  FontDialog fd = new FontDialog( shell );
  fd.setFontList( new FontData[] { graphFontData } );
  FontData newfd = fd.open();
  if ( newfd != null ) {
   graphFontData = newfd;
   graphFont.dispose();
   graphFont = new Font( display, graphFontData );
   wGFont.redraw();
  }
 }
} );
origin: pentaho/pentaho-kettle

 public void widgetSelected( SelectionEvent arg0 ) {
  FontDialog fd = new FontDialog( shell );
  fd.setFontList( new FontData[] { noteFontData } );
  FontData newfd = fd.open();
  if ( newfd != null ) {
   noteFontData = newfd;
   noteFont.dispose();
   noteFont = new Font( display, noteFontData );
   wNFont.redraw();
  }
 }
} );
origin: org.eclipse.platform/org.eclipse.swt.examples

FontData[] fontDatum = toolSettings.commonFont.getFontData();
if (fontDatum != null && fontDatum.length > 0) {
  fontDialog.setFontList(fontDatum);
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

  @Override
  public void widgetSelected(SelectionEvent event) {
    FontDialog fontDialog = new FontDialog(changeFontButton
        .getShell());
    if (chosenFont != null) {
      fontDialog.setFontList(chosenFont);
    }
    FontData font = fontDialog.open();
    if (font != null) {
      FontData[] oldFont = chosenFont;
      if (oldFont == null) {
        oldFont = JFaceResources.getDefaultFont()
            .getFontData();
      }
      setPresentsDefaultValue(false);
      FontData[] newData = new FontData[1];
      newData[0] = font;
      updateFont(newData);
      fireValueChanged(VALUE, oldFont[0], font);
    }
  }
});
origin: org.eclipse.rap/org.eclipse.rap.jface

  public void widgetSelected(SelectionEvent event) {
    FontDialog fontDialog = new FontDialog(changeFontButton
        .getShell());
    if (chosenFont != null) {
      fontDialog.setFontList(chosenFont);
    }
    FontData font = fontDialog.open();
    if (font != null) {
      FontData[] oldFont = chosenFont;
      if (oldFont == null) {
        oldFont = JFaceResources.getDefaultFont()
            .getFontData();
      }
      setPresentsDefaultValue(false);
      FontData[] newData = new FontData[1];
      newData[0] = font;
      updateFont(newData);
      fireValueChanged(VALUE, oldFont[0], font);
    }
  }
});
origin: org.eclipse.platform/org.eclipse.jface

FontDialog fontDialog = new FontDialog(changeFontButton.getShell());
if (chosenFont != null) {
  fontDialog.setFontList(chosenFont);
origin: org.eclipse.platform/org.eclipse.ui.workbench

/**
 * Edit the given font.
 *
 * @param definition
 *            the font definition
 * @param display
 *            the display to open the dialog on
 * @since 3.7
 */
private void editFont(FontDefinition definition, Display display) {
  if (definition != null) {
    final FontDialog fontDialog = new FontDialog(getShell());
    fontDialog.setEffectsVisible(false);
    fontDialog.setFontList(getFontValue(definition));
    final FontData data = fontDialog.open();
    if (data != null) {
      setFontPreferenceValue(definition, fontDialog.getFontList(), false);
      refreshElement(definition);
    }
  }
}
origin: org.eclipse.platform/org.eclipse.swt.examples

FontDialog dialog = new FontDialog (shell, style);
if (usePreviousResultButton.getSelection()) {
  dialog.setFontList (fontDialogFontListResult);
  dialog.setRGB(fontDialogColorResult);
origin: org.eclipse.mylyn.commons/screenshots

public void invokeFontDialog() {
  FontData fontData = new FontData(stringCustom);
  FontDialog fontWindow = new FontDialog(parent.getShell());
  fontWindow.setFontList(new FontData[] { fontData });
  fontWindow.setRGB(int2rgb(intgerCustom));
  fontData = fontWindow.open();
  if (fontData != null) {
    intgerCustom = rgb2int(fontWindow.getRGB());
    stringCustom = fontData.toString();
    toolButton.setToolTipText(font2string(fontData));
    clickBody();
  }
}
origin: org.xworker/xworker_swt

FontData fontData = UtilSwt.parseFontData(text.getText());
if(fontData != null){
  dialog.setFontList(new FontData[]{fontData});
origin: net.sf.okapi.lib/okapi-lib-verification-ui

private void selectFont () {
  try {
    FontDialog dlg = new FontDialog(dialog);
    dlg.setText("Select Font");
    // Set current font and color info
    dlg.setFontList(opt.font.getFontData());
    dlg.setRGB(opt.foreground.getRGB());
    // Open the dialog
    FontData fontData = dlg.open();
    if ( fontData == null) return;
    
    // If not canceled by user: We assign the new font
    // Work around: For some reason disposing of the font before calling edExample.setFont()
    // with the new font is causing an invalid argument exception. So we defer the dispose.
    Font tmp = opt.font; 
    opt.font = new Font(device, fontData);
    edExample.setFont(opt.font);
    tmp.dispose();
    // And the new new color
    opt.foreground.dispose();
    opt.foreground = new Color(device, dlg.getRGB());
    updateExample();
  }
  catch ( Throwable e ) {
    Dialogs.showError(dialog, e.getLocalizedMessage(), null);
  }
}
origin: net.sf.okapi.lib/okapi-lib-verification-ui

private void selectFont () {
  try {
    FontDialog dlg = new FontDialog(getShell());
    dlg.setText("Select Font");
    // Set current font and color info
    dlg.setFontList(opt.font.getFontData());
    dlg.setRGB(opt.foreground.getRGB());
    // Open the dialog
    FontData fontData = dlg.open();
    if ( fontData == null) return;
    
    // If not canceled by user: We assign the new font
    // Work around: For some reason disposing of the font before calling edExample.setFont()
    // with the new font is causing an invalid argument exception. So we defer the dispose.
    Font tmp = opt.font; 
    opt.font = new Font(getDisplay(), fontData);
    edExample.setFont(opt.font);
    tmp.dispose();
    // And the new new color
    opt.foreground.dispose();
    opt.foreground = new Color(getDisplay(), dlg.getRGB());
    edExample.setForeground(opt.foreground);
  }
  catch ( Throwable e ) {
    Dialogs.showError(getShell(), e.getLocalizedMessage(), null);
  }
}
origin: org.eclipse.platform/org.eclipse.swt.examples

Font oldFont = itemFont;
if (oldFont == null) oldFont = tabFolder1.getItem (0).getFont ();
fontDialog.setFontList(oldFont.getFontData());
FontData fontData = fontDialog.open ();
if (fontData == null) return;
origin: org.eclipse.platform/org.eclipse.swt.examples

  if (controls.length > 0) oldFont = controls [0].getFont ();
if (oldFont != null) fontDialog.setFontList(oldFont.getFontData()); // seed dialog with current font
FontData fontData = fontDialog.open ();
if (fontData == null) return;
origin: org.eclipse.platform/org.eclipse.swt.examples

Font oldFont = itemFont;
if (oldFont == null) oldFont = textNode1.getFont ();
fontDialog.setFontList(oldFont.getFontData());
FontData fontData = fontDialog.open ();
if (fontData == null) return;
Font oldFont = cellFont;
if (oldFont == null) oldFont = textNode1.getFont (1);
fontDialog.setFontList(oldFont.getFontData());
FontData fontData = fontDialog.open ();
if (fontData == null) return;
origin: org.eclipse.platform/org.eclipse.swt.examples

Font oldFont = itemFont;
if (oldFont == null) oldFont = table1.getItem (0).getFont ();
fontDialog.setFontList(oldFont.getFontData());
FontData fontData = fontDialog.open ();
if (fontData == null) return;
Font oldFont = cellFont;
if (oldFont == null) oldFont = table1.getItem (0).getFont (1);
fontDialog.setFontList(oldFont.getFontData());
FontData fontData = fontDialog.open ();
if (fontData == null) return;
origin: org.eclipse.platform/org.eclipse.swt.examples

setFontItem.addSelectionListener(widgetSelectedAdapter(event -> {
  FontDialog fontDialog = new FontDialog(shell);
  fontDialog.setFontList(styledText.getFont().getFontData());
  FontData data = fontDialog.open();
  if (data != null) {
org.eclipse.swt.widgetsFontDialogsetFontList

Javadoc

Sets the set of FontData objects describing the font to be selected by default in the dialog, or null to let the platform choose one.

Popular methods of FontDialog

  • <init>
    Constructs a new instance of this class given its parent and a style value describing its behavior a
  • open
    Makes the dialog visible and brings it to the front of the display.
  • checkStyle
  • checkSubclass
  • getRGB
    Returns an RGB describing the color that was selected in the dialog, or null if none is available.
  • setRGB
    Sets the RGB describing the color to be selected by default in the dialog, or null to let the platfo
  • setText
  • getFontList
    Returns a FontData set describing the font that was selected in the dialog, or null if none is avail
  • gtk_font_chooser_dialog_new
  • gtk_font_chooser_get_font
  • gtk_font_chooser_set_font
  • error
  • gtk_font_chooser_set_font,
  • error,
  • setEffectsVisible,
  • ShowDialog,
  • addChangeListeners,
  • changeFont,
  • checkOperationMode,
  • convertHorizontalDLUsToPixels,
  • createButton

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSupportFragmentManager (FragmentActivity)
  • getContentResolver (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Notification (javax.management)
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now