aboutsummaryrefslogtreecommitdiff
path: root/src/NonZeroSpinnerModel.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/NonZeroSpinnerModel.java')
-rw-r--r--src/NonZeroSpinnerModel.java43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/NonZeroSpinnerModel.java b/src/NonZeroSpinnerModel.java
new file mode 100644
index 0000000..34c8bc3
--- /dev/null
+++ b/src/NonZeroSpinnerModel.java
@@ -0,0 +1,43 @@
+/* */ import javax.swing.SpinnerModel;
+/* */ import javax.swing.event.ChangeListener;
+/* */
+/* */ public class NonZeroSpinnerModel
+/* */ implements SpinnerModel
+/* */ {
+/* 7 */ int current = 1;
+/* */
+/* */ public void addChangeListener(ChangeListener arg0)
+/* */ {
+/* */ }
+/* */
+/* */ public Object getNextValue()
+/* */ {
+/* 16 */ return new Integer(this.current + 1);
+/* */ }
+/* */
+/* */ public Object getPreviousValue()
+/* */ {
+/* 21 */ if (this.current == 1) return new Integer(this.current);
+/* 22 */ return new Integer(this.current - 1);
+/* */ }
+/* */
+/* */ public Object getValue()
+/* */ {
+/* 27 */ return new Integer(this.current);
+/* */ }
+/* */
+/* */ public void removeChangeListener(ChangeListener arg0)
+/* */ {
+/* */ }
+/* */
+/* */ public void setValue(Object arg0)
+/* */ {
+/* 38 */ if ((arg0 instanceof Integer))
+/* 39 */ this.current = ((Integer)arg0).intValue();
+/* */ }
+/* */ }
+
+/* Location: Modulus.jar
+ * Qualified Name: NonZeroSpinnerModel
+ * JD-Core Version: 0.6.2
+ */ \ No newline at end of file