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

How to use
FontChooserPanel
in
org.jfree.ui

Best Java code snippets using org.jfree.ui.FontChooserPanel (Showing top 16 results out of 315)

origin: jfree/jcommon

/**
 * Returns the selected font.
 *
 * @return the font.
 */
public Font getSelectedFont() {
  return this.fontChooserPanel.getSelectedFont();
}
origin: jfree/jcommon

/**
 * Returns a Font object representing the selection in the panel.
 *
 * @return the font.
 */
public Font getSelectedFont() {
  return new Font(getSelectedName(), getSelectedStyle(),
      getSelectedSize());
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Presents a font selection dialog to the user.
 */
private void attemptLabelFontSelection() {
  FontChooserPanel panel = new FontChooserPanel(this.labelFont);
  int result = JOptionPane.showConfirmDialog(this, panel,
    localizationResources.getString("Font_Selection"),
    JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
  if (result == JOptionPane.OK_OPTION) {
    this.labelFont = panel.getSelectedFont();
    this.labelFontField.setText(
      this.labelFont.getFontName() + " " + this.labelFont.getSize()
    );
  }
}
origin: jfree/jcommon

final String[] fonts = g.getAvailableFontFamilyNames();
setLayout(new BorderLayout());
final JPanel right = new JPanel(new BorderLayout());
fontpane.setBorder(BorderFactory.createEtchedBorder());
fontPanel.add(fontpane);
add(fontPanel);
right.add(attributes, BorderLayout.SOUTH);
add(right, BorderLayout.EAST);
setSelectedFont(font);
origin: jfree/jcommon

/**
 * Returns the panel that is the user interface.
 *
 * @param font  the font.
 *
 * @return the panel.
 */
private JPanel createContent(Font font) {
  final JPanel content = new JPanel(new BorderLayout());
  content.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
  if (font == null) {
    font = new Font("Dialog", 10, Font.PLAIN);
  }
  this.fontChooserPanel = new FontChooserPanel(font);
  content.add(this.fontChooserPanel);
  final JPanel buttons = createButtonPanel();
  buttons.setBorder(BorderFactory.createEmptyBorder(4, 0, 0, 0));
  content.add(buttons, BorderLayout.SOUTH);
  return content;
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Presents a tick label font selection dialog to the user.
 */
public void attemptTickLabelFontSelection() {
  FontChooserPanel panel = new FontChooserPanel(this.tickLabelFont);
  int result = JOptionPane.showConfirmDialog(this, panel,
    localizationResources.getString("Font_Selection"),
    JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
  if (result == JOptionPane.OK_OPTION) {
    this.tickLabelFont = panel.getSelectedFont();
    this.tickLabelFontField.setText(
      this.tickLabelFont.getFontName() + " "
      + this.tickLabelFont.getSize()
    );
  }
}
origin: org.jfree/com.springsource.org.jfree

final String[] fonts = g.getAvailableFontFamilyNames();
setLayout(new BorderLayout());
final JPanel right = new JPanel(new BorderLayout());
fontpane.setBorder(BorderFactory.createEtchedBorder());
fontPanel.add(fontpane);
add(fontPanel);
right.add(attributes, BorderLayout.SOUTH);
add(right, BorderLayout.EAST);
setSelectedFont(font);
origin: org.jfree/jcommon

/**
 * Returns the panel that is the user interface.
 *
 * @param font  the font.
 *
 * @return the panel.
 */
private JPanel createContent(Font font) {
  final JPanel content = new JPanel(new BorderLayout());
  content.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
  if (font == null) {
    font = new Font("Dialog", 10, Font.PLAIN);
  }
  this.fontChooserPanel = new FontChooserPanel(font);
  content.add(this.fontChooserPanel);
  final JPanel buttons = createButtonPanel();
  buttons.setBorder(BorderFactory.createEmptyBorder(4, 0, 0, 0));
  content.add(buttons, BorderLayout.SOUTH);
  return content;
}
origin: jfree/jcommon

/**
 * Displays a primitive font chooser dialog to allow the user to change the font.
 */
private void displayFontDialog() {
  final FontChooserPanel panel = new FontChooserPanel(this.drawStringPanel1.getFont());
  final int result = JOptionPane.showConfirmDialog(this, panel, "Font Selection",
                        JOptionPane.OK_CANCEL_OPTION,
                        JOptionPane.PLAIN_MESSAGE);
  if (result == JOptionPane.OK_OPTION) {
    this.drawStringPanel1.setFont(panel.getSelectedFont());
    this.drawStringPanel2.setFont(panel.getSelectedFont());
  }
}
origin: org.jfree/jcommon

/**
 * Returns a Font object representing the selection in the panel.
 *
 * @return the font.
 */
public Font getSelectedFont() {
  return new Font(getSelectedName(), getSelectedStyle(),
      getSelectedSize());
}
origin: org.jfree/jcommon

final String[] fonts = g.getAvailableFontFamilyNames();
setLayout(new BorderLayout());
final JPanel right = new JPanel(new BorderLayout());
fontpane.setBorder(BorderFactory.createEtchedBorder());
fontPanel.add(fontpane);
add(fontPanel);
right.add(attributes, BorderLayout.SOUTH);
add(right, BorderLayout.EAST);
setSelectedFont(font);
origin: org.jfree/com.springsource.org.jfree

/**
 * Returns the selected font.
 *
 * @return the font.
 */
public Font getSelectedFont() {
  return this.fontChooserPanel.getSelectedFont();
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Returns the panel that is the user interface.
 *
 * @param font  the font.
 *
 * @return the panel.
 */
private JPanel createContent(Font font) {
  final JPanel content = new JPanel(new BorderLayout());
  content.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
  if (font == null) {
    font = new Font("Dialog", 10, Font.PLAIN);
  }
  this.fontChooserPanel = new FontChooserPanel(font);
  content.add(this.fontChooserPanel);
  final JPanel buttons = createButtonPanel();
  buttons.setBorder(BorderFactory.createEmptyBorder(4, 0, 0, 0));
  content.add(buttons, BorderLayout.SOUTH);
  return content;
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Presents a font selection dialog to the user.
 */
public void attemptFontSelection() {
  FontChooserPanel panel = new FontChooserPanel(this.titleFont);
  int result =
    JOptionPane.showConfirmDialog(
      this, panel, localizationResources.getString("Font_Selection"),
      JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE
    );
  if (result == JOptionPane.OK_OPTION) {
    this.titleFont = panel.getSelectedFont();
    this.fontfield.setText(
      this.titleFont.getFontName() + " " + this.titleFont.getSize()
    );
  }
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Returns a Font object representing the selection in the panel.
 *
 * @return the font.
 */
public Font getSelectedFont() {
  return new Font(getSelectedName(), getSelectedStyle(), getSelectedSize());
}
origin: org.jfree/jcommon

/**
 * Returns the selected font.
 *
 * @return the font.
 */
public Font getSelectedFont() {
  return this.fontChooserPanel.getSelectedFont();
}
org.jfree.uiFontChooserPanel

Javadoc

A panel for choosing a font from the available system fonts - still a bit of a hack at the moment, but good enough for demonstration applications.

Most used methods

  • <init>
    Standard constructor - builds a FontChooserPanel initialised with the specified font.
  • getSelectedFont
    Returns a Font object representing the selection in the panel.
  • add
  • getSelectedName
    Returns the selected name.
  • getSelectedSize
    Returns the selected size.
  • getSelectedStyle
    Returns the selected style.
  • setLayout
  • setSelectedFont
    Initializes the contents of the dialog from the given font object.

Popular in Java

  • Creating JSON documents from java classes using gson
  • getApplicationContext (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setContentView (Activity)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • 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