diff options
Diffstat (limited to 'libjava/classpath/javax/swing/JSpinner.java')
-rw-r--r-- | libjava/classpath/javax/swing/JSpinner.java | 42 |
1 files changed, 35 insertions, 7 deletions
diff --git a/libjava/classpath/javax/swing/JSpinner.java b/libjava/classpath/javax/swing/JSpinner.java index fc2b13e81a9..af34d9cf67d 100644 --- a/libjava/classpath/javax/swing/JSpinner.java +++ b/libjava/classpath/javax/swing/JSpinner.java @@ -108,10 +108,10 @@ public class JSpinner extends JComponent /** * DOCUMENT ME! */ - public void commitEdit() - throws ParseException + public void commitEdit() throws ParseException { - } /* TODO */ + // TODO: Implement this properly. + } /** * DOCUMENT ME! @@ -184,7 +184,8 @@ public class JSpinner extends JComponent */ public void propertyChange(PropertyChangeEvent event) { - } /* TODO */ + // TODO: Implement this properly. + } /** * DOCUMENT ME! @@ -193,11 +194,12 @@ public class JSpinner extends JComponent */ public void stateChanged(ChangeEvent event) { - } /* TODO */ + // TODO: Implement this properly. + } - /* no-ops */ public void removeLayoutComponent(Component child) { + // Nothing to do here. } /** @@ -208,6 +210,7 @@ public class JSpinner extends JComponent */ public void addLayoutComponent(String name, Component child) { + // Nothing to do here. } } @@ -258,6 +261,31 @@ public class JSpinner extends JComponent } /** + * A <code>JSpinner</code> editor used for the {@link SpinnerListModel}. + * This editor uses a <code>JFormattedTextField</code> to edit the values + * of the spinner. + * + * @author Roman Kennke (kennke@aicas.com) + */ + public static class ListEditor extends DefaultEditor + { + /** + * Creates a new instance of <code>ListEditor</code>. + * + * @param spinner the spinner for which this editor is used + */ + public ListEditor(JSpinner spinner) + { + super(spinner); + } + + public SpinnerListModel getModel() + { + return (SpinnerListModel) getSpinner().getModel(); + } + } + + /** * An editor class for a <code>JSpinner</code> that is used * for displaying and editing dates (e.g. that uses * <code>SpinnerDateModel</code> as model). @@ -307,7 +335,7 @@ public class JSpinner extends JComponent /** * Initializes the JFormattedTextField for this editor. * - * @param the date format to use in the formatted text field + * @param format the date format to use in the formatted text field */ private void init(SimpleDateFormat format) { |