本文整理了Java中javax.swing.JSlider.getPreferredSize()
方法的一些代码示例,展示了JSlider.getPreferredSize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSlider.getPreferredSize()
方法的具体详情如下:
包路径:javax.swing.JSlider
类名称:JSlider
方法名:getPreferredSize
暂无
代码示例来源:origin: magefree/mage
cardSizeSlider = new JSlider(SwingConstants.HORIZONTAL, 0, 100, 50);
cardSizeSlider.setOpaque(false);
cardSizeSlider.setPreferredSize(new Dimension(100, (int) cardSizeSlider.getPreferredSize().getHeight()));
cardSizeSlider.addChangeListener(e -> {
if (!cardSizeSlider.getValueIsAdjusting()) {
代码示例来源:origin: jrtom/jung
public Dimension getPreferredSize() {
Dimension d = super.getPreferredSize();
d.width /= 2;
return d;
}
};
代码示例来源:origin: jrtom/jung
public Dimension getPreferredSize() {
Dimension d = super.getPreferredSize();
d.width /= 2;
return d;
}
};
代码示例来源:origin: net.sf.jung/jung-samples
public Dimension getPreferredSize() {
Dimension d = super.getPreferredSize();
d.width /= 2;
return d;
}
};
代码示例来源:origin: net.sf.jung/jung-samples
public Dimension getPreferredSize() {
Dimension d = super.getPreferredSize();
d.width /= 2;
return d;
}
};
代码示例来源:origin: net.sf.jung/jung-samples
public Dimension getPreferredSize() {
Dimension d = super.getPreferredSize();
d.width /= 2;
return d;
}
};
代码示例来源:origin: bcdev/beam
private JSlider createSpeedSlider() {
final JSlider speedSlider = new JSlider(1, 10);
speedSlider.setToolTipText("Choose the playing speed");
speedSlider.setSnapToTicks(true);
speedSlider.setPaintTrack(true);
speedSlider.setPaintTicks(true);
speedSlider.setPaintLabels(true);
speedSlider.setValue(6);
speedSlider.setPreferredSize(new Dimension(80, speedSlider.getPreferredSize().height));
speedSlider.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
timerDelay = calculateTimerDelay();
timer.setDelay(timerDelay);
updateSpeedUnit();
}
});
return speedSlider;
}
代码示例来源:origin: stackoverflow.com
Dimension size = pb.getPreferredSize();
size.height *= 4;
size.width = Math.max(size.width, slider.getPreferredSize().width);
return size;
pb.setSize(size);
size = slider.getPreferredSize();
x = (getWidth() - size.width) / 2;
y = (getHeight() - size.height) / 2;
代码示例来源:origin: Vhati/Slipstream-Mod-Manager
panel.setLayout( new BoxLayout( panel, BoxLayout.X_AXIS ) );
final JSlider valueSlider = new JSlider( JSlider.HORIZONTAL );
valueSlider.setPreferredSize( new Dimension( 50, valueSlider.getPreferredSize().height ) );
sliderMap.put( valueName, valueSlider );
panel.add( valueSlider );
代码示例来源:origin: openmicroscopy/bioformats
Dimension dim = zSlider.getPreferredSize();
dim.width = 50;
zSlider.setPreferredSize(dim);
代码示例来源:origin: fr.avianey.apache-xmlgraphics/batik
quality.setLabelTable(labels);
Dimension dim = quality.getPreferredSize();
quality.setPreferredSize(new Dimension(350, dim.height));
代码示例来源:origin: biojava/biojava
slider.setPreferredSize(new Dimension(100,slider.getPreferredSize().height));
代码示例来源:origin: ome/formats-bsd
Dimension dim = zSlider.getPreferredSize();
dim.width = 50;
zSlider.setPreferredSize(dim);
代码示例来源:origin: apache/batik
quality.setLabelTable(labels);
Dimension dim = quality.getPreferredSize();
quality.setPreferredSize(new Dimension(350, dim.height));
代码示例来源:origin: openstreetmap/osmembrane
defaultZoom.setPaintLabels(false);
defaultZoom.setPreferredSize(new Dimension(minFieldWidth, defaultZoom
.getPreferredSize().height));
defaultZoom.setToolTipText(I18N.getInstance().getString(
"Model.Settings.Type.DEFAULT_ZOOM_SIZE.Description"));
内容来源于网络,如有侵权,请联系作者删除!