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