本文整理了Java中javax.swing.JSlider.setMaximumSize()
方法的一些代码示例,展示了JSlider.setMaximumSize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSlider.setMaximumSize()
方法的具体详情如下:
包路径:javax.swing.JSlider
类名称:JSlider
方法名:setMaximumSize
暂无
代码示例来源: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: 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: sdedit/sdedit
scaleSlider.setMaximumSize(new Dimension(100, 0));
scaleSlider.addMouseListener(new MouseAdapter() {
@Override
代码示例来源:origin: nl.cloudfarming.client/sensor-cropcircle
cropCircleSensorHeightSlider.setToolTipText(org.openide.util.NbBundle.getMessage(CropcircleMetadataController.class, "CropcircleMetadataPanel.cropCircleSensorHeightSlider.toolTipText"));
cropCircleSensorHeightSlider.setValue(0);
cropCircleSensorHeightSlider.setMaximumSize(new java.awt.Dimension(32767, 14));
cropCircleSensorHeightSlider.setMinimumSize(new java.awt.Dimension(36, 14));
cropCircleSensorHeightSlider.setPreferredSize(new java.awt.Dimension(200, 14));
代码示例来源:origin: MegaMek/megamek
fovHighlightAlpha.setPaintTicks(true);
fovHighlightAlpha.setPaintLabels(true);
fovHighlightAlpha.setMaximumSize(new Dimension(250, 100));
fovHighlightAlpha.addChangeListener(this);
fovDarkenAlpha.setPaintTicks(true);
fovDarkenAlpha.setPaintLabels(true);
fovDarkenAlpha.setMaximumSize(new Dimension(250, 100));
fovDarkenAlpha.addChangeListener(this);
darkenAlphaLabel = new JLabel(Messages.getString("TacticalOverlaySettingsDialog.FovDarkenAlpha")); //$NON-NLS-1$
numStripesSlider.setPaintTicks(true);
numStripesSlider.setPaintLabels(true);
numStripesSlider.setMaximumSize(new Dimension(250, 100));
numStripesSlider.addChangeListener(this);
numStripesLabel = new JLabel(
代码示例来源:origin: org.gephi/visualization
edgeScaleSlider.setMaximumSize(new Dimension(100, 20));
vizModel.addPropertyChangeListener(new PropertyChangeListener() {
@Override
代码示例来源:origin: org.riedelcastro/whatswrong
add(marginSlider, c);
marginSlider.setToolTipText("Margin between tokens");
marginSlider.setMaximumSize(new Dimension(20, 50));
add(heightSlider, c);
heightSlider.setToolTipText("Tree height");
heightSlider.setMaximumSize(new Dimension(20, 50));
代码示例来源:origin: org.gephi/visualization
fontSizeSlider.setMaximumSize(new Dimension(100, 20));
model.addChangeListener(new ChangeListener() {
@Override
代码示例来源:origin: sc.fiji/TrakEM2_
this.transp_slider.setBackground(Color.white);
this.transp_slider.setMinimumSize(new Dimension(250, 20));
this.transp_slider.setMaximumSize(new Dimension(250, 20));
this.transp_slider.setPreferredSize(new Dimension(250, 20));
final TransparencySliderListener tsl = new TransparencySliderListener();
内容来源于网络,如有侵权,请联系作者删除!