本文整理了Java中javax.swing.JSpinner.setFont()
方法的一些代码示例,展示了JSpinner.setFont()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSpinner.setFont()
方法的具体详情如下:
包路径:javax.swing.JSpinner
类名称:JSpinner
方法名:setFont
暂无
代码示例来源:origin: com.eas.platypus/platypus-js-calendar-widget
@Override
public void setFont(Font font) {
super.setFont(font);
if (_spinner != null) {
_spinner.setFont(font);
}
}
代码示例来源:origin: org.gephi/tools-plugin
statusLabel = new javax.swing.JLabel();
sizeSpinner.setFont(sizeSpinner.getFont().deriveFont((float)10));
sizeSpinner.setModel(new javax.swing.SpinnerNumberModel(Float.valueOf(1.0f), Float.valueOf(0.0f), null, Float.valueOf(0.5f)));
代码示例来源:origin: org.gephi/tools-plugin
labelIntensity.setText(org.openide.util.NbBundle.getMessage(BrushPanel.class, "BrushPanel.labelIntensity.text")); // NOI18N
intensitySpinner.setFont(intensitySpinner.getFont().deriveFont((float)10));
intensitySpinner.setModel(new javax.swing.SpinnerNumberModel(0, 0, 100, 1));
代码示例来源:origin: org.gephi/tools-plugin
statusLabel.setText(org.openide.util.NbBundle.getMessage(EdgePencilPanel.class, "EdgePencilPanel.statusLabel.text")); // NOI18N
weightSpinner.setFont(weightSpinner.getFont().deriveFont((float)10));
weightSpinner.setModel(new javax.swing.SpinnerNumberModel(Float.valueOf(1.0f), Float.valueOf(0.0f), null, Float.valueOf(0.1f)));
代码示例来源:origin: atarw/material-ui-swing
@Override
public void installUI (JComponent c) {
super.installUI (c);
JSpinner spinner = (JSpinner) c;
spinner.setOpaque (false);
spinner.setFont (UIManager.getFont ("Spinner.font"));
spinner.setBackground (UIManager.getColor ("Spinner.background"));
spinner.setForeground (UIManager.getColor ("Spinner.foreground"));
spinner.setBorder (UIManager.getBorder ("Spinner.border"));
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-tomcat5
/** Creates new form CustomizerGeneral */
public CustomizerGeneral(CustomizerDataSupport custData) {
this.custData = custData;
initComponents();
JTextField serverPortTextField = ((JSpinner.NumberEditor) serverPortSpinner.getEditor()).getTextField();
AccessibleContext ac = serverPortTextField.getAccessibleContext();
ac.setAccessibleName(NbBundle.getMessage(CustomizerGeneral.class, "ASCN_ServerPort"));
ac.setAccessibleDescription(NbBundle.getMessage(CustomizerGeneral.class, "ASCD_ServerPort"));
JTextField shutdownPortTextField = ((JSpinner.NumberEditor) shutdownPortSpinner.getEditor()).getTextField();
ac = shutdownPortTextField.getAccessibleContext();
ac.setAccessibleName(NbBundle.getMessage(CustomizerGeneral.class, "ASCN_ShutdownPort"));
ac.setAccessibleDescription(NbBundle.getMessage(CustomizerGeneral.class, "ASCD_ShutdownPort"));
// work-around for jspinner incorrect fonts
Font font = usernameTextField.getFont();
serverPortSpinner.setFont(font);
shutdownPortSpinner.setFont(font);
}
代码示例来源:origin: com.anrisoftware.prefdialog/prefdialog-misc-swing
/**
* Create the panel.
*/
UiNavigationPanel() {
setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
add(Box.createHorizontalGlue());
JPanel panel = new JPanel();
panel.setLayout(new MigLayout("",
"0[64,grow]2[64,grow][pref!][64,grow]2[64,grow]0", "0[]0"));
add(panel);
currentColumn = new JSpinner();
currentColumn.setFont(currentColumn.getFont().deriveFont(
currentColumn.getFont().getStyle() & ~Font.BOLD));
panel.add(currentColumn, "cell 0 0,growx");
maximumColumn = new JFormattedTextField();
maximumColumn.setHorizontalAlignment(SwingConstants.TRAILING);
maximumColumn.setEditable(false);
panel.add(maximumColumn, "cell 1 0,grow");
seperatorLabel = new JLabel("-");
panel.add(seperatorLabel, "cell 2 0,alignx center");
currentRow = new JSpinner();
currentRow.setFont(currentRow.getFont().deriveFont(
currentRow.getFont().getStyle() & ~Font.BOLD));
panel.add(currentRow, "cell 3 0,growx");
maximumRow = new JFormattedTextField();
maximumRow.setHorizontalAlignment(SwingConstants.TRAILING);
maximumRow.setEditable(false);
panel.add(maximumRow, "cell 4 0,grow");
}
代码示例来源:origin: tonikelope/megabasterd
slots_label.setDoubleBuffered(true);
slots_spinner.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
slots_spinner.setToolTipText("Slots");
slots_spinner.setDoubleBuffered(true);
代码示例来源:origin: tonikelope/megabasterd
slots_label.setDoubleBuffered(true);
slots_spinner.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
slots_spinner.setToolTipText("Slots");
slots_spinner.setDoubleBuffered(true);
代码示例来源:origin: com.haulmont.thirdparty/swingx-core
/**
* {@inheritDoc}
* <p>
*
* Overridden to set the font of its child components.
*/
@Override
public void setFont(Font font) {
super.setFont(font);
if (monthText != null) {
monthText.setFont(font);
yearSpinner.setFont(font);
yearSpinner.getEditor().setFont(font);
((DefaultEditor) yearSpinner.getEditor()).getTextField()
.setFont(font);
}
}
代码示例来源:origin: org.swinglabs.swingx/swingx-core
/**
* {@inheritDoc}
* <p>
*
* Overridden to set the font of its child components.
*/
@Override
public void setFont(Font font) {
super.setFont(font);
if (monthText != null) {
monthText.setFont(font);
yearSpinner.setFont(font);
yearSpinner.getEditor().setFont(font);
((DefaultEditor) yearSpinner.getEditor()).getTextField()
.setFont(font);
}
}
代码示例来源:origin: org.swinglabs.swingx/swingx-all
/**
* {@inheritDoc}
* <p>
*
* Overridden to set the font of its child components.
*/
@Override
public void setFont(Font font) {
super.setFont(font);
if (monthText != null) {
monthText.setFont(font);
yearSpinner.setFont(font);
yearSpinner.getEditor().setFont(font);
((DefaultEditor) yearSpinner.getEditor()).getTextField()
.setFont(font);
}
}
代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core
/**
* {@inheritDoc}
* <p>
*
* Overridden to set the font of its child components.
*/
@Override
public void setFont(Font font) {
super.setFont(font);
if (monthText != null) {
monthText.setFont(font);
yearSpinner.setFont(font);
yearSpinner.getEditor().setFont(font);
((DefaultEditor) yearSpinner.getEditor()).getTextField()
.setFont(font);
}
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-desktop
/**
* {@inheritDoc}
* <p>
*
* Overridden to set the font of its child components.
*/
@Override
public void setFont(Font font) {
super.setFont(font);
if (monthText != null) {
monthText.setFont(font);
yearSpinner.setFont(font);
yearSpinner.getEditor().setFont(font);
((DefaultEditor) yearSpinner.getEditor()).getTextField()
.setFont(font);
}
}
代码示例来源:origin: tonikelope/megabasterd
max_down_speed_spinner.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
max_downloads_spinner.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
max_downloads_spinner.setDoubleBuffered(true);
default_slots_down_spinner.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
default_slots_down_spinner.setDoubleBuffered(true);
default_slots_down_spinner.setValue(2);
megacrypter_reverse_port_spinner.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
max_uploads_label.setDoubleBuffered(true);
default_slots_up_spinner.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
default_slots_up_spinner.setDoubleBuffered(true);
default_slots_up_spinner.setValue(2);
max_uploads_spinner.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
max_uploads_spinner.setDoubleBuffered(true);
max_up_speed_label.setText("Max speed (KB/s):");
max_up_speed_spinner.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
zoom_label.setDoubleBuffered(true);
zoom_spinner.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
zoom_spinner.setDoubleBuffered(true);
代码示例来源:origin: cmu-phil/tetrad
numCategoriesSpinner.setFont(new Font("Serif", Font.PLAIN, 12));
numCategoriesSpinner.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-tomcat5
jLabel2.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CustomizerStartup.class, "ASCD_Note")); // NOI18N
jSpinner1.setFont(new java.awt.Font("Dialog", 0, 12));
jSpinner1.setModel(custData.getDebugPortModel());
jSpinner1.setEditor(new JSpinner.NumberEditor(jSpinner1, "#"));
代码示例来源:origin: com.eas.platypus/platypus-js-calendar-widget
_spinner = new JSpinner();
_spinner.setModel(new NullableSpinnerDateModel());
_spinner.setFont(getFont());
SimpleDateFormat lFormat = (SimpleDateFormat) panelDateFormat;
final JSpinner.DateEditor dEditor = new JSpinner.DateEditor(_spinner, lFormat.toPattern());
内容来源于网络,如有侵权,请联系作者删除!