This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: JSpinner and friends
- From: Michael Koch <konqueror at gmx dot de>
- To: java-patches at gcc dot gnu dot org
- Date: Wed, 11 Aug 2004 15:24:07 +0200
- Subject: Patch: JSpinner and friends
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi list,
I just commited the JSpinner stuff from Ka-Hing Cheung to gui branch.
Michael
2004-08-11 Ka-Hing Cheung <kahing@javabsp.org>
* javax/swing/AbstractSpinnerModel.java,
javax/swing/JSpinner.java,
javax/swing/SpinnerNumberModel.java,
javax/swing/plaf/basic/BasicSpinnerUI.java:
New files.
* javax/swing/plaf/basic/BasicLookAndFeel.java
(initClassDefaults): Added defaults for BasicSpinnerUI.
2004-08-11 Michael Koch <konqueror@gmx.de>
* Makefile.am: Added new files.
* Makefile.in: Regenerated.
- --
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFBGh36WSOgCCdjSDsRArBoAKCeClyO6LUq+LkM+ptaCTZk9fjthQCfWxGQ
CyR6eHvZ9XpTWUSMwQwyhII=
=El1m
-----END PGP SIGNATURE-----
Index: javax/swing/AbstractSpinnerModel.java
===================================================================
RCS file: javax/swing/AbstractSpinnerModel.java
diff -N javax/swing/AbstractSpinnerModel.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/swing/AbstractSpinnerModel.java 11 Aug 2004 13:18:29 -0000
@@ -0,0 +1,115 @@
+/* AbstractSpinnerModel.java --
+ Copyright (C) 2004 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package javax.swing;
+
+import java.util.EventListener;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+import javax.swing.event.EventListenerList;
+
+/**
+ * AbstractSpinnerModel
+ * @author Ka-Hing Cheung
+ * @version 1.0
+ */
+public abstract class AbstractSpinnerModel implements SpinnerModel
+{
+ private ChangeEvent changeEvent = new ChangeEvent(this);
+
+ protected EventListenerList listenerList = new EventListenerList();
+
+ /**
+ * Creates an <code>AbstractSpinnerModel</code>.
+ */
+ public AbstractSpinnerModel()
+ {
+ }
+
+ /**
+ * Adds a <code>ChangeListener</code>.
+ *
+ * @param listener the listener to add
+ */
+ public void addChangeListener(ChangeListener listener)
+ {
+ listenerList.add(ChangeListener.class, listener);
+ }
+
+ /**
+ * Gets all the listeners that are of a particular type.
+ *
+ * @param c the type of listener
+ * @return the listeners that are of the specific type
+ */
+ public EventListener[] getListeners(Class c)
+ {
+ return listenerList.getListeners(c);
+ }
+
+ /**
+ * Gets all the <code>ChangeListener</code>s.
+ *
+ * @return all the <code>ChangeListener</code>s
+ */
+ public ChangeListener[] getChangeListeners()
+ {
+ return (ChangeListener[]) listenerList.getListeners(ChangeListener.class);
+ }
+
+ /**
+ * Remove a particular listener.
+ *
+ * @param listener the listener to remove
+ */
+ public void removeChangeListener(ChangeListener listener)
+ {
+ listenerList.remove(ChangeListener.class, listener);
+ }
+
+ /**
+ * Fires a <code>ChangeEvent</code> to all the <code>ChangeListener</code>s
+ * added to this model
+ */
+ protected void fireStateChanged()
+ {
+ ChangeListener[] listeners = getChangeListeners();
+
+ for(int i = 0; i < listeners.length; ++i)
+ listeners[i].stateChanged(changeEvent);
+ }
+}
Index: javax/swing/JSpinner.java
===================================================================
RCS file: javax/swing/JSpinner.java
diff -N javax/swing/JSpinner.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/swing/JSpinner.java 11 Aug 2004 13:18:29 -0000
@@ -0,0 +1,374 @@
+/* JSpinner.java --
+ Copyright (C) 2004 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package javax.swing;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.Dimension;
+import java.awt.LayoutManager;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.text.DecimalFormat;
+import java.text.ParseException;
+import javax.swing.border.EtchedBorder;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+import javax.swing.event.EventListenerList;
+import javax.swing.plaf.SpinnerUI;
+import java.util.EventListener;
+
+/**
+ * A JSpinner is a component which typically contains a numeric value and a
+ * way to manipulate the value.
+ *
+ * @author Ka-Hing Cheung
+ * @version 1.0
+ */
+public class JSpinner extends JComponent
+{
+ public static class StubEditor extends JLabel implements ChangeListener
+ {
+ private JLabel label;
+ private JButton up;
+ private JButton down;
+ private JSpinner spinner;
+
+ public StubEditor(JSpinner spinner)
+ {
+ this.spinner = spinner;
+ setBorder(new EtchedBorder());
+ setHorizontalAlignment(SwingConstants.TRAILING);
+ stateChanged(null); /* fill in the label */
+ }
+
+ public void stateChanged(ChangeEvent evt)
+ {
+ setText(String.valueOf(spinner.getValue()));
+ }
+ }
+
+ public static class DefaultEditor extends JPanel
+ implements ChangeListener, PropertyChangeListener, LayoutManager
+ {
+ public DefaultEditor(JSpinner spinner)
+ {
+ spinner.addChangeListener(this);
+ } /* TODO */
+
+ public void commitEdit()
+ {
+ } /* TODO */
+
+ public void dismiss(JSpinner spinner)
+ {
+ spinner.removeChangeListener(this);
+ }
+
+ public JFormattedTextField getTextField()
+ {
+ return null;
+ } /* TODO */
+
+ public void layoutContainer(Container parent)
+ {
+
+ } /* TODO */
+
+ public Dimension minimumLayoutSize(Container parent)
+ {
+ return null;
+ } /* TODO */
+
+ public Dimension preferredLayoutSize(Container parent)
+ {
+ return null;
+ } /* TODO */
+
+ public void propertyChange(PropertyChangeEvent evt)
+ {
+
+ } /* TODO */
+
+ public void stateChanged(ChangeEvent evt)
+ {
+
+ } /* TODO */
+
+ /* no-ops */
+ public void removeLayoutComponent(Component child)
+ {
+ }
+
+ public void addLayoutComponent(String name, Component child)
+ {
+ }
+ }
+
+ public static class NumberEditor extends DefaultEditor
+ {
+ public NumberEditor(JSpinner spinner)
+ {
+ super(spinner);
+ }
+
+ public DecimalFormat getFormat()
+ {
+ return null;
+ }
+ }
+
+ private SpinnerModel model;
+ private JComponent editor;
+ private EventListenerList listenerList = new EventListenerList();
+
+ private ChangeListener listener = new ChangeListener()
+ {
+ public void stateChanged(ChangeEvent evt)
+ {
+ fireStateChanged();
+ }
+ };
+
+ /**
+ * Creates a JSpinner with <code>SpinnerNumberModel</code>
+ *
+ * @see javax.swing.SpinnerNumberModel
+ */
+ public JSpinner()
+ {
+ this(new SpinnerNumberModel());
+ }
+
+ /**
+ * Creates a JSpinner with the specific model and sets the default editor
+ */
+ public JSpinner(SpinnerModel model)
+ {
+ this.model = model;
+ model.addChangeListener(listener);
+ setEditor(createEditor(model));
+ updateUI();
+ }
+
+ /**
+ * If the editor is <code>JSpinner.DefaultEditor</code>, then forwards the
+ * call to it, otherwise do nothing.
+ */
+ public void commitEdit() throws ParseException
+ {
+ if(editor instanceof DefaultEditor)
+ ((DefaultEditor)editor).commitEdit();
+ }
+
+ /**
+ * Gets the current editor
+ *
+ * @return the current editor
+ * @see #setEditor
+ */
+ public JComponent getEditor()
+ {
+ return editor;
+ }
+
+ /**
+ * Changes the current editor to the new editor. This methods should remove
+ * the old listeners (if any) and adds the new listeners (if any).
+ *
+ * @param editor the new editor
+ * @see #getEditor
+ */
+ public void setEditor(JComponent editor)
+ {
+ if(editor == null)
+ throw new IllegalArgumentException("editor may not be null");
+
+ if(this.editor instanceof DefaultEditor)
+ ((DefaultEditor)editor).dismiss(this);
+ else if(this.editor instanceof ChangeListener)
+ removeChangeListener((ChangeListener)this.editor);
+
+ if(editor instanceof ChangeListener)
+ addChangeListener((ChangeListener)editor);
+
+ this.editor = editor;
+ }
+
+ /**
+ * Gets the underly model.
+ *
+ * @return the underly model
+ */
+ public SpinnerModel getModel()
+ {
+ return model;
+ }
+
+ /**
+ * Gets the next value without changing the current value.
+ *
+ * @return the next value
+ * @see javax.swing.SpinnerModel#getNextValue
+ */
+ public Object getNextValue()
+ {
+ return model.getNextValue();
+ }
+
+ /**
+ * Gets the previous value without changing the current value.
+ *
+ * @return the previous value
+ * @see javax.swing.SpinnerModel#getPreviousValue
+ */
+ public Object getPreviousValue()
+ {
+ return model.getPreviousValue();
+ }
+
+ /**
+ * Gets the <code>SpinnerUI</code> that handles this spinner
+ *
+ * @return the <code>SpinnerUI</code>
+ */
+ public SpinnerUI getUI()
+ {
+ return (SpinnerUI)ui;
+ }
+
+ /**
+ * Gets the current value of the spinner, according to the underly model, not
+ * the UI.
+ *
+ * @return the current value
+ * @see javax.swing.SpinnerModel#getValue
+ */
+ public Object getValue()
+ {
+ return model.getValue();
+ }
+
+ /**
+ * This method returns a name to identify which look and feel class will be
+ * the UI delegate for this spinner.
+ *
+ * @return The UIClass identifier. "SpinnerUI"
+ */
+ public String getUIClassID()
+ {
+ return "SpinnerUI";
+ }
+
+ /**
+ * This method resets the spinner's UI delegate to the default UI for the
+ * current look and feel.
+ */
+ public void updateUI()
+ {
+ setUI((SpinnerUI) UIManager.getUI(this));
+ }
+
+ /**
+ * This method sets the spinner's UI delegate.
+ *
+ * @param ui The spinner's UI delegate.
+ */
+ public void setUI(SpinnerUI ui)
+ {
+ super.setUI(ui);
+ }
+
+ /**
+ * Adds a <code>ChangeListener</code>
+ *
+ * @param listener the listener to add
+ */
+ public void addChangeListener(ChangeListener listener)
+ {
+ listenerList.add(ChangeListener.class, listener);
+ }
+
+ /**
+ * Remove a particular listener
+ *
+ * @param listener the listener to remove
+ */
+ public void removeChangeListener(ChangeListener listener)
+ {
+ listenerList.remove(ChangeListener.class, listener);
+ }
+
+ /**
+ * Gets all the <code>ChangeListener</code>s
+ *
+ * @return all the <code>ChangeListener</code>s
+ */
+ public ChangeListener[] getChangeListeners()
+ {
+ return (ChangeListener[]) listenerList.getListeners(ChangeListener.class);;
+ }
+
+ /**
+ * Fires a <code>ChangeEvent</code> to all the <code>ChangeListener</code>s
+ * added to this <code>JSpinner</code>
+ */
+ protected void fireStateChanged()
+ {
+ ChangeEvent evt = new ChangeEvent(this);
+ ChangeListener[] listeners = getChangeListeners();
+
+ for(int i = 0; i < listeners.length; ++i)
+ listeners[i].stateChanged(evt);
+ }
+
+ /**
+ * Creates an editor for this <code>JSpinner</code>. Really, it should be a
+ * <code>JSpinner.DefaultEditor</code>, but since that should be implemented
+ * by a JFormattedTextField, and one is not written, I am just using a dummy
+ * one backed by a JLabel.
+ *
+ * @return the default editor
+ */
+ protected JComponent createEditor(SpinnerModel model)
+ {
+ return new StubEditor(this);
+ } /* TODO */
+}
Index: javax/swing/SpinnerNumberModel.java
===================================================================
RCS file: javax/swing/SpinnerNumberModel.java
diff -N javax/swing/SpinnerNumberModel.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/swing/SpinnerNumberModel.java 11 Aug 2004 13:18:29 -0000
@@ -0,0 +1,256 @@
+/* SpinnerNumberModel.java --
+ Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package javax.swing;
+
+/**
+ * SpinnerNumberModel
+ * @author Ka-Hing Cheung
+ * @version 1.0
+ */
+public class SpinnerNumberModel extends AbstractSpinnerModel
+{
+ private Number value;
+ private Comparable minimum;
+ private Comparable maximum;
+ private Number stepSize;
+
+ /**
+ * Creates a <code>SpinnerNumberModel</code> with initial value 0, step 1,
+ * and no maximum nor minimum.
+ */
+ public SpinnerNumberModel()
+ {
+ this(new Integer(0), null, null, new Integer(1));
+ }
+
+ /**
+ * Creates a <code>SpinnerNumberModel</code> with double precision
+ *
+ * @param value the initial value
+ * @param minimum the minimum value
+ * @param maximum the maximum value
+ * @param stepSize the step size
+ * @throws IllegalArgumentException if minimum <= value <= maximum does not
+ * hold
+ */
+ public SpinnerNumberModel(double value, double minimum, double maximum,
+ double stepSize)
+ {
+ this(new Double(value), new Double(minimum), new Double(maximum),
+ new Double(stepSize));
+ }
+
+ /**
+ * Creates a <code>SpinnerNumberModel</code> with integer precision
+ *
+ * @param value the initial value
+ * @param minimum the minimum value
+ * @param maximum the maximum value
+ * @param stepSize the step size
+ * @throws IllegalArgumentException if minimum <= value <= maximum does not
+ * hold
+ */
+ public SpinnerNumberModel(int value, int minimum, int maximum, int stepSize)
+ {
+ this(new Integer(value), new Integer(minimum), new Integer(maximum),
+ new Integer(stepSize));
+ }
+
+ /**
+ * Creates a <code>SpinnerNumberModel</code> with <code>Number</code>s and
+ * <code>Comparable</code>s.
+ *
+ * @param value the initial value
+ * @param minimum the minimum value, if null there's no minimum
+ * @param maximum the maximum value, if null there's no maximum
+ * @param stepSize the step size
+ * @throws IllegalArgumentException if minimum <= value <= maximum does not
+ * hold
+ */
+ public SpinnerNumberModel(Number value, Comparable minimum,
+ Comparable maximum, Number stepSize)
+ {
+ if(stepSize == null)
+ throw new IllegalArgumentException("stepSize may not be null");
+ if(value == null)
+ throw new IllegalArgumentException("value may not be null");
+ if(minimum != null)
+ {
+ if(minimum.compareTo(value) > 0)
+ throw new IllegalArgumentException("minimum is not <= value");
+ }
+ else
+ {
+ minimum = new Comparable()
+ {
+ public int compareTo(Object obj)
+ {
+ return -1;
+ }
+ };
+ }
+
+ if(maximum != null)
+ {
+ if(maximum.compareTo(value) < 0)
+ throw new IllegalArgumentException("maximum is not >= value");
+ }
+ else
+ {
+ maximum = new Comparable()
+ {
+ public int compareTo(Object obj)
+ {
+ return 1;
+ }
+ };
+ }
+
+ this.value = value;
+ this.stepSize = stepSize;
+ this.minimum = minimum;
+ this.maximum = maximum;
+ }
+
+ /**
+ * Sets the new value and fire a change event
+ *
+ * @param value the new value
+ * @throws IllegalArgumentException if minimum <= value <= maximum does not
+ * hold
+ */
+ public void setValue(Object value)
+ {
+ if(! (value instanceof Number))
+ throw new IllegalArgumentException("value must be a Number");
+
+ this.value = (Number) value;
+ fireStateChanged();
+ }
+
+ /**
+ * Gets the current value
+ *
+ * @return the current value
+ */
+ public Object getValue()
+ {
+ return value;
+ }
+
+ /**
+ * Gets the next value without changing the current value, or null if the
+ * current value is maximum.
+ *
+ * @return the next value
+ */
+ public Object getNextValue()
+ {
+ Number num;
+
+ if(value instanceof Double)
+ {
+ num = new Double(value.doubleValue() + stepSize.doubleValue());
+ }
+ else if(value instanceof Float)
+ {
+ num = new Double(value.floatValue() + stepSize.floatValue());
+ }
+ else if(value instanceof Long)
+ {
+ num = new Long(value.longValue() + stepSize.longValue());
+ }
+ else if(value instanceof Integer)
+ {
+ num = new Integer(value.intValue() + stepSize.intValue());
+ }
+ else if(value instanceof Short)
+ {
+ num = new Short((short) (value.shortValue() + stepSize.shortValue()));
+ }
+ else
+ {
+ num = new Byte((byte) (value.byteValue() + stepSize.byteValue()));
+ }
+
+ return maximum.compareTo(num) >= 0 ? num : null;
+ }
+
+ /**
+ * Gets the previous value without changing the current value, or null if the
+ * current value is minimum.
+ *
+ * @return the previous value
+ */
+ public Object getPreviousValue()
+ {
+ Number num;
+
+ if(value instanceof Double)
+ {
+ num = new Double(value.doubleValue() - stepSize.doubleValue());
+ }
+ else if(value instanceof Float)
+ {
+ num = new Double(value.floatValue() - stepSize.floatValue());
+ }
+ else if(value instanceof Long)
+ {
+ num = new Long(value.longValue() - stepSize.longValue());
+ }
+ else if(value instanceof Integer)
+ {
+ num = new Integer(value.intValue() - stepSize.intValue());
+ }
+ else if(value instanceof Short)
+ {
+ num = new Short((short) (value.shortValue() - stepSize.shortValue()));
+ }
+ else
+ {
+ num = new Byte((byte) (value.byteValue() - stepSize.byteValue()));
+ }
+
+ return maximum.compareTo(num) >= 0 ? num : null;
+ }
+
+ public Number getNumber()
+ {
+ return value;
+ }
+}
Index: javax/swing/plaf/basic/BasicSpinnerUI.java
===================================================================
RCS file: javax/swing/plaf/basic/BasicSpinnerUI.java
diff -N javax/swing/plaf/basic/BasicSpinnerUI.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/swing/plaf/basic/BasicSpinnerUI.java 11 Aug 2004 13:18:29 -0000
@@ -0,0 +1,508 @@
+/* SpinnerUI.java --
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package javax.swing.plaf.basic;
+
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.Dimension;
+import java.awt.Insets;
+import java.awt.LayoutManager;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseAdapter;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import javax.swing.JButton;
+import javax.swing.JComponent;
+import javax.swing.JSpinner;
+import javax.swing.Timer;
+import javax.swing.UIDefaults;
+import javax.swing.UIManager;
+import javax.swing.plaf.SpinnerUI;
+import javax.swing.plaf.ComponentUI;
+
+/**
+ * @since 1.4
+ * @see javax.swing.JSpinner
+ * @author Ka-Hing Cheung
+ */
+public class BasicSpinnerUI extends SpinnerUI
+{
+ /**
+ * Creates a new <code>ComponentUI</code> for the specified
+ * <code>JComponent</code>
+ *
+ * @return a ComponentUI
+ */
+ public static ComponentUI createUI(JComponent c)
+ {
+ return new BasicSpinnerUI();
+ }
+
+ /**
+ * Creates an editor component. Really, it just returns
+ * <code>JSpinner.getEditor()</code>
+ *
+ * @return a JComponent as an editor
+ * @see javax.swing.JSpinner#getEditor
+ */
+ protected JComponent createEditor()
+ {
+ return spinner.getEditor();
+ }
+
+ /**
+ * Creates a <code>LayoutManager</code> that layouts the sub components.
+ * The subcomponents are identifies by the constraint "Next", "Previous" and
+ * "Editor"
+ *
+ * @return a LayoutManager
+ * @see java.awt.LayoutManager
+ */
+ protected LayoutManager createLayout()
+ {
+ return new DefaultLayoutManager();
+ }
+
+ /**
+ * Creates the "Next" button
+ *
+ * @return the next button component
+ */
+ protected Component createNextButton()
+ {
+ JButton button = new BasicArrowButton(BasicArrowButton.NORTH);
+ return button;
+ }
+
+ /**
+ * Creates the "Previous" button
+ *
+ * @return the previous button component
+ */
+ protected Component createPreviousButton()
+ {
+ JButton button = new BasicArrowButton(BasicArrowButton.SOUTH);
+ return button;
+ }
+
+ /**
+ * Creates the <code>PropertyChangeListener</code> that will be attached
+ * by <code>installListeners</code>. It should watch for the "editor"
+ * property, when it's changed, replace the old editor with the new one,
+ * probably by calling <code>replaceEditor</code>
+ *
+ * @return a PropertyChangeListener
+ * @see #replaceEditor
+ */
+ protected PropertyChangeListener createPropertyChangeListener()
+ {
+ return new PropertyChangeListener()
+ {
+ public void propertyChange(PropertyChangeEvent evt)
+ {
+ if("editor".equals(evt.getPropertyName()))
+ {
+ BasicSpinnerUI.this.replaceEditor((JComponent)evt.getOldValue(),
+ (JComponent)evt.getNewValue());
+ }
+ }
+ };
+ }
+
+ /**
+ * Called by <code>installUI</code>. This should set various defaults
+ * obtained from <code>UIManager.getLookAndFeelDefaults</code>, as well as
+ * set the layout obtained from <code>createLayout</code>
+ *
+ * @see #javax.swing.UIManager#getLookAndFeelDefaults
+ * @see #createLayout
+ * @see #installUI
+ */
+ protected void installDefaults()
+ {
+ /* most of it copied from BasicLabelUI, I don't know what keys are
+ available, so someone may want to update this. Hence: TODO
+ */
+ UIDefaults defaults = UIManager.getLookAndFeelDefaults();
+ /*
+ spinner.setForeground(defaults.getColor("Spinner.foreground"));
+ spinner.setBackground(defaults.getColor("Spinner.background"));
+ spinner.setFont(defaults.getFont("Spinner.font"));
+ spinner.setBorder(defaults.getBorder("Spinner.border"));
+ */
+ spinner.setLayout(createLayout());
+ }
+
+ /*
+ * Called by <code>installUI</code>, which basically adds the
+ * <code>PropertyChangeListener</code> created by
+ * <code>createPropertyChangeListener</code>
+ *
+ * @see #createPropertyChangeListener
+ * @see #installUI
+ */
+ protected void installListeners()
+ {
+ spinner.addPropertyChangeListener(listener);
+ }
+
+ /*
+ * Install listeners to the next button so that it increments the model
+ */
+ protected void installNextButtonListeners(Component c)
+ {
+ c.addMouseListener(new MouseAdapter()
+ {
+ public void mousePressed(MouseEvent evt)
+ {
+ increment();
+ timer.setInitialDelay(500);
+ timer.start();
+ }
+
+ public void mouseReleased(MouseEvent evt)
+ {
+ timer.stop();
+ }
+
+ void increment()
+ {
+ Object next = BasicSpinnerUI.this.spinner.getNextValue();
+ if(next != null)
+ {
+ BasicSpinnerUI.this.spinner.getModel().setValue(next);
+ }
+ }
+
+ volatile boolean mouseDown = false;
+ Timer timer = new Timer(50, new ActionListener()
+ {
+ public void actionPerformed(ActionEvent event)
+ {
+ increment();
+ }
+ });
+ });
+ }
+
+ /*
+ * Install listeners to the previous button so that it decrements the model
+ */
+ protected void installPreviousButtonListeners(Component c)
+ {
+ c.addMouseListener(new MouseAdapter()
+ {
+ public void mousePressed(MouseEvent evt)
+ {
+ decrement();
+ timer.setInitialDelay(500);
+ timer.start();
+ }
+
+ public void mouseReleased(MouseEvent evt)
+ {
+ timer.stop();
+ }
+
+ void decrement()
+ {
+ Object prev = BasicSpinnerUI.this.spinner.getPreviousValue();
+ if(prev != null)
+ {
+ BasicSpinnerUI.this.spinner.getModel().setValue(prev);
+ }
+ }
+
+ volatile boolean mouseDown = false;
+ Timer timer = new Timer(50, new ActionListener()
+ {
+ public void actionPerformed(ActionEvent event)
+ {
+ decrement();
+ }
+ });
+ });
+ }
+
+ /**
+ * Install this UI to the <code>JComponent</code>, which in reality,
+ * is a <code>JSpinner</code>. Calls <code>installDefaults</code>,
+ * <code>installListeners</code>, and also adds the buttons and
+ * editor.
+ *
+ * @see #installDefaults
+ * @see #installListeners
+ * @see #createNextButton
+ * @see #createPreviousButton
+ * @see #createEditor
+ */
+ public void installUI(JComponent c)
+ {
+ super.installUI(c);
+
+ spinner = (JSpinner)c;
+
+ installDefaults();
+ installListeners();
+
+ Component next = createNextButton(),
+ previous = createPreviousButton();
+
+ installNextButtonListeners(next);
+ installPreviousButtonListeners(previous);
+
+ c.add(createEditor(), "Editor");
+ c.add(next, "Next");
+ c.add(previous, "Previous");
+ }
+
+ /**
+ * Replace the old editor with the new one
+ *
+ * @param oldEditor the old editor
+ * @param newEditor the new one to replace with
+ */
+ protected void replaceEditor(JComponent oldEditor, JComponent newEditor)
+ {
+ spinner.remove(oldEditor);
+ spinner.add(newEditor);
+ }
+
+ /**
+ * The reverse of <code>installDefaults</code>. Called by
+ * <code>uninstallUI</code>
+ */
+ protected void uninstallDefaults()
+ {
+ spinner.setLayout(null);
+ }
+
+ /**
+ * The reverse of <code>installListeners</code>, called by
+ * <code>uninstallUI</code>
+ */
+ protected void uninstallListeners()
+ {
+ spinner.removePropertyChangeListener(listener);
+ }
+
+ /**
+ * Called when the current L&F is replaced with another one, should call
+ * <code>uninstallDefaults</code> and <code>uninstallListeners</code> as well
+ * as remove the next/previous buttons and the editor
+ */
+ public void uninstallUI(JComponent c)
+ {
+ super.uninstallUI(c);
+
+ uninstallDefaults();
+ uninstallListeners();
+ c.removeAll();
+ }
+
+ /**
+ * The spinner for this UI
+ */
+ protected JSpinner spinner;
+ private PropertyChangeListener listener = createPropertyChangeListener();
+
+ private class DefaultLayoutManager implements LayoutManager
+ {
+ public void layoutContainer(Container parent)
+ {
+
+ synchronized(parent.getTreeLock())
+ {
+ Insets i = parent.getInsets();
+ boolean l2r = parent.getComponentOrientation().isLeftToRight();
+ /*
+ -------------- --------------
+ | | n | | n | |
+ | e | - | or | - | e |
+ | | p | | p | |
+ -------------- --------------
+ */
+
+ Dimension e = minSize(editor);
+ Dimension n = minSize(next);
+ Dimension p = minSize(previous);
+ Dimension s = spinner.getPreferredSize();
+
+ int x = l2r ? i.left : i.right, y = i.top;
+ int w = Math.max(p.width, n.width);
+ int h = Math.max(p.height, n.height);
+ h = Math.max(h, e.height / 2);
+ int e_width = s.width - w;
+
+ if(l2r)
+ {
+ setBounds(editor, x, y + (s.height - e.height) / 2, e_width,
+ e.height);
+ x += e_width;
+
+ setBounds(next, x, y, w, h);
+ y += h;
+
+ setBounds(previous, x, y, w, h);
+ }
+ else
+ {
+ setBounds(next, x, y + (s.height - e.height) / 2, w, h);
+ y += h;
+
+ setBounds(previous, x, y, w, h);
+ x += w;
+ y -= h;
+
+ setBounds(editor, x, y, e_width, e.height);
+ }
+ }
+ }
+
+ public Dimension minimumLayoutSize(Container parent)
+ {
+ Dimension d = new Dimension();
+
+ if(editor != null)
+ {
+ Dimension tmp = editor.getMinimumSize();
+ d.width += tmp.width;
+ d.height = tmp.height;
+ }
+
+ int nextWidth = 0;
+ int previousWidth = 0;
+ int otherHeight = 0;
+
+ if(next != null)
+ {
+ Dimension tmp = next.getMinimumSize();
+ nextWidth = tmp.width;
+ otherHeight += tmp.height;
+ }
+ if(previous != null)
+ {
+ Dimension tmp = previous.getMinimumSize();
+ previousWidth = tmp.width;
+ otherHeight += tmp.height;
+ }
+
+ d.height = Math.max(d.height, otherHeight);
+ d.width += Math.max(nextWidth, previousWidth);
+
+
+ return d;
+ }
+
+ public Dimension preferredLayoutSize(Container parent)
+ {
+ Dimension d = new Dimension();
+
+ if(editor != null)
+ {
+ Dimension tmp = editor.getPreferredSize();
+ d.width += Math.max(tmp.width, 40);
+ d.height = tmp.height;
+ }
+
+ int nextWidth = 0;
+ int previousWidth = 0;
+ int otherHeight = 0;
+
+ if(next != null)
+ {
+ Dimension tmp = next.getPreferredSize();
+ nextWidth = tmp.width;
+ otherHeight += tmp.height;
+ }
+ if(previous != null)
+ {
+ Dimension tmp = previous.getPreferredSize();
+ previousWidth = tmp.width;
+ otherHeight += tmp.height;
+ }
+
+ d.height = Math.max(d.height, otherHeight);
+ d.width += Math.max(nextWidth, previousWidth);
+
+
+ return d;
+ }
+
+ public void removeLayoutComponent(Component child)
+ {
+ if(child == editor)
+ editor = null;
+ else if(child == next)
+ next = null;
+ else if(previous == child)
+ previous = null;
+ }
+
+ public void addLayoutComponent(String name, Component child)
+ {
+ if("Editor".equals(name))
+ editor = child;
+ else if("Next".equals(name))
+ next = child;
+ else if("Previous".equals(name))
+ previous = child;
+ }
+
+ private Dimension minSize(Component c)
+ {
+ if(c == null)
+ return new Dimension();
+ else
+ return c.getMinimumSize();
+ }
+
+ private void setBounds(Component c, int x, int y, int w, int h)
+ {
+ if(c != null)
+ c.setBounds(x, y, w, h);
+ }
+
+ private Component editor;
+ private Component next;
+ private Component previous;
+ }
+
+}
Index: javax/swing/plaf/basic/BasicLookAndFeel.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/plaf/basic/BasicLookAndFeel.java,v
retrieving revision 1.4.2.17
diff -u -b -B -r1.4.2.17 BasicLookAndFeel.java
--- javax/swing/plaf/basic/BasicLookAndFeel.java 30 Jul 2004 21:34:35 -0000 1.4.2.17
+++ javax/swing/plaf/basic/BasicLookAndFeel.java 11 Aug 2004 13:18:30 -0000
@@ -131,6 +131,7 @@
"SeparatorUI", "javax.swing.plaf.basic.BasicSeparatorUI",
"SliderUI", "javax.swing.plaf.basic.BasicSliderUI",
"SplitPaneUI", "javax.swing.plaf.basic.BasicSplitPaneUI",
+ "SpinnerUI", "javax.swing.plaf.basic.BasicSpinnerUI",
"StandardDialogUI", "javax.swing.plaf.basic.BasicStandardDialogUI",
"TabbedPaneUI", "javax.swing.plaf.basic.BasicTabbedPaneUI",
"TableHeaderUI", "javax.swing.plaf.basic.BasicTableHeaderUI",
Index: Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libjava/Makefile.am,v
retrieving revision 1.361.2.37
diff -u -b -B -r1.361.2.37 Makefile.am
--- Makefile.am 11 Aug 2004 12:58:59 -0000 1.361.2.37
+++ Makefile.am 11 Aug 2004 13:18:31 -0000
@@ -1299,6 +1299,7 @@
javax/swing/GrayFilter.java \
javax/swing/AbstractAction.java \
javax/swing/AbstractButton.java \
+javax/swing/AbstractSpinnerModel.java \
javax/swing/plaf/basic/BasicArrowButton.java \
javax/swing/plaf/basic/BasicButtonListener.java \
javax/swing/plaf/basic/BasicButtonUI.java \
@@ -1326,6 +1327,7 @@
javax/swing/plaf/basic/BasicScrollPaneUI.java \
javax/swing/plaf/basic/BasicSeparatorUI.java \
javax/swing/plaf/basic/BasicSliderUI.java \
+javax/swing/plaf/basic/BasicSpinnerUI.java \
javax/swing/plaf/basic/BasicSplitPaneDivider.java \
javax/swing/plaf/basic/BasicSplitPaneUI.java \
javax/swing/plaf/basic/BasicTabbedPaneUI.java \
@@ -1434,6 +1436,7 @@
javax/swing/JRootPane.java \
javax/swing/JScrollBar.java \
javax/swing/JScrollPane.java \
+javax/swing/JSpinner.java \
javax/swing/JTabbedPane.java \
javax/swing/JTextArea.java \
javax/swing/JTextField.java \
@@ -1448,6 +1451,8 @@
javax/swing/ListSelectionModel.java \
javax/swing/LookAndFeel.java \
javax/swing/Scrollable.java \
+javax/swing/SpinnerModel.java \
+javax/swing/SpinnerNumberModel.java \
javax/swing/Spring.java \
javax/swing/SpringLayout.java \
javax/swing/SwingConstants.java \
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/libjava/Makefile.in,v
retrieving revision 1.385.2.37
diff -u -b -B -r1.385.2.37 Makefile.in
--- Makefile.in 11 Aug 2004 12:59:00 -0000 1.385.2.37
+++ Makefile.in 11 Aug 2004 13:18:32 -0000
@@ -977,6 +977,7 @@
javax/swing/GrayFilter.java \
javax/swing/AbstractAction.java \
javax/swing/AbstractButton.java \
+javax/swing/AbstractSpinnerModel.java \
javax/swing/plaf/basic/BasicArrowButton.java \
javax/swing/plaf/basic/BasicButtonListener.java \
javax/swing/plaf/basic/BasicButtonUI.java \
@@ -1004,6 +1005,7 @@
javax/swing/plaf/basic/BasicScrollPaneUI.java \
javax/swing/plaf/basic/BasicSeparatorUI.java \
javax/swing/plaf/basic/BasicSliderUI.java \
+javax/swing/plaf/basic/BasicSpinnerUI.java \
javax/swing/plaf/basic/BasicSplitPaneDivider.java \
javax/swing/plaf/basic/BasicSplitPaneUI.java \
javax/swing/plaf/basic/BasicTabbedPaneUI.java \
@@ -1112,6 +1114,7 @@
javax/swing/JRootPane.java \
javax/swing/JScrollBar.java \
javax/swing/JScrollPane.java \
+javax/swing/JSpinner.java \
javax/swing/JTabbedPane.java \
javax/swing/JTextArea.java \
javax/swing/JTextField.java \
@@ -1126,6 +1129,8 @@
javax/swing/ListSelectionModel.java \
javax/swing/LookAndFeel.java \
javax/swing/Scrollable.java \
+javax/swing/SpinnerModel.java \
+javax/swing/SpinnerNumberModel.java \
javax/swing/Spring.java \
javax/swing/SpringLayout.java \
javax/swing/SwingConstants.java \
@@ -3120,6 +3125,7 @@
javax/swing/border/MatteBorder.lo javax/swing/border/SoftBevelBorder.lo \
javax/swing/border/TitledBorder.lo javax/swing/GrayFilter.lo \
javax/swing/AbstractAction.lo javax/swing/AbstractButton.lo \
+javax/swing/AbstractSpinnerModel.lo \
javax/swing/plaf/basic/BasicArrowButton.lo \
javax/swing/plaf/basic/BasicButtonListener.lo \
javax/swing/plaf/basic/BasicButtonUI.lo \
@@ -3147,6 +3153,7 @@
javax/swing/plaf/basic/BasicScrollPaneUI.lo \
javax/swing/plaf/basic/BasicSeparatorUI.lo \
javax/swing/plaf/basic/BasicSliderUI.lo \
+javax/swing/plaf/basic/BasicSpinnerUI.lo \
javax/swing/plaf/basic/BasicSplitPaneDivider.lo \
javax/swing/plaf/basic/BasicSplitPaneUI.lo \
javax/swing/plaf/basic/BasicTabbedPaneUI.lo \
@@ -3217,18 +3224,20 @@
javax/swing/JList.lo javax/swing/JMenuBar.lo javax/swing/JOptionPane.lo \
javax/swing/JPanel.lo javax/swing/JRadioButton.lo \
javax/swing/JRootPane.lo javax/swing/JScrollBar.lo \
-javax/swing/JScrollPane.lo javax/swing/JTabbedPane.lo \
-javax/swing/JTextArea.lo javax/swing/JTextField.lo \
-javax/swing/JToggleButton.lo javax/swing/JToolTip.lo \
-javax/swing/JTree.lo javax/swing/JViewport.lo javax/swing/JWindow.lo \
-javax/swing/KeyStroke.lo javax/swing/ListCellRenderer.lo \
-javax/swing/ListModel.lo javax/swing/ListSelectionModel.lo \
-javax/swing/LookAndFeel.lo javax/swing/Scrollable.lo \
-javax/swing/Spring.lo javax/swing/SpringLayout.lo \
-javax/swing/SwingConstants.lo javax/swing/SwingUtilities.lo \
-javax/swing/Timer.lo javax/swing/ToolTipManager.lo \
-javax/swing/TransferHandler.lo javax/swing/UIDefaults.lo \
-javax/swing/UIManager.lo javax/swing/UnsupportedLookAndFeelException.lo \
+javax/swing/JScrollPane.lo javax/swing/JSpinner.lo \
+javax/swing/JTabbedPane.lo javax/swing/JTextArea.lo \
+javax/swing/JTextField.lo javax/swing/JToggleButton.lo \
+javax/swing/JToolTip.lo javax/swing/JTree.lo javax/swing/JViewport.lo \
+javax/swing/JWindow.lo javax/swing/KeyStroke.lo \
+javax/swing/ListCellRenderer.lo javax/swing/ListModel.lo \
+javax/swing/ListSelectionModel.lo javax/swing/LookAndFeel.lo \
+javax/swing/Scrollable.lo javax/swing/SpinnerModel.lo \
+javax/swing/SpinnerNumberModel.lo javax/swing/Spring.lo \
+javax/swing/SpringLayout.lo javax/swing/SwingConstants.lo \
+javax/swing/SwingUtilities.lo javax/swing/Timer.lo \
+javax/swing/ToolTipManager.lo javax/swing/TransferHandler.lo \
+javax/swing/UIDefaults.lo javax/swing/UIManager.lo \
+javax/swing/UnsupportedLookAndFeelException.lo \
javax/swing/event/AncestorEvent.lo \
javax/swing/event/AncestorListener.lo javax/swing/event/ChangeEvent.lo \
javax/swing/event/ChangeListener.lo javax/swing/event/DocumentEvent.lo \
@@ -5145,13 +5154,14 @@
.deps/javax/swing/AbstractAction.P .deps/javax/swing/AbstractButton.P \
.deps/javax/swing/AbstractCellEditor.P \
.deps/javax/swing/AbstractListModel.P .deps/javax/swing/AbstractSet.P \
-.deps/javax/swing/Action.P .deps/javax/swing/ActionMap.P \
-.deps/javax/swing/BorderFactory.P .deps/javax/swing/BoundedRangeModel.P \
-.deps/javax/swing/Box.P .deps/javax/swing/BoxLayout.P \
-.deps/javax/swing/ButtonGroup.P .deps/javax/swing/ButtonModel.P \
-.deps/javax/swing/CellEditor.P .deps/javax/swing/CellRendererPane.P \
-.deps/javax/swing/ComboBoxEditor.P .deps/javax/swing/ComboBoxModel.P \
-.deps/javax/swing/ComponentInputMap.P .deps/javax/swing/DebugGraphics.P \
+.deps/javax/swing/AbstractSpinnerModel.P .deps/javax/swing/Action.P \
+.deps/javax/swing/ActionMap.P .deps/javax/swing/BorderFactory.P \
+.deps/javax/swing/BoundedRangeModel.P .deps/javax/swing/Box.P \
+.deps/javax/swing/BoxLayout.P .deps/javax/swing/ButtonGroup.P \
+.deps/javax/swing/ButtonModel.P .deps/javax/swing/CellEditor.P \
+.deps/javax/swing/CellRendererPane.P .deps/javax/swing/ComboBoxEditor.P \
+.deps/javax/swing/ComboBoxModel.P .deps/javax/swing/ComponentInputMap.P \
+.deps/javax/swing/DebugGraphics.P \
.deps/javax/swing/DefaultBoundedRangeModel.P \
.deps/javax/swing/DefaultButtonModel.P \
.deps/javax/swing/DefaultCellEditor.P \
@@ -5183,15 +5193,16 @@
.deps/javax/swing/JRadioButtonMenuItem.P .deps/javax/swing/JRootPane.P \
.deps/javax/swing/JScrollBar.P .deps/javax/swing/JScrollPane.P \
.deps/javax/swing/JSeparator.P .deps/javax/swing/JSlider.P \
-.deps/javax/swing/JSplitPane.P .deps/javax/swing/JTabbedPane.P \
-.deps/javax/swing/JTable.P .deps/javax/swing/JTextArea.P \
-.deps/javax/swing/JTextField.P .deps/javax/swing/JTextPane.P \
-.deps/javax/swing/JToggleButton.P .deps/javax/swing/JToolBar.P \
-.deps/javax/swing/JToolTip.P .deps/javax/swing/JTree.P \
-.deps/javax/swing/JViewport.P .deps/javax/swing/JWindow.P \
-.deps/javax/swing/KeyStroke.P .deps/javax/swing/ListCellRenderer.P \
-.deps/javax/swing/ListModel.P .deps/javax/swing/ListSelectionModel.P \
-.deps/javax/swing/LookAndFeel.P .deps/javax/swing/MenuElement.P \
+.deps/javax/swing/JSpinner.P .deps/javax/swing/JSplitPane.P \
+.deps/javax/swing/JTabbedPane.P .deps/javax/swing/JTable.P \
+.deps/javax/swing/JTextArea.P .deps/javax/swing/JTextField.P \
+.deps/javax/swing/JTextPane.P .deps/javax/swing/JToggleButton.P \
+.deps/javax/swing/JToolBar.P .deps/javax/swing/JToolTip.P \
+.deps/javax/swing/JTree.P .deps/javax/swing/JViewport.P \
+.deps/javax/swing/JWindow.P .deps/javax/swing/KeyStroke.P \
+.deps/javax/swing/ListCellRenderer.P .deps/javax/swing/ListModel.P \
+.deps/javax/swing/ListSelectionModel.P .deps/javax/swing/LookAndFeel.P \
+.deps/javax/swing/MenuElement.P \
.deps/javax/swing/MenuSelectionManager.P \
.deps/javax/swing/MutableComboBoxModel.P \
.deps/javax/swing/OverlayLayout.P .deps/javax/swing/Popup.P \
@@ -5203,6 +5214,7 @@
.deps/javax/swing/ScrollPaneLayout.P .deps/javax/swing/Scrollable.P \
.deps/javax/swing/SingleSelectionModel.P \
.deps/javax/swing/SizeRequirements.P .deps/javax/swing/SizeSequence.P \
+.deps/javax/swing/SpinnerModel.P .deps/javax/swing/SpinnerNumberModel.P \
.deps/javax/swing/Spring.P .deps/javax/swing/SpringLayout.P \
.deps/javax/swing/SwingConstants.P .deps/javax/swing/SwingUtilities.P \
.deps/javax/swing/Timer.P .deps/javax/swing/ToolTipManager.P \
@@ -5332,6 +5344,7 @@
.deps/javax/swing/plaf/basic/BasicScrollPaneUI.P \
.deps/javax/swing/plaf/basic/BasicSeparatorUI.P \
.deps/javax/swing/plaf/basic/BasicSliderUI.P \
+.deps/javax/swing/plaf/basic/BasicSpinnerUI.P \
.deps/javax/swing/plaf/basic/BasicSplitPaneDivider.P \
.deps/javax/swing/plaf/basic/BasicSplitPaneUI.P \
.deps/javax/swing/plaf/basic/BasicTabbedPaneUI.P \