当前位置: 首页>>代码示例>>Java>>正文


Java JFontChooser.showDialog方法代码示例

本文整理汇总了Java中com.l2fprod.common.swing.JFontChooser.showDialog方法的典型用法代码示例。如果您正苦于以下问题:Java JFontChooser.showDialog方法的具体用法?Java JFontChooser.showDialog怎么用?Java JFontChooser.showDialog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.l2fprod.common.swing.JFontChooser的用法示例。


在下文中一共展示了JFontChooser.showDialog方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: selectFont

import com.l2fprod.common.swing.JFontChooser; //导入方法依赖的package包/类
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() + "'");
  }
}
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:10,代码来源:ChooseFont.java

示例2: selectFont

import com.l2fprod.common.swing.JFontChooser; //导入方法依赖的package包/类
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);
  }
}
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:15,代码来源:FontPropertyEditor.java

示例3: selectFont

import com.l2fprod.common.swing.JFontChooser; //导入方法依赖的package包/类
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);
  }
}
 
开发者ID:calibre2opds,项目名称:calibre2opds,代码行数:15,代码来源:FontPropertyEditor.java

示例4: jButton_FontActionPerformed

import com.l2fprod.common.swing.JFontChooser; //导入方法依赖的package包/类
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);
    }
}
 
开发者ID:meteoinfo,项目名称:MeteoInfoLib,代码行数:11,代码来源:FrmLabelSymbolSet.java

示例5: jButton_FontActionPerformed

import com.l2fprod.common.swing.JFontChooser; //导入方法依赖的package包/类
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();
    }
}
 
开发者ID:meteoinfo,项目名称:MeteoInfoLib,代码行数:11,代码来源:FrmLabelSet.java

示例6: jMenuItem_SetFontActionPerformed

import com.l2fprod.common.swing.JFontChooser; //导入方法依赖的package包/类
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);
    }
}
 
开发者ID:meteoinfo,项目名称:MeteoInfoMap,代码行数:10,代码来源:FrmTextEditor.java

示例7: run

import com.l2fprod.common.swing.JFontChooser; //导入方法依赖的package包/类
public void run() {
  Component actualParent;
  if (parent != null) actualParent = parent;
  else actualParent = BOGUS_PARENT;
  //System.out.println(actualParent);
  Font font = JFontChooser.showDialog(actualParent, "Choose new font", label.getFont());

  if (font == null) return;

  label.setFont(font);
  label.setText(font.getName() + " " + font.getSize());
  label.repaint();
  // store pref
  App.prefs.setPref(pref, UIDefaultsComponent.stringifyFont(font));
}
 
开发者ID:ltrr-arizona-edu,项目名称:tellervo,代码行数:16,代码来源:FontPrefComponent.java

示例8: jButton_FontActionPerformed

import com.l2fprod.common.swing.JFontChooser; //导入方法依赖的package包/类
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);
}
 
开发者ID:meteoinfo,项目名称:MeteoInfoLib,代码行数:7,代码来源:FrmChartLabel.java

示例9: jButton_LegendFontActionPerformed

import com.l2fprod.common.swing.JFontChooser; //导入方法依赖的package包/类
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());
}
 
开发者ID:meteoinfo,项目名称:MeteoInfoMap,代码行数:7,代码来源:FrmOptions.java

示例10: jButton_TextFontActionPerformed

import com.l2fprod.common.swing.JFontChooser; //导入方法依赖的package包/类
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());
}
 
开发者ID:meteoinfo,项目名称:MeteoInfoMap,代码行数:7,代码来源:FrmOptions.java

示例11: run

import com.l2fprod.common.swing.JFontChooser; //导入方法依赖的package包/类
public void run() {
    Font f = JFontChooser.showDialog(new javax.swing.JFrame(), text, currentFont);
  if (f != null) currentFont = f;
  text = null;
  fireEditingStopped();
}
 
开发者ID:ltrr-arizona-edu,项目名称:tellervo,代码行数:7,代码来源:FontEditor.java


注:本文中的com.l2fprod.common.swing.JFontChooser.showDialog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。