Java Code Examples for com.l2fprod.common.swing.JFontChooser#showDialog()

The following examples show how to use com.l2fprod.common.swing.JFontChooser#showDialog() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
private void jButton_FontActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_FontActionPerformed
    // TODO add your handling code here:
    //FontChooser fontChooser = new FontChooser(this, true, _labelBreak.getFont());
    //fontChooser.setVisible(true);
    Font aFont = JFontChooser.showDialog(this, null, _labelBreak.getFont());
    if (aFont != null) {
        this.jTextArea_Text.setFont(aFont);
        _labelBreak.setFont(aFont);
    }
}
 
Example 2
private void jButton_FontActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_FontActionPerformed
    // TODO add your handling code here:
    Font font = JFontChooser.showDialog(this, null, _font);
    if (font != null) {
        _font = font;
        updateLabelSet();
        updateLabelsFontColor();
        _mapView.paintLayers();
    }
}
 
Example 3
private void jMenuItem_SetFontActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem_SetFontActionPerformed
    // TODO add your handling code here:
    TextEditor textEditor = getActiveTextEditor();
    Font tFont = JFontChooser.showDialog(this, null, textEditor.getTextArea().getFont());
    if (tFont != null) {
        this.setTextFont(tFont);
        ((FrmMain) _parent).getOptions().setTextFont(tFont);
    }
}
 
Example 4
private void jButton_FontActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_FontActionPerformed
    // TODO add your handling code here:
    TextEditor textEditor = this.parent.getEditorDock().getActiveTextEditor();
    Font tFont = JFontChooser.showDialog(this, null, textEditor.getTextArea().getFont());
    if (tFont != null) {
        this.parent.getEditorDock().setTextFont(tFont);
        this.parent.getConsoleDockable().getConsole().setFont(tFont);
        this.parent.getOptions().setTextFont(tFont);
        this.jTextField_Font.setText(tFont.getFontName() + "  " + String.valueOf(tFont.getSize()));
    }
}
 
Example 5
private static void selectFont(Component parent) {
  Font selectedFont = JFontChooser.showDialog(parent, "Choose Font", null);
  if (selectedFont == null) {
    JOptionPane.showMessageDialog(parent, "You clicked 'Cancel'");
  } else {
    JOptionPane.showMessageDialog(parent, "You selected '"
      + selectedFont.getName() + "'");
  }
}
 
Example 6
protected void selectFont() {
  ResourceManager rm = ResourceManager.all(FontPropertyEditor.class);
  String title = rm.getString("FontPropertyEditor.title");
  
  Font selectedFont = JFontChooser.showDialog(editor, title, font);

  if (selectedFont != null) {
    Font oldFont = font;
    Font newFont = selectedFont;
    label.setValue(newFont);
    font = newFont;
    firePropertyChange(oldFont, newFont);
  }
}
 
Example 7
private void jButton_FontActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_FontActionPerformed
    // TODO add your handling code here:
    Font font = JFontChooser.showDialog(this, null, this.chartSet.getLabelFont());
    if (font != null)
        this.chartSet.setLabelFont(font);
}
 
Example 8
private void jButton_LegendFontActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_LegendFontActionPerformed
    // TODO add your handling code here:
    Font lFont = JFontChooser.showDialog(this, null, _legendFont);
    _legendFont = lFont;
    this.jLabel_LegendFont.setText(_legendFont.getFontName() + " " + _legendFont.getSize());
}
 
Example 9
private void jButton_TextFontActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_TextFontActionPerformed
    // TODO add your handling code here:
    Font tFont = JFontChooser.showDialog(this, null, _textFont);
    _textFont = tFont;
    this.jLabel_TextFont.setText(_textFont.getFontName() + " " + _textFont.getSize());
}