本文整理了Java中javax.swing.JSlider.setMinimum()
方法的一些代码示例,展示了JSlider.setMinimum()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSlider.setMinimum()
方法的具体详情如下:
包路径:javax.swing.JSlider
类名称:JSlider
方法名:setMinimum
暂无
代码示例来源:origin: MovingBlocks/Terasology
public PropertySlider() {
titledBorder = new TitledBorder("");
setBorder(titledBorder);
borderLayout = new BorderLayout();
setLayout(borderLayout);
label = new JLabel("");
slider = new JSlider();
slider.setMinimum(0);
slider.setMaximum(100);
slider.setMinorTickSpacing(1);
slider.setMajorTickSpacing(10);
slider.addChangeListener(this);
add(slider, BorderLayout.CENTER);
add(label, BorderLayout.EAST);
}
代码示例来源:origin: magefree/mage
sliderFontSize.setMinimum(10);
sliderFontSize.setMinorTickSpacing(1);
sliderFontSize.setPaintLabels(true);
sliderChatFontSize.setMinimum(10);
sliderChatFontSize.setMinorTickSpacing(1);
sliderChatFontSize.setPaintLabels(true);
sliderDialogFont.setMinimum(10);
sliderDialogFont.setMinorTickSpacing(1);
sliderDialogFont.setPaintLabels(true);
sliderEditorCardSize.setMinimum(10);
sliderEditorCardSize.setMinorTickSpacing(1);
sliderEditorCardSize.setPaintLabels(true);
sliderEditorCardOffset.setMinimum(10);
sliderEditorCardOffset.setMinorTickSpacing(1);
sliderEditorCardOffset.setPaintLabels(true);
sliderEnlargedImageSize.setMinimum(10);
sliderEnlargedImageSize.setMinorTickSpacing(1);
sliderEnlargedImageSize.setPaintLabels(true);
sliderCardSizeHand.setMinimum(10);
sliderCardSizeHand.setMinorTickSpacing(1);
sliderCardSizeHand.setPaintLabels(true);
sliderCardSizeOtherZones.setMinimum(10);
代码示例来源:origin: osmdroid/osmdroid
sliMinZoom.setMinimum(0);
sliMinZoom.setMaximum(22);
sliMinZoom.setMajorTickSpacing(1);
sliMaxZoom.setMinimum(0);
sliMaxZoom.setValue(10);
sliMaxZoom.setMajorTickSpacing(1);
代码示例来源:origin: com.samskivert/samskivert
/**
* Sets the slider's minimum value.
*/
public void setMinimum (int minimum)
{
_slider.setMinimum(minimum);
}
代码示例来源:origin: eu.mihosoft.vrl/vrl
public void setMinValue(Integer a) {
min = a;
improvedSlider.setMinimum(min);
}
代码示例来源:origin: eu.mihosoft.vrl/vrl
/**
* @param minValue the minValue to set
*/
public void setMinValue(Integer minValue) {
this.minValue = minValue;
input.setMinimum(minValue);
}
代码示例来源:origin: pentaho/pentaho-reporting
public void setMinimum( final int minimum ) {
valueSlider.setMinimum( minimum );
}
代码示例来源:origin: com.hazelcast.simulator/visualiser
private void initSliders() {
mainHorizontalSlider.setMinimum(MAIN_SLIDER_MINIMUM);
fineHorizontalSlider.setMinimum(FINE_SLIDER_MINIMUM);
verticalSlider.setMinimum(VERTICAL_SLIDER_MINIMUM);
verticalSlider.setOrientation(JSlider.VERTICAL);
}
代码示例来源:origin: com.hazelcast.simulator/visualizer
private void initSliders() {
mainHorizontalSlider.setMinimum(MAIN_SLIDER_MINIMUM);
fineHorizontalSlider.setMinimum(FINE_SLIDER_MINIMUM);
verticalSlider.setMinimum(VERTICAL_SLIDER_MINIMUM);
verticalSlider.setOrientation(JSlider.VERTICAL);
}
代码示例来源:origin: de.sciss/prefuse-core
/**
* Create a new JValueSlider.
* @param title the title label of the slider component
* @param min the value associated with the minimum slider position
* @param max the value associated with the maximum slider position
* @param value the value associated with the starting slider position
*/
public JValueSlider(String title, int min, int max, int value) {
this(title, new Integer(min), new Integer(max), new Integer(value));
m_smin = min;
m_srange = max-min;
m_slider.setMinimum(min);
m_slider.setMaximum(max);
setValue(new Integer(value));
}
代码示例来源:origin: antlr/antlrworks
protected JSlider createZoomSlider() {
JSlider slider = new JSlider();
slider.setFocusable(false);
slider.setMinimum(1);
slider.setMaximum(800);
slider.setValue(100);
slider.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent event) {
JSlider slider = (JSlider)event.getSource();
view.setZoom((float)slider.getValue()/100);
view.repaint();
}
});
return slider;
}
代码示例来源:origin: senbox-org/s1tbx
public void updateControls() {
final int currentRecord = polarView.getCurrentRecord();
final int numRecords = polarView.getNumRecords();
prevBtn.setEnabled(currentRecord > 0 && !animate);
nextBtn.setEnabled(currentRecord < numRecords && !animate);
recordSlider.setMinimum(0);
recordSlider.setMaximum(polarView.getNumRecords());
recordSlider.setValue(currentRecord);
recordLabel.setText("Record " + (currentRecord + 1) + " of " + (numRecords + 1));
}
代码示例来源:origin: antlr/antlrworks
private JSlider createFactorSlider() {
JSlider slider = new JSlider();
slider.setFocusable(false);
slider.setMinimum(1);
slider.setMaximum(800);
slider.setValue((int)(context.getFactor()*40));
slider.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent event) {
JSlider slider = (JSlider)event.getSource();
context.setFactor((float)slider.getValue()/40);
view.refreshSizeChanged(slider.getValueIsAdjusting());
}
});
return slider;
}
代码示例来源:origin: org.ihtsdo/wb-api
private void updateFineControl() {
if (this.fineControl != null) {
this.fineControl.setMaximum(getFineControlMax());
this.fineControl.setMinimum(getFineControlMin());
this.fineControl.setValue(this.coarseControl.getValue());
updateFineControlLabelTable();
}
}
代码示例来源:origin: stackoverflow.com
JSlider slider = new JSlider();
slider.setMinimum(0);
slider.setMaximum(100);
slider.setMajorTickSpacing(10);
slider.setMinorTickSpacing(2);
slider.setPaintTicks(true);
代码示例来源:origin: robo-code/robocode
private JSlider createBattlefieldSizeSlider() {
JSlider slider = new JSlider();
slider.setMinimum(MIN_BATTLEFIELD_SIZE);
slider.setMaximum(MAX_BATTLEFIELD_SIZE);
slider.setMajorTickSpacing(BATTLEFIELD_STEP_SIZE);
slider.setSnapToTicks(true);
slider.setPaintTicks(true);
return slider;
}
代码示例来源:origin: org.jwall/streams-plotter
public void setSteps(Integer steps) {
log.info("Setting steps to {}", steps);
ValueAxis range = plot.getDomainAxis();
range.setFixedAutoRange(steps.doubleValue());
for (int i = 0; i < series.getSeriesCount(); i++) {
series.getSeries(i).setMaximumItemCount(steps);
}
stepField.setText(steps + "");
stepSlider.setMinimum(10);
stepSlider.setValue(steps);
plot.axisChanged(new AxisChangeEvent(range));
}
代码示例来源:origin: pvto/konte-art
private void setRndCharSlider(String s)
{
this.rndCharN = s.length();
this.jSlider1.setMinimum((int) randomFeed.convertKey(Misc.replicate("A", rndCharN)));
this.jSlider1.setMaximum((int) randomFeed.convertKey(Misc.replicate("Z", rndCharN)));
this.jSlider1.setValue((int) randomFeed.convertKey(s));
}
代码示例来源:origin: jzy3d/jzy3d-api
protected JSlider createSlider(final String title, int min, int max){
final JSlider slider = new JSlider();
slider.setMinimum(min);
slider.setMaximum(max);
slider.setMajorTickSpacing(20);
slider.setMinorTickSpacing(5);
slider.setPaintTicks(true);
slider.setPaintLabels(true);
return slider;
}
代码示例来源:origin: jzy3d/jzy3d-api
protected JSlider createSlider(final String title, int min, int max){
if(min==max){
min =-1;
max =2;
}
final JSlider slider = new JSlider();
slider.setMinimum(min);
slider.setMaximum(max);
slider.setMajorTickSpacing((max-min)/5);
slider.setMinorTickSpacing((max-min));
slider.setPaintTicks(true);
slider.setPaintLabels(true);
return slider;
}
内容来源于网络,如有侵权,请联系作者删除!