本文整理了Java中javax.swing.JToolBar.setFont()
方法的一些代码示例,展示了JToolBar.setFont()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JToolBar.setFont()
方法的具体详情如下:
包路径:javax.swing.JToolBar
类名称:JToolBar
方法名:setFont
暂无
代码示例来源:origin: magefree/mage
mageToolbar.setFont(new java.awt.Font("Segoe UI", 0, 48)); // NOI18N
mageToolbar.setMaximumSize(new java.awt.Dimension(614, 60));
mageToolbar.setMinimumSize(new java.awt.Dimension(566, 60));
代码示例来源:origin: magefree/mage
private void setGUISize() {
Font font = GUISizeHelper.menuFont;
mageToolbar.setFont(font);
int newHeight = font.getSize() + 6;
Dimension mageToolbarDimension = mageToolbar.getPreferredSize();
mageToolbarDimension.height = newHeight + 6;
mageToolbar.setMinimumSize(mageToolbarDimension);
mageToolbar.setMaximumSize(mageToolbarDimension);
mageToolbar.setPreferredSize(mageToolbarDimension);
for (Component component : mageToolbar.getComponents()) {
if (component instanceof JButton || component instanceof JLabel || component instanceof JToggleButton) {
component.setFont(font);
Dimension d = component.getPreferredSize();
d.height = newHeight;
component.setMinimumSize(d);
component.setMaximumSize(d);
}
if (component instanceof javax.swing.JToolBar.Separator) {
Dimension d = component.getPreferredSize();
d.height = newHeight;
component.setMinimumSize(d);
component.setMaximumSize(d);
}
}
balloonTip.setFont(GUISizeHelper.balloonTooltipFont);
addTooltipContainer();
}
}
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@ScriptFunction
@Override
public void setFont(Font aFont) {
super.setFont(aFont);
}
代码示例来源:origin: atarw/material-ui-swing
@Override
public void installUI (JComponent c) {
super.installUI (c);
JToolBar toolBar = (JToolBar) c;
toolBar.setFont (UIManager.getFont ("ToolBar.font"));
toolBar.setBackground (UIManager.getColor ("ToolBar.background"));
toolBar.setForeground (UIManager.getColor ("ToolBar.foreground"));
toolBar.setBorder (UIManager.getBorder ("ToolBar.border"));
this.dockingBorderColor = null;
this.floatingBorderColor = null;
this.dockingColor = UIManager.getColor ("ToolBar.dockingBackground");
this.floatingColor = UIManager.getColor ("ToolBar.floatingBackground");
}
代码示例来源:origin: org.apache.jmeter/ApacheJMeter_core
private void init() {
this.searchField = new JTextField(30);
searchField.setFont(FONT_SMALL);
final JButton findButton = new JButton(JMeterUtils.getResString("search_text_button_find"));
findButton.setFont(FONT_SMALL);
findButton.setActionCommand(FIND_ACTION);
findButton.addActionListener(this);
regexCB = new JCheckBox(JMeterUtils.getResString("search_text_chkbox_regexp"));
regexCB.setFont(FONT_SMALL);
matchCaseCB = new JCheckBox(JMeterUtils.getResString("search_text_chkbox_case"));
matchCaseCB.setFont(FONT_SMALL);
this.toolBar = new JToolBar();
toolBar.setFloatable(false);
toolBar.setFont(FONT_SMALL);
toolBar.add(searchField);
toolBar.add(findButton);
toolBar.add(matchCaseCB);
toolBar.add(regexCB);
searchField.addActionListener(e -> findButton.doClick(0));
}
代码示例来源:origin: org.apache.jmeter/ApacheJMeter_components
this.toolBar = new JToolBar();
toolBar.setFloatable(false);
toolBar.setFont(FONT_SMALL);
toolBar.add(textToFindField);
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@ScriptFunction
@Override
public void setFont(Font aValue) {
super.setFont(aValue);
if (gapLabel != null) {
gapLabel.setFont(aValue);
}
if (iconLabel != null) {
iconLabel.setFont(aValue);
}
if (extraTools != null) {
extraTools.setFont(aValue);
}
if (decorated != null) {
decorated.setFont(aValue);
}
Font f = getFont();
if (f != null && prefSizeCalculator != null) {
prefSizeCalculator.setFont(f);
}
}
内容来源于网络,如有侵权,请联系作者删除!