本文整理了Java中javax.swing.JSpinner.addChangeListener()
方法的一些代码示例,展示了JSpinner.addChangeListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSpinner.addChangeListener()
方法的具体详情如下:
包路径:javax.swing.JSpinner
类名称:JSpinner
方法名:addChangeListener
暂无
代码示例来源:origin: libgdx/libgdx
public void addChangeListener (ChangeListener listener) {
spinner.addChangeListener(listener);
}
代码示例来源:origin: libgdx/libgdx
public void addChangeListener (ChangeListener listener) {
spinner.addChangeListener(listener);
}
代码示例来源:origin: libgdx/libgdx
public void addChangeListener (ChangeListener listener) {
spinner.addChangeListener(listener);
}
代码示例来源:origin: libgdx/libgdx
public void addChangeListener (ChangeListener listener) {
spinner.addChangeListener(listener);
}
代码示例来源:origin: libgdx/libgdx
protected void initializeComponents () {
super.initializeComponents();
JPanel contentPanel = getContentPanel();
{
JLabel label = new JLabel("Value:");
contentPanel.add(label, new GridBagConstraints(0, 1, 1, 1, 0, 0, GridBagConstraints.EAST, GridBagConstraints.NONE,
new Insets(0, 0, 0, 6), 0, 0));
}
{
valueSpinner = new JSpinner(new SpinnerNumberModel(new Float(0), new Float(-99999), new Float(99999), new Float(0.1f)));
contentPanel.add(valueSpinner, new GridBagConstraints(1, 1, 1, 1, 1, 0, GridBagConstraints.WEST,
GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
}
valueSpinner.addChangeListener(new ChangeListener() {
public void stateChanged (ChangeEvent event) {
NumericPanel.this.value.setValue((Float)valueSpinner.getValue());
}
});
}
}
代码示例来源:origin: libgdx/libgdx
protected void initializeComponents () {
super.initializeComponents();
JPanel contentPanel = getContentPanel();
{
JLabel label = new JLabel("Value:");
contentPanel.add(label, new GridBagConstraints(0, 1, 1, 1, 0, 0, GridBagConstraints.EAST, GridBagConstraints.NONE,
new Insets(0, 0, 0, 6), 0, 0));
}
{
valueSpinner = new JSpinner(new SpinnerNumberModel(new Float(0), new Float(-99999), new Float(99999), new Float(0.1f)));
contentPanel.add(valueSpinner, new GridBagConstraints(1, 1, 1, 1, 1, 0, GridBagConstraints.WEST,
GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
}
valueSpinner.addChangeListener(new ChangeListener() {
public void stateChanged (ChangeEvent event) {
NumericPanel.this.value.setValue((Float)valueSpinner.getValue());
}
});
}
}
代码示例来源:origin: libgdx/libgdx
protected static <K> void setValue(JSpinner spinner, K object){
ChangeListener[] listeners = spinner.getChangeListeners();
ChangeListener listener = null;
if(listeners != null && listeners.length >0){
listener = listeners[0];
spinner.removeChangeListener(listener);
}
spinner.setValue(object);
if(listener != null) spinner.addChangeListener(listener);
}
代码示例来源:origin: libgdx/libgdx
protected static <K> void setValue(JSpinner spinner, K object){
ChangeListener[] listeners = spinner.getChangeListeners();
ChangeListener listener = null;
if(listeners != null && listeners.length >0){
listener = listeners[0];
spinner.removeChangeListener(listener);
}
spinner.setValue(object);
if(listener != null) spinner.addChangeListener(listener);
}
代码示例来源:origin: libgdx/libgdx
public NumericPanel (final NumericValue value, String name, String description) {
super(value, name, description);
this.value = value;
initializeComponents();
valueSpinner.setValue(value.getValue());
valueSpinner.addChangeListener(new ChangeListener() {
public void stateChanged (ChangeEvent event) {
value.setValue((Float)valueSpinner.getValue());
}
});
}
代码示例来源:origin: libgdx/libgdx
public NumericPanel (final NumericValue value, String name, String description) {
super(value, name, description);
this.value = value;
initializeComponents();
valueSpinner.setValue(value.getValue());
valueSpinner.addChangeListener(new ChangeListener() {
public void stateChanged (ChangeEvent event) {
value.setValue((Float)valueSpinner.getValue());
}
});
}
代码示例来源:origin: libgdx/libgdx
protected static <K> void setValue(Slider slider, float value){
ChangeListener[] listeners = slider.spinner.getChangeListeners();
ChangeListener listener = null;
if(listeners != null && listeners.length >0){
listener = listeners[0];
slider.spinner.removeChangeListener(listener);
}
slider.setValue(value);
if(listener != null) slider.spinner.addChangeListener(listener);
}
代码示例来源:origin: libgdx/libgdx
protected static <K> void setValue(Slider slider, float value){
ChangeListener[] listeners = slider.spinner.getChangeListeners();
ChangeListener listener = null;
if(listeners != null && listeners.length >0){
listener = listeners[0];
slider.spinner.removeChangeListener(listener);
}
slider.setValue(value);
if(listener != null) slider.spinner.addChangeListener(listener);
}
代码示例来源:origin: kiegroup/optaplanner
private JPanel createTableHeader() {
JPanel headerPanel = new JPanel(new FlowLayout());
headerPanel.add(new JLabel("Standard deviation maximum"));
standardDeviationMaximumField = new JSpinner(new SpinnerNumberModel(1.0, 0.0, 10.0, 0.001));
standardDeviationMaximumField.setEditor(new JSpinner.NumberEditor(standardDeviationMaximumField,
InvestmentNumericUtil.MILLIS_PERCENT_PATTERN));
headerPanel.add(standardDeviationMaximumField);
standardDeviationMaximumField.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
if (ignoreChangeEvents) {
return;
}
long standardDeviationMillisMaximum = (long) (((Number) standardDeviationMaximumField.getValue()).doubleValue() * 1000.0);
changeStandardDeviationMillisMaximum(standardDeviationMillisMaximum);
}
});
return headerPanel;
}
代码示例来源:origin: libgdx/libgdx
fontSizeSpinner.addChangeListener(listener);
gammaSpinner.addChangeListener(listener);
代码示例来源:origin: libgdx/libgdx
fontSizeSpinner.addChangeListener(listener);
gammaSpinner.addChangeListener(listener);
代码示例来源:origin: skylot/jadx
minLenSpinner.addChangeListener(e -> {
settings.setDeobfuscationMinLength((Integer) minLenSpinner.getValue());
needReload();
maxLenSpinner.addChangeListener(e -> {
settings.setDeobfuscationMaxLength((Integer) maxLenSpinner.getValue());
needReload();
代码示例来源:origin: stackoverflow.com
hSpinner.addChangeListener(changeListener);
vSpinner.addChangeListener(changeListener);
hBorderSpinner.addChangeListener(changeListener);
vBorderSpinner.addChangeListener(changeListener);
代码示例来源:origin: bonnyfone/vectalign
0.1);//step
spinnerStroke = new JSpinner(spinnerModel);
spinnerStroke.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
try {
代码示例来源:origin: skylot/jadx
settings.getThreadsCount(), 1, Runtime.getRuntime().availableProcessors() * 2, 1);
JSpinner threadsCount = new JSpinner(spinnerModel);
threadsCount.addChangeListener(e -> {
settings.setThreadsCount((Integer) threadsCount.getValue());
needReload();
代码示例来源:origin: kiegroup/optaplanner
InvestmentNumericUtil.MILLIS_PERCENT_PATTERN));
regionPanel.addRowHeader(HEADER_COLUMN_EXTRA_PROPERTY_2, region, maximumField);
maximumField.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
InvestmentNumericUtil.MILLIS_PERCENT_PATTERN));
sectorPanel.addRowHeader(HEADER_COLUMN_EXTRA_PROPERTY_2, sector, maximumField);
maximumField.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
内容来源于网络,如有侵权,请联系作者删除!