本文整理了Java中javax.swing.JSpinner.getNextValue()
方法的一些代码示例,展示了JSpinner.getNextValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSpinner.getNextValue()
方法的具体详情如下:
包路径:javax.swing.JSpinner
类名称:JSpinner
方法名:getNextValue
暂无
代码示例来源:origin: UISpec4J/UISpec4J
/**
* Clicks on the button for next value
*/
public void clickForNextValue() {
try {
jSpinner.setValue(jSpinner.getNextValue());
}
catch (IllegalArgumentException e) {
// Ignore it, as in the UI
}
}
代码示例来源:origin: stackoverflow.com
JSpinner lines = new JSpinner();
lines.addMouseWheelListener(new MouseWheelListener() {
public void mouseWheelMoved(MouseWheelEvent e) {
int direction = e.getWheelRotation();
if (direction > 0 && lines.getPreviousValue() != null){ // down
lines.setValue(lines.getPreviousValue());
} else if (direction < 0 && lines.getNextValue() != null){ // up
lines.setValue(lines.getNextValue());
}
}
});
代码示例来源:origin: com.jidesoft/jide-oss
@Override
public Point getNextValue() {
updateField();
return (Point) super.getNextValue();
}
代码示例来源:origin: joel-costigliola/assertj-swing
@RunsInCurrentThread
private static void incrementValue(@Nonnull JSpinner spinner, int times) {
for (int i = 0; i < times; i++) {
Object newValue = spinner.getNextValue();
if (newValue == null) {
return;
}
spinner.setValue(newValue);
}
}
代码示例来源:origin: joel-costigliola/assertj-swing
@RunsInEDT
private static void validateAndIncrementValue(final @Nonnull JSpinner spinner) {
execute(() -> {
checkEnabledAndShowing(spinner);
Object newValue = spinner.getNextValue();
if (newValue != null) {
spinner.setValue(newValue);
}
});
}
代码示例来源:origin: UISpec4J/UISpec4J
public void check() {
Object nextValue = jSpinner.getNextValue();
if (nextValue == null) {
AssertAdapter.fail("No previous value from the end");
}
AssertAdapter.assertEquals(expectedNextValue, nextValue);
}
};
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@Override
public Object getNextValue() {
try {
((NumberEditor) getEditor()).getTextField().commitEdit();
} catch (ParseException ex) {
// no op
}
return super.getNextValue();
}
代码示例来源:origin: net.sf.tinylaf/tinylaf
Object value = isNext ? spinner.getNextValue() :
spinner.getPreviousValue();
if(value != null) {
内容来源于网络,如有侵权,请联系作者删除!