javax.swing.JSlider.setFocusable()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(112)

本文整理了Java中javax.swing.JSlider.setFocusable()方法的一些代码示例,展示了JSlider.setFocusable()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSlider.setFocusable()方法的具体详情如下:
包路径:javax.swing.JSlider
类名称:JSlider
方法名:setFocusable

JSlider.setFocusable介绍

暂无

代码示例

代码示例来源: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: antlr/antlrworks

public JSlider createZoomSlider() {
  JSlider slider = new JSlider();
  slider.setFocusable(false);
  slider.setMinimum(1);
  slider.setMaximum(200);
  slider.setValue(100);
  slider.addChangeListener(new ChangeListener() {
    public void stateChanged(ChangeEvent event) {
      JSlider slider = (JSlider)event.getSource();
      treeGraphView.setZoom((float)slider.getValue()/100);
      treeGraphView.repaint();
      treeGraphView.revalidate();
    }
  });
  return slider;
}

代码示例来源: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: MrCrayfish/ModelCreator

panel.add(textFieldValue);
sliderValue.setFocusable(false);
sliderValue.addChangeListener(e -> {
  textFieldValue.setText(String.valueOf(sliderValue.getValue()));

代码示例来源:origin: tulskiy/musique

volumeSlider.setFocusable(false);
progressSlider.setFocusable(false);

代码示例来源:origin: senbox-org/s2tbx

toleranceSlider.setPaintTicks(false);
toleranceSlider.setPaintLabels(false);
toleranceSlider.setFocusable(false);
toleranceSlider.setBorder(BorderFactory.createEmptyBorder());
componentList.add(threshold);

代码示例来源:origin: ikkisoft/blazer

threads.setSnapToTicks(true);
threads.setValue(1);
threads.setFocusable(false);
threads.addChangeListener(new javax.swing.event.ChangeListener() {
  public void stateChanged(javax.swing.event.ChangeEvent evt) {
permutations.setSnapToTicks(true);
permutations.setValue(5);
permutations.setFocusable(false);
permutations.addChangeListener(new javax.swing.event.ChangeListener() {
  public void stateChanged(javax.swing.event.ChangeEvent evt) {
vectorsLikelihood.setSnapToTicks(true);
vectorsLikelihood.setEnabled(false);
vectorsLikelihood.setFocusable(false);
vectorsLikelihood.addChangeListener(new javax.swing.event.ChangeListener() {
  public void stateChanged(javax.swing.event.ChangeEvent evt) {

代码示例来源:origin: senbox-org/snap-desktop

this.titleLabel.setBorder(new EmptyBorder(0, 0, 0, 0));
this.slider = new JSlider(JSlider.HORIZONTAL, -maximumNumber, maximumNumber, this.previousValue);
this.slider.setFocusable(false);
this.slider.setMajorTickSpacing(maximumNumber);
this.slider.setMinorTickSpacing(0);

相关文章

JSlider类方法