本文整理了Java中javax.swing.JSlider.setName()
方法的一些代码示例,展示了JSlider.setName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSlider.setName()
方法的具体详情如下:
包路径:javax.swing.JSlider
类名称:JSlider
方法名:setName
暂无
代码示例来源:origin: jbox2d/jbox2d
private void addSettings(JPanel argPanel, TestbedSettings argSettings, SettingType argIgnore) {
for (TestbedSetting setting : argSettings.getSettings()) {
if (setting.settingsType == argIgnore) {
continue;
}
switch (setting.constraintType) {
case RANGE:
JLabel text = new JLabel(setting.name + ": " + setting.value);
JSlider slider = new JSlider(setting.min, setting.max, setting.value);
slider.setMaximumSize(new Dimension(200, 20));
slider.addChangeListener(this);
slider.setName(setting.name);
slider.putClientProperty(SETTING_TAG, setting);
slider.putClientProperty(LABEL_TAG, text);
argPanel.add(text);
argPanel.add(slider);
break;
case BOOLEAN:
JCheckBox checkbox = new JCheckBox(setting.name);
checkbox.setSelected(setting.enabled);
checkbox.addChangeListener(this);
checkbox.putClientProperty(SETTING_TAG, setting);
argPanel.add(checkbox);
break;
}
}
}
代码示例来源:origin: lbalazscs/Pixelitor
public void setSliderName(String name) {
slider.setName(name);
}
代码示例来源:origin: robotframework/SwingLibrary
private JSlider testSlider() {
JSlider slider = new JSlider(0, 5);
slider.setName("testSlider");
slider.setMajorTickSpacing(1);
slider.setPaintTicks(true);
return slider;
}
代码示例来源:origin: lbalazscs/Pixelitor
@Override
public void setName(String name) {
super.setName(name);
slider.setName(name);
spinner.setName(name);
}
}
代码示例来源: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: org.jbox2d/jbox2d-testbed
private void addSettings(JPanel argPanel, TestbedSettings argSettings, SettingType argIgnore) {
for (TestbedSetting setting : argSettings.getSettings()) {
if (setting.settingsType == argIgnore) {
continue;
}
switch (setting.constraintType) {
case RANGE:
JLabel text = new JLabel(setting.name + ": " + setting.value);
JSlider slider = new JSlider(setting.min, setting.max, setting.value);
slider.setMaximumSize(new Dimension(200, 20));
slider.addChangeListener(this);
slider.setName(setting.name);
slider.putClientProperty(SETTING_TAG, setting);
slider.putClientProperty(LABEL_TAG, text);
argPanel.add(text);
argPanel.add(slider);
break;
case BOOLEAN:
JCheckBox checkbox = new JCheckBox(setting.name);
checkbox.setSelected(setting.enabled);
checkbox.addChangeListener(this);
checkbox.putClientProperty(SETTING_TAG, setting);
argPanel.add(checkbox);
break;
}
}
}
代码示例来源:origin: JGillam/burp-co2
minCharsSlider.setMajorTickSpacing(1);
minCharsSlider.setMaximum(30);
minCharsSlider.setName("");
minCharsSlider.setPaintTicks(true);
minCharsSlider.setSnapToTicks(true);
代码示例来源:origin: bastienjalbert/topguw
sliderGainKal.setName("gainKal");
sliderGainKal.setMaximum(50);
sliderGainKal.setBounds(263, 22, 271, 33);
代码示例来源:origin: MegaMek/mekhq
hitSlider.setPaintLabels(true);
hitSlider.setSnapToTicks(true);
hitSlider.setName(Integer.toString(j-1));
if (status.getHits() > 5 || status.isDead()) {
hitSlider.setEnabled(false);
代码示例来源:origin: org.zaproxy/zap
/**
* This method initializes sliderHostPerScan
*
* @return javax.swing.JSlider
*/
private JSlider getSliderHostPerScan() {
if (sliderHostPerScan == null) {
sliderHostPerScan = new JSlider();
sliderHostPerScan.setMaximum(5);
sliderHostPerScan.setMinimum(1);
sliderHostPerScan.setMinorTickSpacing(1);
sliderHostPerScan.setPaintTicks(true);
sliderHostPerScan.setPaintLabels(true);
sliderHostPerScan.setName("");
sliderHostPerScan.setMajorTickSpacing(1);
sliderHostPerScan.setSnapToTicks(true);
sliderHostPerScan.setPaintTrack(true);
}
return sliderHostPerScan;
}
代码示例来源:origin: org.zaproxy/zap
/**
* This method initializes the slider for MaxDepth.
*
* @return the slider for max depth
*/
private JSlider getSliderMaxDepth() {
if (sliderMaxDepth == null) {
sliderMaxDepth = new JSlider();
sliderMaxDepth.setMaximum(19);
sliderMaxDepth.setMinimum(1);
sliderMaxDepth.setMinorTickSpacing(1);
sliderMaxDepth.setPaintTicks(true);
sliderMaxDepth.setPaintLabels(true);
sliderMaxDepth.setName("");
sliderMaxDepth.setMajorTickSpacing(1);
sliderMaxDepth.setSnapToTicks(true);
sliderMaxDepth.setPaintTrack(true);
}
return sliderMaxDepth;
}
代码示例来源:origin: RPTools/maptool
slider.setName(bar.getName());
slider.setPaintLabels(true);
slider.setPaintTicks(true);
代码示例来源:origin: atdl4j/atdl4j
slider.setName(getName()+"/slider");
内容来源于网络,如有侵权,请联系作者删除!