congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
FontDialog.getFontList
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.xworker/xworker_swt

@Override
public void dialogClosed(int returnCode) {
  if(returnCode == SWT.OK) {
    FontData[] fds = dialog.getFontList();
    if(fds != null && fds.length > 0) {
      self.doAction("open", actionContext, UtilMap.toMap("font", fds[0]));
    }else {
      self.doAction("open", actionContext, UtilMap.toMap("font", null));
    }
  }else {
    self.doAction("open", actionContext, "color", null);
  }
}
 
origin: org.xworker/xworker_swt

@Override
public void dialogClosed(int returnCode) {
  FontData[] list = dialog.getFontList();
  if(list != null && list.length > 0){
    FontData fontData = list[0];
    String fontStr = fontData.getName() + "|" + fontData.getHeight() + "|" + fontData.getStyle();
    if(dialog.getRGB() != null){
      fontStr = fontStr + "|" + UtilSwt.RGBToString(dialog.getRGB());
    }
    //fontStr = fontStr;
    text.setText(fontStr);
    ///UtilSwt.setFont(text, text.getText(), null);
  }
  text.setFocus();
}
 
origin: org.eclipse.platform/org.eclipse.swt.examples

textWidget.append (ControlExample.getResourceString("Result", "" + result) + Text.DELIMITER);
textWidget.append ("getFontList() =" + Text.DELIMITER);
FontData [] fonts = dialog.getFontList ();
if (fonts != null) {
  for (FontData font : fonts) {
fontDialogFontListResult = dialog.getFontList ();
fontDialogColorResult = dialog.getRGB();
return;
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);
    }
  }
}
org.eclipse.swt.widgetsFontDialoggetFontList

Javadoc

Returns a FontData set describing the font that was selected in the dialog, or null if none is available.

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.
  • setFontList
    Sets the set of FontData objects describing the font to be selected by default in the dialog, or nul
  • 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
  • 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

  • Start an intent from android
  • compareTo (BigDecimal)
  • setScale (BigDecimal)
  • getSystemService (Context)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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