本文整理了Java中javax.swing.JSlider.setFont()
方法的一些代码示例,展示了JSlider.setFont()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSlider.setFont()
方法的具体详情如下:
包路径:javax.swing.JSlider
类名称:JSlider
方法名:setFont
暂无
代码示例来源:origin: com.samskivert/samskivert
@Override
public void setFont (Font font)
{
super.setFont(font);
if (_label != null) {
_label.setFont(font);
_slider.setFont(font);
_value.setFont(font);
}
}
代码示例来源:origin: de.sciss/prefuse-core
/**
* @see java.awt.Component#setFont(java.awt.Font)
*/
public void setFont(Font f) {
m_field.setFont(f);
m_label.setFont(f);
m_slider.setFont(f);
super.setFont(f);
}
代码示例来源:origin: atarw/material-ui-swing
@Override
public void installUI (JComponent c) {
super.installUI (c);
JSlider slider = (JSlider) c;
slider.setFont (UIManager.getFont ("Slider.font"));
slider.setBackground (UIManager.getColor ("Slider.background"));
slider.setForeground (UIManager.getColor ("Slider.foreground"));
slider.setBorder (UIManager.getBorder ("Slider.border"));
}
代码示例来源:origin: org.nuiton.jaxx/jaxx-runtime-swing-widget
protected void createSlider() {
slider = new javax.swing.JSlider();
$objectMap.put("slider", slider);
slider.setName("slider");
slider.setValue(0);
slider.setMajorTickSpacing(60);
slider.setPaintTicks(true);
slider.setPaintLabels(true);
slider.setMinorTickSpacing(30);
if (slider.getFont() != null) slider.setFont(slider.getFont().deriveFont((float) 11));
slider.addChangeListener((javax.swing.event.ChangeListener) jaxx.runtime.Util.getEventListener(javax.swing.event.ChangeListener.class, "stateChanged", $JPanel0, "doStateChanged__on__slider"));
}
代码示例来源:origin: org.nuiton.jaxx/jaxx-widgets
protected void createSlider() {
$objectMap.put("slider", slider = new JSlider());
slider.setName("slider");
slider.setValue(0);
slider.setPaintLabels(true);
slider.setPaintTicks(true);
if (slider.getFont() != null) {
slider.setFont(slider.getFont().deriveFont((float) 11));
}
slider.setMajorTickSpacing(60);
slider.setMinorTickSpacing(30);
slider.addChangeListener(JAXXUtil.getEventListener(ChangeListener.class, "stateChanged", this, "doStateChanged__on__slider"));
}
代码示例来源:origin: yannrichet/jmathplot
min.setFont(font);
min.setPaintTicks(true);
max = new JSlider(1, _kernelDoubleValues.length, _kernelDoubleValues.length);
max.setFont(font);
max.setMinorTickSpacing(1);
max.setSnapToTicks(true);
代码示例来源:origin: Exslims/MercuryTrade
public JSlider getSlider(int min, int max, int value) {
JSlider slider = new JSlider(JSlider.HORIZONTAL, min, max, value);
slider.setMajorTickSpacing(10);
slider.setMinorTickSpacing(1);
// slider.setPaintLabels(true);
// slider.setUI(new WindowsSliderUI(slider));
slider.setForeground(AppThemeColor.TEXT_DEFAULT);
slider.setFont(REGULAR_FONT.deriveFont(15f));
slider.setRequestFocusEnabled(false);
slider.addMouseMotionListener(new MouseMotionAdapter() {
@Override
public void mouseDragged(MouseEvent e) {
slider.getParent().repaint();
}
});
slider.setBackground(AppThemeColor.FRAME);
return slider;
}
代码示例来源:origin: stackoverflow.com
slider.setFont(new Font("Dialog", Font.BOLD, 10));
slider.setMinorTickSpacing(1);
slider.setMajorTickSpacing(2);
代码示例来源:origin: org.java.net.substance/substance
hueSlider.setFont(font);
hueField.setFont(font);
hueFieldLabel.setFont(font);
saturationLabel.setFont(font);
saturationSlider.setFont(font);
saturationField.setFont(font);
saturationFieldLabel.setFont(font);
brightnessLabel.setFont(font);
brightnessSlider.setFont(font);
brightnessField.setFont(font);
brightnessFieldLabel.setFont(font);
代码示例来源:origin: com.github.insubstantial/substance
hueSlider.setFont(font);
hueField.setFont(font);
hueFieldLabel.setFont(font);
saturationLabel.setFont(font);
saturationSlider.setFont(font);
saturationField.setFont(font);
saturationFieldLabel.setFont(font);
brightnessLabel.setFont(font);
brightnessSlider.setFont(font);
brightnessField.setFont(font);
brightnessFieldLabel.setFont(font);
代码示例来源:origin: com.github.insubstantial/substance
redSlider.setFont(font);
redField.setFont(font);
greenLabel.setFont(font);
greenSlider.setFont(font);
greenField.setFont(font);
blueLabel.setFont(font);
blueSlider.setFont(font);
blueField.setFont(font);
代码示例来源:origin: org.java.net.substance/substance
redSlider.setFont(font);
redField.setFont(font);
greenLabel.setFont(font);
greenSlider.setFont(font);
greenField.setFont(font);
blueLabel.setFont(font);
blueSlider.setFont(font);
blueField.setFont(font);
代码示例来源:origin: com.github.insubstantial/substance
cyanSlider.setFont(font);
cyanField.setFont(font);
cyanFieldLabel.setFont(font);
magentaLabel.setFont(font);
magentaSlider.setFont(font);
magentaField.setFont(font);
magentaFieldLabel.setFont(font);
yellowLabel.setFont(font);
yellowSlider.setFont(font);
yellowField.setFont(font);
yellowFieldLabel.setFont(font);
blackLabel.setFont(font);
blackSlider.setFont(font);
blackField.setFont(font);
blackFieldLabel.setFont(font);
代码示例来源:origin: com.github.insubstantial/substance
brightnessSlider.setFont(font);
brightnessField.setFont(font);
brightnessFieldLabel.setFont(font);
代码示例来源:origin: org.java.net.substance/substance
brightnessSlider.setFont(font);
brightnessField.setFont(font);
brightnessFieldLabel.setFont(font);
代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw
redSlider.setFont(font);
redField.setFont(font);
greenLabel.setFont(font);
greenSlider.setFont(font);
greenField.setFont(font);
blueLabel.setFont(font);
blueSlider.setFont(font);
blueField.setFont(font);
代码示例来源:origin: org.java.net.substance/substance
@Override
protected void installDefaults(JSlider slider) {
super.installDefaults(slider);
Font f = slider.getFont();
if (f == null || f instanceof UIResource) {
slider.setFont(new FontUIResource(SubstanceLookAndFeel
.getFontPolicy().getFontSet("Substance", null)
.getControlFont()));
}
int size = SubstanceSizeUtils.getSliderIconSize(SubstanceSizeUtils
.getComponentFontSize(slider));
// System.out.println("Slider size : " + size);
this.horizontalIcon = SubstanceIconFactory.getSliderHorizontalIcon(
size, false);
this.roundIcon = SubstanceIconFactory.getSliderRoundIcon(size);
this.verticalIcon = SubstanceIconFactory.getSliderVerticalIcon(size,
false);
int focusIns = (int) Math.ceil(2.0 * SubstanceSizeUtils
.getFocusStrokeWidth(SubstanceSizeUtils
.getComponentFontSize(slider)));
this.focusInsets = new Insets(focusIns, focusIns, focusIns, focusIns);
}
代码示例来源:origin: com.github.insubstantial/substance
@Override
protected void installDefaults(JSlider slider) {
super.installDefaults(slider);
Font f = slider.getFont();
if (f == null || f instanceof UIResource) {
slider.setFont(new FontUIResource(SubstanceLookAndFeel
.getFontPolicy().getFontSet("Substance", null)
.getControlFont()));
}
int size = SubstanceSizeUtils.getSliderIconSize(SubstanceSizeUtils
.getComponentFontSize(slider));
// System.out.println("Slider size : " + size);
this.horizontalIcon = SubstanceIconFactory.getSliderHorizontalIcon(
size, false);
this.roundIcon = SubstanceIconFactory.getSliderRoundIcon(size);
this.verticalIcon = SubstanceIconFactory.getSliderVerticalIcon(size,
false);
int focusIns = (int) Math.ceil(2.0 * SubstanceSizeUtils
.getFocusStrokeWidth(SubstanceSizeUtils
.getComponentFontSize(slider)));
this.focusInsets = new Insets(focusIns, focusIns, focusIns, focusIns);
}
代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw
hueSlider.setFont(font);
hueField.setFont(font);
hueFieldLabel.setFont(font);
saturationLabel.setFont(font);
saturationSlider.setFont(font);
saturationField.setFont(font);
saturationFieldLabel.setFont(font);
brightnessLabel.setFont(font);
brightnessSlider.setFont(font);
brightnessField.setFont(font);
brightnessFieldLabel.setFont(font);
代码示例来源:origin: org.xworker/xworker_core
comp.setFont(font);
内容来源于网络,如有侵权,请联系作者删除!