本文整理了Java中javax.swing.JSlider.getChangeListeners()
方法的一些代码示例,展示了JSlider.getChangeListeners()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSlider.getChangeListeners()
方法的具体详情如下:
包路径:javax.swing.JSlider
类名称:JSlider
方法名:getChangeListeners
暂无
代码示例来源:origin: 4thline/cling
protected void setPositionSliderWithoutNotification(int value) {
if (value == positionSlider.getValue()) return;
ChangeListener[] listeners = positionSlider.getChangeListeners();
for (ChangeListener listener : listeners) {
positionSlider.removeChangeListener(listener);
}
positionSlider.setValue(value);
for (ChangeListener listener : listeners) {
positionSlider.addChangeListener(listener);
}
}
代码示例来源:origin: 4thline/cling
protected void setVolumeSliderWithoutNotification(int value) {
if (value == volumeSlider.getValue()) return;
ChangeListener[] listeners = volumeSlider.getChangeListeners();
for (ChangeListener listener : listeners) {
volumeSlider.removeChangeListener(listener);
}
volumeSlider.setValue(value);
for (ChangeListener listener : listeners) {
volumeSlider.addChangeListener(listener);
}
// Mute button state depends on volume state
muteButton.setSelected(value == 0);
}
}
代码示例来源:origin: nroduit/Weasis
public static void addChangeListener(JSlider slider, ChangeListener listener) {
ChangeListener[] listeners = slider.getChangeListeners();
for (int i = 0; i < listeners.length; i++) {
if (listener == listeners[i]) {
return;
}
}
slider.addChangeListener(listener);
}
内容来源于网络,如有侵权,请联系作者删除!