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

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

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

origin: org.eclipse.rap/org.eclipse.rap.rwt

/**
 * Constructs a new instance of this class given its parent and a style value
 * describing its behavior and appearance.
 * <p>
 * The style value is either one of the style constants defined in class
 * <code>SWT</code> which is applicable to instances of this class, or must be
 * built by <em>bitwise OR</em>'ing together (that is, using the
 * <code>int</code> "|" operator) two or more of those <code>SWT</code> style
 * constants. The class description lists the style constants that are
 * applicable to the class. Style bits are also inherited from superclasses.
 * </p>
 *
 * @param parent a shell which will be the parent of the new instance
 * @param style the style of dialog to construct
 * @exception IllegalArgumentException <ul>
 *              <li>ERROR_NULL_ARGUMENT - if the parent is null</li>
 *              </ul>
 * @exception SWTException <ul>
 *              <li>ERROR_THREAD_INVALID_ACCESS - if not called from the
 *              thread that created the parent</li>
 *              <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed
 *              subclass</li>
 *              </ul>
 */
public FontDialog( Shell parent, int style ) {
 super( parent, checkStyle( parent, style ) );
 checkSubclass();
 setText( RWTMessages.getMessage( "RWT_FontDialogTitle" ) );
}
origin: org.eclipse.platform/org.eclipse.swt.examples

  fontDialog.setFontList(fontDatum);
fontDialog.setText(getResourceString("options.Font.dialog.title"));
origin: org.eclipse.platform/org.eclipse.swt.examples

dialog.setText (ControlExample.getResourceString("Title"));
FontData result = dialog.open ();
textWidget.append (ControlExample.getResourceString("FontDialog") + Text.DELIMITER);
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: org.xworker/xworker_swt

final FontDialog dialog = new FontDialog(shell);
if(self.getStringBlankAsNull("text") != null){
  dialog.setText(self.getString("text"));
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);
  }
}
org.eclipse.swt.widgetsFontDialogsetText

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
  • 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

  • Updating database using SQL prepared statement
  • putExtra (Intent)
  • setRequestProperty (URLConnection)
  • startActivity (Activity)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • BoxLayout (javax.swing)
  • JFrame (javax.swing)
  • Top 12 Jupyter Notebook extensions
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