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

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

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

JSlider.addPropertyChangeListener介绍

暂无

代码示例

代码示例来源:origin: groovy/groovy-core

public synchronized void syntheticBind() {
  boundSlider = (JSlider) ((PropertyBinding)sourceBinding).getBean();
  boundSlider.addPropertyChangeListener("model", this);
  boundSlider.getModel().addChangeListener(this);
}

代码示例来源:origin: com.eas.platypus/platypus-js-forms

public void addValueChangeListener(PropertyChangeListener listener) {
    super.addPropertyChangeListener(HasValue.VALUE_PROP_NAME, listener);
  }
}

代码示例来源:origin: khuxtable/seaglass

protected void installListeners(JSlider slider) {
  super.installListeners(slider);
  slider.addPropertyChangeListener(this);
}

代码示例来源:origin: it.tidalwave.betterbeansbinding/betterbeansbinding-swingbinding

protected void listeningStarted() {
  handler = new Handler();
  cachedValue = getValue();
  slider.addChangeListener(handler);
  slider.addPropertyChangeListener("model", handler);
}

代码示例来源:origin: net.java.dev.beansbinding/beansbinding

protected void listeningStarted() {
  handler = new Handler();
  cachedValue = getValue();
  slider.addChangeListener(handler);
  slider.addPropertyChangeListener("model", handler);
}

代码示例来源:origin: org.codehaus.groovy/groovy-jdk14

public synchronized void syntheticBind() {
  boundSlider = (JSlider) ((PropertyBinding)sourceBinding).getBean();
  boundSlider.addPropertyChangeListener("model", this);
  boundSlider.getModel().addChangeListener(this);
}

代码示例来源:origin: org.kohsuke.droovy/groovy

public synchronized void syntheticBind() {
  boundSlider = (JSlider) ((PropertyBinding)sourceBinding).getBean();
  boundSlider.addPropertyChangeListener("model", this);
  boundSlider.getModel().addChangeListener(this);
}

代码示例来源:origin: org.codehaus.groovy/groovy-swing

public synchronized void syntheticBind() {
  boundSlider = (JSlider) ((PropertyBinding)sourceBinding).getBean();
  boundSlider.addPropertyChangeListener("model", this);
  boundSlider.getModel().addChangeListener(this);
}

代码示例来源:origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

public synchronized void syntheticBind() {
  boundSlider = (JSlider) ((PropertyBinding)sourceBinding).getBean();
  boundSlider.addPropertyChangeListener("model", this);
  boundSlider.getModel().addChangeListener(this);
}

代码示例来源:origin: org.openbase.bco/dal.visual

brightnessSlider.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
  public void propertyChange(java.beans.PropertyChangeEvent evt) {
    brightnessSliderPropertyChange(evt);

代码示例来源:origin: MrCrayfish/ModelCreator

textFieldValue.setText(String.valueOf(sliderValue.getValue()));
});
sliderValue.addPropertyChangeListener("enabled", evt ->

代码示例来源:origin: com.synaptix/SynaptixSwing

protected void installListeners(JSlider slider) {
  slider.addMouseListener(trackListener);
  slider.addMouseMotionListener(trackListener);
  slider.addFocusListener(focusListener);
  slider.addComponentListener(componentListener);
  slider.addPropertyChangeListener(propertyChangeListener);
  slider.getModel().addChangeListener(changeListener);
}

代码示例来源:origin: com.synaptix/SynaptixSwing

protected void installListeners(JSlider slider) {
  slider.addMouseListener(trackListener);
  slider.addMouseMotionListener(trackListener);
  slider.addFocusListener(focusListener);
  slider.addComponentListener(componentListener);
  slider.addPropertyChangeListener(propertyChangeListener);
  slider.getModel().addChangeListener(changeListener);
}

代码示例来源:origin: org.codehaus.groovy/groovy-all-minimal

public synchronized void bind() {
  if (!bound) {
    boundSlider = (JSlider) ((PropertyBinding)sourceBinding).getBean();
    try {
      boundSlider.addPropertyChangeListener("model", this);
      boundSlider.getModel().addChangeListener(this);
      bound = true;
    } catch (RuntimeException re) {
      try {
        boundSlider.removePropertyChangeListener("model", this);
        boundSlider.getModel().removeChangeListener(this);
      } catch (Exception e) {
        // ignore as we are re-throwing the original cause
      }
      throw re;
    }
  }
}

代码示例来源:origin: com.github.insubstantial/substance

@Override
protected void installListeners(final JSlider slider) {
  super.installListeners(slider);
  this.substanceRolloverListener = new RolloverControlListener(this,
      this.thumbModel);
  slider.addMouseListener(this.substanceRolloverListener);
  slider.addMouseMotionListener(this.substanceRolloverListener);
  this.substancePropertyChangeListener = new PropertyChangeListener() {
    @Override
    public void propertyChange(PropertyChangeEvent evt) {
      if ("enabled".equals(evt.getPropertyName())) {
        thumbModel.setEnabled(slider.isEnabled());
      }
      if ("font".equals(evt.getPropertyName())) {
        SwingUtilities.invokeLater(new Runnable() {
          @Override
          public void run() {
            slider.updateUI();
          }
        });
      }
    }
  };
  this.slider
      .addPropertyChangeListener(this.substancePropertyChangeListener);
  this.stateTransitionTracker.registerModelListeners();
  this.stateTransitionTracker.registerFocusListeners();
}

代码示例来源:origin: org.java.net.substance/substance

@Override
protected void installListeners(final JSlider slider) {
  super.installListeners(slider);
  this.substanceRolloverListener = new RolloverControlListener(this,
      this.thumbModel);
  slider.addMouseListener(this.substanceRolloverListener);
  slider.addMouseMotionListener(this.substanceRolloverListener);
  this.substancePropertyChangeListener = new PropertyChangeListener() {
    public void propertyChange(PropertyChangeEvent evt) {
      if ("enabled".equals(evt.getPropertyName())) {
        thumbModel.setEnabled(slider.isEnabled());
      }
      if ("font".equals(evt.getPropertyName())) {
        SwingUtilities.invokeLater(new Runnable() {
          public void run() {
            slider.updateUI();
          }
        });
      }
    }
  };
  this.slider
      .addPropertyChangeListener(this.substancePropertyChangeListener);
  this.stateTransitionTracker.registerModelListeners();
  this.stateTransitionTracker.registerFocusListeners();
}

代码示例来源:origin: org.java.net.substance/substance

@Override
protected void installListeners(final JSlider slider) {
  super.installListeners(slider);
  // fix for defect 109 - memory leak on changing skin
  this.substanceRolloverListener = new RolloverControlListener(this,
      this.thumbModel);
  slider.addMouseListener(this.substanceRolloverListener);
  slider.addMouseMotionListener(this.substanceRolloverListener);
  this.substancePropertyChangeListener = new PropertyChangeListener() {
    public void propertyChange(PropertyChangeEvent evt) {
      if ("enabled".equals(evt.getPropertyName())) {
        SubstanceSliderUI.this.thumbModel.setEnabled(slider
            .isEnabled());
      }
      if ("font".equals(evt.getPropertyName())) {
        SwingUtilities.invokeLater(new Runnable() {
          public void run() {
            slider.updateUI();
          }
        });
      }
    }
  };
  this.slider
      .addPropertyChangeListener(this.substancePropertyChangeListener);
  this.stateTransitionTracker.registerModelListeners();
  this.stateTransitionTracker.registerFocusListeners();
}

代码示例来源:origin: com.github.insubstantial/substance

@Override
protected void installListeners(final JSlider slider) {
  super.installListeners(slider);
  // fix for defect 109 - memory leak on changing skin
  this.substanceRolloverListener = new RolloverControlListener(this,
      this.thumbModel);
  slider.addMouseListener(this.substanceRolloverListener);
  slider.addMouseMotionListener(this.substanceRolloverListener);
  this.substancePropertyChangeListener = new PropertyChangeListener() {
    @Override
    public void propertyChange(PropertyChangeEvent evt) {
      if ("enabled".equals(evt.getPropertyName())) {
        SubstanceSliderUI.this.thumbModel.setEnabled(slider
            .isEnabled());
      }
      if ("font".equals(evt.getPropertyName())) {
        SwingUtilities.invokeLater(new Runnable() {
          @Override
          public void run() {
            slider.updateUI();
          }
        });
      }
    }
  };
  this.slider
      .addPropertyChangeListener(this.substancePropertyChangeListener);
  this.stateTransitionTracker.registerModelListeners();
  this.stateTransitionTracker.registerFocusListeners();
}

相关文章

JSlider类方法