本文整理汇总了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() + "'");
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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();
}
}
示例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);
}
}
示例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));
}
示例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);
}
示例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());
}
示例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());
}
示例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();
}