本文整理汇总了Java中say.swing.JFontChooser类的典型用法代码示例。如果您正苦于以下问题:Java JFontChooser类的具体用法?Java JFontChooser怎么用?Java JFontChooser使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JFontChooser类属于say.swing包,在下文中一共展示了JFontChooser类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: makeEditorGroup
import say.swing.JFontChooser; //导入依赖的package包/类
private SettingsGroup makeEditorGroup() {
JButton fontBtn = new JButton(NLS.str("preferences.select_font"));
fontBtn.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
JFontChooser fontChooser = new JFontChooser();
fontChooser.setSelectedFont(settings.getFont());
int result = fontChooser.showDialog(JadxSettingsWindow.this);
if (result == JFontChooser.OK_OPTION) {
Font font = fontChooser.getSelectedFont();
LOG.info("Selected Font : {}", font);
settings.setFont(font);
mainWindow.updateFont(font);
}
}
});
SettingsGroup other = new SettingsGroup(NLS.str("preferences.editor"));
other.addRow(NLS.str("preferences.font"), fontBtn);
return other;
}
开发者ID:skylot,项目名称:jadx,代码行数:22,代码来源:JadxSettingsWindow.java
示例2: menuTextFontActionPerformed
import say.swing.JFontChooser; //导入依赖的package包/类
private void menuTextFontActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_menuTextFontActionPerformed
JFontChooser fontChooser = new JFontChooser();
if (fontChooser.showDialog(null) == JFontChooser.OK_OPTION) {
Font font = fontChooser.getSelectedFont();
G.font = font;
}
TextUtils.regenerateDocument();
}
开发者ID:ProgettoRadis,项目名称:ArasuiteIta,代码行数:9,代码来源:GUI.java
示例3: generalPreferencesDialogChooseTextFontButtonActionPerformed
import say.swing.JFontChooser; //导入依赖的package包/类
private void generalPreferencesDialogChooseTextFontButtonActionPerformed(
java.awt.event.ActionEvent evt) {// GEN-FIRST:event_generalPreferencesDialogChooseTextFontButtonActionPerformed
JFontChooser fontChooser = new JFontChooser();
if (fontChooser.showDialog(null) == JFontChooser.OK_OPTION) {
Font font = fontChooser.getSelectedFont();
G.tempDefaultFont = font;
}
}
开发者ID:ProgettoRadis,项目名称:ArasuiteIta,代码行数:9,代码来源:GUI.java
示例4: doChangeFont
import say.swing.JFontChooser; //导入依赖的package包/类
void doChangeFont() {
JFontChooser jfc = new JFontChooser();
jfc.setSelectedFont(tableFont);
if (jfc.showDialog(this) == JFontChooser.OK_OPTION) {
tableFont = jfc.getSelectedFont();
for (int i = 0; i < tabs.getTabCount(); i++) {
Component tc = tabs.getComponentAt(i);
if (tc instanceof ComparisonTab) {
ComparisonTab ct = (ComparisonTab) tc;
ct.setTableFont(tableFont);
ct.autoSize();
}
}
}
}
开发者ID:akarnokd,项目名称:jmh-compare-gui,代码行数:16,代码来源:JMHCompareGUI.java
示例5: changeFont
import say.swing.JFontChooser; //导入依赖的package包/类
/**
* Shows a dialog so that the user can change the default font. The values
* will then be passed to the user's Settings instance and finally, printed
* to the file so that the user doesn't have to change every time.
*/
public void changeFont() {
JFontChooser fontChooser = new JFontChooser();
int result = fontChooser.showDialog(null);
if (result == JFontChooser.OK_OPTION) {
pref.setFont(fontChooser.getSelectedFont());
pref.update();
}
}
开发者ID:NigoroJr,项目名称:typebest,代码行数:14,代码来源:ChangePreferences.java
示例6: bFontChooser_actionPerformed
import say.swing.JFontChooser; //导入依赖的package包/类
private void bFontChooser_actionPerformed(ActionEvent e)
{
JFontChooser fontDialog = new JFontChooser ();
fontDialog.setSelectedFont(layout.getOptions().getDisplayFont());
int result = fontDialog.showDialog(this);
if (result == JFontChooser.OK_OPTION)
{
layout.getOptions().setDisplayFont(fontDialog.getSelectedFont());
}
}
开发者ID:makhidkarun,项目名称:cartography,代码行数:11,代码来源:HexOptionPanel.java
注:本文中的say.swing.JFontChooser类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论