summaryrefslogtreecommitdiff
path: root/javax/swing
diff options
context:
space:
mode:
authorRoman Kennke <roman@kennke.org>2005-10-19 15:45:01 +0000
committerRoman Kennke <roman@kennke.org>2005-10-19 15:45:01 +0000
commitcec31166bb039ca2333744ec420834efa97c75d5 (patch)
treefb3f221b95693ffe5ea2dac40b76615141041c2f /javax/swing
parent3cb6cdc3b82d679469e525b31ec298d12137809c (diff)
downloadclasspath-cec31166bb039ca2333744ec420834efa97c75d5.tar.gz
2005-10-19 Roman Kennke <kennke@aicas.com>
* javax/swing/AbstractSpinnerModel.java * javax/swing/ActionMap.java * javax/swing/BoundedRangeModel.java * javax/swing/Box.java * javax/swing/BoxLayout.java * javax/swing/ButtonGroup.java * javax/swing/CellEditor.java * javax/swing/CellRendererPane.java * javax/swing/ComboBoxEditor.java * javax/swing/DefaultButtonModel.java * javax/swing/DefaultCellEditor.java * javax/swing/DefaultDesktopManager.java * javax/swing/DefaultListCellRenderer.java * javax/swing/DesktopManager.java * javax/swing/ImageIcon.java * javax/swing/InputVerifier.java * javax/swing/JCheckBoxMenuItem.java * javax/swing/JColorChooser.java * javax/swing/JDesktopPane.java * javax/swing/JFileChooser.java * javax/swing/JLayeredPane.java * javax/swing/JList.java * javax/swing/JMenu.java * javax/swing/JMenuBar.java * javax/swing/JMenuItem.java * javax/swing/JOptionPane.java * javax/swing/JPasswordField.java * javax/swing/JPopupMenu.java * javax/swing/JProgressBar.java * javax/swing/JRadioButtonMenuItem.java * javax/swing/JRootPane.java * javax/swing/JSeparator.java * javax/swing/JSlider.java * javax/swing/JSpinner.java * javax/swing/JSplitPane.java * javax/swing/JTabbedPane.java * javax/swing/JTable.java * javax/swing/JTextPane.java * javax/swing/JToolBar.java * javax/swing/JToolTip.java * javax/swing/JTree.java * javax/swing/KeyStroke.java * javax/swing/LookAndFeel.java * javax/swing/MutableComboBoxModel.java * javax/swing/Popup.java * javax/swing/PopupFactory.java * javax/swing/RepaintManager.java * javax/swing/SortingFocusTraversalPolicy.java * javax/swing/Spring.java * javax/swing/SwingUtilities.java * javax/swing/ToolTipManager.java * javax/swing/TransferHandler.java * javax/swing/ViewportLayout.java Reformatted slightly. Filled emtpy blocks with comments. Fixed some slight API doc errors. Removed some unneeded imports. Removed unneeded serialization methods.
Diffstat (limited to 'javax/swing')
-rw-r--r--javax/swing/AbstractSpinnerModel.java1
-rw-r--r--javax/swing/ActionMap.java1
-rw-r--r--javax/swing/BoundedRangeModel.java4
-rw-r--r--javax/swing/Box.java2
-rw-r--r--javax/swing/BoxLayout.java6
-rw-r--r--javax/swing/ButtonGroup.java1
-rw-r--r--javax/swing/CellEditor.java2
-rw-r--r--javax/swing/CellRendererPane.java33
-rw-r--r--javax/swing/ComboBoxEditor.java2
-rw-r--r--javax/swing/DefaultButtonModel.java1
-rw-r--r--javax/swing/DefaultCellEditor.java7
-rw-r--r--javax/swing/DefaultDesktopManager.java4
-rw-r--r--javax/swing/DefaultListCellRenderer.java14
-rw-r--r--javax/swing/DesktopManager.java2
-rw-r--r--javax/swing/ImageIcon.java9
-rw-r--r--javax/swing/InputVerifier.java1
-rw-r--r--javax/swing/JCheckBoxMenuItem.java13
-rw-r--r--javax/swing/JColorChooser.java2
-rw-r--r--javax/swing/JDesktopPane.java3
-rw-r--r--javax/swing/JFileChooser.java1
-rw-r--r--javax/swing/JLayeredPane.java1
-rw-r--r--javax/swing/JList.java45
-rw-r--r--javax/swing/JMenu.java27
-rw-r--r--javax/swing/JMenuBar.java5
-rw-r--r--javax/swing/JMenuItem.java13
-rw-r--r--javax/swing/JOptionPane.java54
-rw-r--r--javax/swing/JPasswordField.java1
-rw-r--r--javax/swing/JPopupMenu.java14
-rw-r--r--javax/swing/JProgressBar.java3
-rw-r--r--javax/swing/JRadioButtonMenuItem.java8
-rw-r--r--javax/swing/JRootPane.java6
-rw-r--r--javax/swing/JSeparator.java1
-rw-r--r--javax/swing/JSlider.java3
-rw-r--r--javax/swing/JSpinner.java15
-rw-r--r--javax/swing/JSplitPane.java3
-rw-r--r--javax/swing/JTabbedPane.java8
-rw-r--r--javax/swing/JTable.java355
-rw-r--r--javax/swing/JTextPane.java9
-rw-r--r--javax/swing/JToolBar.java3
-rw-r--r--javax/swing/JToolTip.java3
-rw-r--r--javax/swing/JTree.java16
-rw-r--r--javax/swing/KeyStroke.java1
-rw-r--r--javax/swing/LookAndFeel.java7
-rw-r--r--javax/swing/MutableComboBoxModel.java4
-rw-r--r--javax/swing/Popup.java1
-rw-r--r--javax/swing/PopupFactory.java5
-rw-r--r--javax/swing/RepaintManager.java8
-rw-r--r--javax/swing/SortingFocusTraversalPolicy.java2
-rw-r--r--javax/swing/Spring.java1
-rw-r--r--javax/swing/SwingUtilities.java4
-rw-r--r--javax/swing/ToolTipManager.java4
-rw-r--r--javax/swing/TransferHandler.java5
-rw-r--r--javax/swing/ViewportLayout.java3
53 files changed, 588 insertions, 159 deletions
diff --git a/javax/swing/AbstractSpinnerModel.java b/javax/swing/AbstractSpinnerModel.java
index d61113b08..1a82f0a35 100644
--- a/javax/swing/AbstractSpinnerModel.java
+++ b/javax/swing/AbstractSpinnerModel.java
@@ -61,6 +61,7 @@ public abstract class AbstractSpinnerModel implements SpinnerModel
*/
public AbstractSpinnerModel()
{
+ // Nothing to do here.
}
/**
diff --git a/javax/swing/ActionMap.java b/javax/swing/ActionMap.java
index c14bafdb4..56bc41de6 100644
--- a/javax/swing/ActionMap.java
+++ b/javax/swing/ActionMap.java
@@ -80,6 +80,7 @@ public class ActionMap
*/
public ActionMap()
{
+ // Nothing to do here.
}
/**
diff --git a/javax/swing/BoundedRangeModel.java b/javax/swing/BoundedRangeModel.java
index 5ca5a7e04..54446acd5 100644
--- a/javax/swing/BoundedRangeModel.java
+++ b/javax/swing/BoundedRangeModel.java
@@ -165,13 +165,13 @@ public interface BoundedRangeModel
*
* @param value the value
* @param extent the extent
- * @param minnimum the minimum value
+ * @param minimum the minimum value
* @param maximum the maximum value
* @param adjusting a flag that indicates the model is being adjusted
* continuously.
*/
void setRangeProperties(int value, int extent, int minimum, int maximum,
- boolean adjusting);
+ boolean adjusting);
/**
* Adds a <code>ChangeListener</code> to this object.
diff --git a/javax/swing/Box.java b/javax/swing/Box.java
index b340c5026..57519f6fc 100644
--- a/javax/swing/Box.java
+++ b/javax/swing/Box.java
@@ -70,6 +70,7 @@ public class Box extends JComponent implements Accessible
protected AccessibleBox()
{
+ // Nothing to do here.
}
public AccessibleRole getAccessibleRole()
@@ -95,6 +96,7 @@ public class Box extends JComponent implements Accessible
protected AccessibleBoxFiller()
{
+ // Nothing to do here.
}
public AccessibleRole getAccessibleRole()
diff --git a/javax/swing/BoxLayout.java b/javax/swing/BoxLayout.java
index 9501d93b5..89c2872c3 100644
--- a/javax/swing/BoxLayout.java
+++ b/javax/swing/BoxLayout.java
@@ -155,6 +155,7 @@ public class BoxLayout implements LayoutManager2, Serializable
*/
public void addLayoutComponent(String name, Component component)
{
+ // Nothing to do here.
}
/**
@@ -164,6 +165,7 @@ public class BoxLayout implements LayoutManager2, Serializable
*/
public void removeLayoutComponent(Component component)
{
+ // Nothing to do here.
}
private boolean isHorizontalIn(Container parent)
@@ -228,7 +230,8 @@ public class BoxLayout implements LayoutManager2, Serializable
Component[] children = container.getComponents();
Insets in = container.getInsets();
for (int i = 0; i < children.length; i++)
- children[i].setBounds(offsetsX[i] + in.left, offsetsY[i] + in.top, spansX[i], spansY[i]);
+ children[i].setBounds(offsetsX[i] + in.left, offsetsY[i] + in.top,
+ spansX[i], spansY[i]);
}
}
@@ -240,6 +243,7 @@ public class BoxLayout implements LayoutManager2, Serializable
*/
public void addLayoutComponent(Component child, Object constraints)
{
+ // Nothing to do here.
}
/**
diff --git a/javax/swing/ButtonGroup.java b/javax/swing/ButtonGroup.java
index 3de1d4b9f..9c1ec387d 100644
--- a/javax/swing/ButtonGroup.java
+++ b/javax/swing/ButtonGroup.java
@@ -79,6 +79,7 @@ public class ButtonGroup implements Serializable
*/
public ButtonGroup()
{
+ // Nothing to do here.
}
/**
diff --git a/javax/swing/CellEditor.java b/javax/swing/CellEditor.java
index bdb166575..3d229b266 100644
--- a/javax/swing/CellEditor.java
+++ b/javax/swing/CellEditor.java
@@ -83,7 +83,7 @@ public interface CellEditor
/**
* addCellEditorListener
- * @param value0 TODO
+ * @param listener TODO
*/
void addCellEditorListener(CellEditorListener listener);
diff --git a/javax/swing/CellRendererPane.java b/javax/swing/CellRendererPane.java
index 5a2f4d040..c59afd318 100644
--- a/javax/swing/CellRendererPane.java
+++ b/javax/swing/CellRendererPane.java
@@ -54,9 +54,7 @@ import javax.accessibility.AccessibleRole;
*
* @author Andrew Selkirk
*/
-public class CellRendererPane
- extends Container
- implements Accessible
+public class CellRendererPane extends Container implements Accessible
{
private static final long serialVersionUID = -7642183829532984273L;
@@ -72,6 +70,7 @@ public class CellRendererPane
*/
protected AccessibleCellRendererPane()
{
+ // Nothing to do here.
}
/**
@@ -89,22 +88,13 @@ public class CellRendererPane
*/
protected AccessibleContext accessibleContext = null;
-
- //-------------------------------------------------------------
- // Initialization ---------------------------------------------
- //-------------------------------------------------------------
-
/**
* Constructs a new CellRendererPane.
*/
public CellRendererPane()
{
- } // CellRendererPane()
-
-
- //-------------------------------------------------------------
- // Methods ----------------------------------------------------
- //-------------------------------------------------------------
+ // Nothing to do here.
+ }
/**
* Should not be called.
@@ -113,7 +103,8 @@ public class CellRendererPane
*/
public void update(Graphics graphics)
{
- } // update()
+ //Nothing to do here.
+ }
/**
* Despite normal behaviour this does <em>not</em> cause the container
@@ -121,7 +112,8 @@ public class CellRendererPane
*/
public void invalidate()
{
- } // invalidate()
+ // Overridden to do nothing.
+ }
/**
* Should not be called.
@@ -130,6 +122,7 @@ public class CellRendererPane
*/
public void paint(Graphics graphics)
{
+ // Overridden to do nothing.
}
/**
@@ -147,7 +140,7 @@ public class CellRendererPane
{
super.addImpl(c, constraints, index);
}
- } // addImpl()
+ }
/**
* Paints the specified component <code>c</code> on the {@link Graphics}
@@ -194,7 +187,7 @@ public class CellRendererPane
// untranslate g
graphics.translate(-x, -y);
graphics.setClip(oldClip);
- } // paintComponent()
+ }
/**
* Paints the specified component <code>c</code> on the {@link Graphics}
@@ -216,7 +209,7 @@ public class CellRendererPane
Container p, int x, int y, int w, int h)
{
paintComponent(graphics, c, p, x, y, w, h, false);
- } // paintComponent()
+ }
/**
* Paints the specified component <code>c</code> on the {@link Graphics}
@@ -234,7 +227,7 @@ public class CellRendererPane
Container p, Rectangle r)
{
paintComponent(graphics, c, p, r.x, r.y, r.width, r.height);
- } // paintComponent()
+ }
/**
* getAccessibleContext <em>TODO</em>
diff --git a/javax/swing/ComboBoxEditor.java b/javax/swing/ComboBoxEditor.java
index 4eb5fc562..8e914e4b9 100644
--- a/javax/swing/ComboBoxEditor.java
+++ b/javax/swing/ComboBoxEditor.java
@@ -64,7 +64,7 @@ public interface ComboBoxEditor
* combo box list then this method should be called to change editting item
* to the new selected item.
*
- * @param selectedItem item that is currently selected in the combo box
+ * @param item item that is currently selected in the combo box
*/
void setItem(Object item);
diff --git a/javax/swing/DefaultButtonModel.java b/javax/swing/DefaultButtonModel.java
index f7d09d578..7ecf3b85f 100644
--- a/javax/swing/DefaultButtonModel.java
+++ b/javax/swing/DefaultButtonModel.java
@@ -145,6 +145,7 @@ public class DefaultButtonModel implements ButtonModel, Serializable
*/
public DefaultButtonModel()
{
+ // Nothing to do here.
}
/**
diff --git a/javax/swing/DefaultCellEditor.java b/javax/swing/DefaultCellEditor.java
index 00e008644..39e48551e 100644
--- a/javax/swing/DefaultCellEditor.java
+++ b/javax/swing/DefaultCellEditor.java
@@ -69,7 +69,7 @@ public class DefaultCellEditor
private static final long serialVersionUID = 3564035141373880027L;
/**
- * Delegates a couple of method calls (such as {@link #isCellEditable)
+ * Delegates a couple of method calls (such as {@link #isCellEditable}
* to the component it contains and listens for events that indicate
* that editing has stopped.
*/
@@ -88,12 +88,13 @@ public class DefaultCellEditor
*/
protected EditorDelegate()
{
+ // Nothing to do here.
}
/**
* setValue
*
- * @param event TODO
+ * @param value TODO
*/
public void setValue(Object value)
{
@@ -387,7 +388,7 @@ public class DefaultCellEditor
/**
* getTableCellEditorComponent
*
- * @param tree TODO
+ * @param table TODO
* @param value TODO
* @param isSelected TODO
* @param row TODO
diff --git a/javax/swing/DefaultDesktopManager.java b/javax/swing/DefaultDesktopManager.java
index 2b8977e9d..7f62c9486 100644
--- a/javax/swing/DefaultDesktopManager.java
+++ b/javax/swing/DefaultDesktopManager.java
@@ -91,6 +91,7 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
*/
public DefaultDesktopManager()
{
+ // Nothing to do here.
}
/**
@@ -223,6 +224,7 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
}
catch (PropertyVetoException e)
{
+ // Do nothing if attempt is vetoed.
}
}
@@ -302,6 +304,7 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
}
catch (PropertyVetoException e)
{
+ // Do nothing if attempt is vetoed.
}
}
@@ -329,6 +332,7 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
}
catch (PropertyVetoException e)
{
+ // Do nothing if attempt is vetoed.
}
}
}
diff --git a/javax/swing/DefaultListCellRenderer.java b/javax/swing/DefaultListCellRenderer.java
index 5a34ba7aa..9a8e07071 100644
--- a/javax/swing/DefaultListCellRenderer.java
+++ b/javax/swing/DefaultListCellRenderer.java
@@ -68,6 +68,7 @@ public class DefaultListCellRenderer extends JLabel
{
public UIResource()
{
+ super();
}
}
@@ -124,62 +125,75 @@ public class DefaultListCellRenderer extends JLabel
public void validate()
{
+ // Overridden to do nothing.
}
public void revalidate()
{
+ // Overridden to do nothing.
}
public void repaint(long tm, int x, int y, int w, int h)
{
+ // Overridden to do nothing.
}
public void repaint(Rectangle rect)
{
+ // Overridden to do nothing.
}
protected void firePropertyChange(String propertyName, Object oldValue,
Object newValue)
{
+ // Overridden to do nothing.
}
public void firePropertyChange(String propertyName, byte oldValue,
byte newValue)
{
+ // Overridden to do nothing.
}
public void firePropertyChange(String propertyName, char oldValue,
char newValue)
{
+ // Overridden to do nothing.
}
public void firePropertyChange(String propertyName, short oldValue,
short newValue)
{
+ // Overridden to do nothing.
}
public void firePropertyChange(String propertyName, int oldValue,
int newValue)
{
+ // Overridden to do nothing.
}
public void firePropertyChange(String propertyName, long oldValue,
long newValue)
{
+ // Overridden to do nothing.
}
public void firePropertyChange(String propertyName, float oldValue,
float newValue)
{
+ // Overridden to do nothing.
}
public void firePropertyChange(String propertyName, double oldValue,
double newValue)
{
+ // Overridden to do nothing.
}
public void firePropertyChange(String propertyName, boolean oldValue,
boolean newValue)
{
+ // Overridden to do nothing.
}
}
diff --git a/javax/swing/DesktopManager.java b/javax/swing/DesktopManager.java
index 300d66517..620c7ffb8 100644
--- a/javax/swing/DesktopManager.java
+++ b/javax/swing/DesktopManager.java
@@ -95,7 +95,7 @@ public interface DesktopManager
* This method should give focus to the JInternalFrame and its default focus
* owner.
*
- * @param frame The JInternalFrame to activate.
+ * @param vframe The JInternalFrame to activate.
*/
void activateFrame(JInternalFrame vframe);
diff --git a/javax/swing/ImageIcon.java b/javax/swing/ImageIcon.java
index b650cd81f..b6ed949d8 100644
--- a/javax/swing/ImageIcon.java
+++ b/javax/swing/ImageIcon.java
@@ -73,6 +73,7 @@ public class ImageIcon
*/
protected AccessibleImageIcon()
{
+ // Nothing to do here.
}
/**
@@ -204,7 +205,10 @@ public class ImageIcon
private static final long serialVersionUID = 532615968316031794L;
/** A dummy Component that is used in the MediaTracker. */
- protected static Component component = new Component(){};
+ protected static Component component = new Component()
+ {
+ // No need to implement this.
+ };
/** The MediaTracker used to monitor the loading of images. */
protected static MediaTracker tracker = new MediaTracker(component);
@@ -227,6 +231,7 @@ public class ImageIcon
*/
public ImageIcon()
{
+ // Nothing to do here.
}
/**
@@ -417,7 +422,7 @@ public class ImageIcon
}
catch (InterruptedException ex)
{
- ; // ignore this for now
+ // Ignore this for now.
}
finally
{
diff --git a/javax/swing/InputVerifier.java b/javax/swing/InputVerifier.java
index 8e02ab813..eeb81b5d5 100644
--- a/javax/swing/InputVerifier.java
+++ b/javax/swing/InputVerifier.java
@@ -53,6 +53,7 @@ public abstract class InputVerifier
*/
public InputVerifier()
{
+ // Nothing to do here.
}
/**
diff --git a/javax/swing/JCheckBoxMenuItem.java b/javax/swing/JCheckBoxMenuItem.java
index f9dd56500..815244259 100644
--- a/javax/swing/JCheckBoxMenuItem.java
+++ b/javax/swing/JCheckBoxMenuItem.java
@@ -38,9 +38,6 @@ exception statement from your version. */
package javax.swing;
-import java.io.IOException;
-import java.io.ObjectOutputStream;
-
import javax.accessibility.Accessible;
import javax.accessibility.AccessibleContext;
import javax.accessibility.AccessibleRole;
@@ -48,8 +45,9 @@ import javax.accessibility.AccessibleRole;
/**
* A menu item that displays a checkbox. Its behaviour is very similar
* to {@link JCheckBox}. Just like the <code>JCheckBox</code>, user can check
- * and uncheck this menu item by clicking on it. Also {@link #setSelected()}
- * and {@link #setState()} can be use used for the same purpose.
+ * and uncheck this menu item by clicking on it. Also
+ * {@link AbstractButton#setSelected} and {@link #setState} can be use used
+ * for the same purpose.
* <code>JCheckBoxMenuItem</code> uses
* <code>ToggleButtonModel</code> to keep track of its selection.
*
@@ -152,10 +150,6 @@ public class JCheckBoxMenuItem extends JMenuItem implements SwingConstants,
this.setVisible(true);
}
- private void writeObject(ObjectOutputStream stream) throws IOException
- {
- }
-
/**
* This method returns a name to identify which look and feel class will be
* the UI delegate for the menuItem.
@@ -248,6 +242,7 @@ public class JCheckBoxMenuItem extends JMenuItem implements SwingConstants,
*/
protected AccessibleJCheckBoxMenuItem()
{
+ // Nothing to do here.
}
public AccessibleRole getAccessibleRole()
diff --git a/javax/swing/JColorChooser.java b/javax/swing/JColorChooser.java
index 4016b82f3..a9650ffb7 100644
--- a/javax/swing/JColorChooser.java
+++ b/javax/swing/JColorChooser.java
@@ -87,6 +87,7 @@ public class JColorChooser extends JComponent implements Accessible
*/
protected AccessibleJColorChooser()
{
+ // Nothing to do here.
}
/**
@@ -247,6 +248,7 @@ public class JColorChooser extends JComponent implements Accessible
}
catch (InterruptedException e)
{
+ // TODO: Should this be handled?
}
}
diff --git a/javax/swing/JDesktopPane.java b/javax/swing/JDesktopPane.java
index f4c80eca7..43ab71e7e 100644
--- a/javax/swing/JDesktopPane.java
+++ b/javax/swing/JDesktopPane.java
@@ -97,6 +97,7 @@ public class JDesktopPane extends JLayeredPane implements Accessible
*/
protected AccessibleJDesktopPane()
{
+ // Nothing to do here.
}
/**
@@ -246,6 +247,7 @@ public class JDesktopPane extends JLayeredPane implements Accessible
}
catch (PropertyVetoException e)
{
+ // We do nothing when the attempt is vetoed.
}
}
selectedFrame = null;
@@ -259,6 +261,7 @@ public class JDesktopPane extends JLayeredPane implements Accessible
}
catch (PropertyVetoException e)
{
+ // We do nothing when the attempt is vetoed.
}
}
diff --git a/javax/swing/JFileChooser.java b/javax/swing/JFileChooser.java
index ad512d4cf..99aa956ae 100644
--- a/javax/swing/JFileChooser.java
+++ b/javax/swing/JFileChooser.java
@@ -1506,6 +1506,7 @@ public class JFileChooser extends JComponent implements Accessible
{
protected AccessibleJFileChooser()
{
+ // Nothing to do here.
}
public AccessibleRole getAccessibleRole()
diff --git a/javax/swing/JLayeredPane.java b/javax/swing/JLayeredPane.java
index c179ca1c0..33461e773 100644
--- a/javax/swing/JLayeredPane.java
+++ b/javax/swing/JLayeredPane.java
@@ -580,6 +580,7 @@ public class JLayeredPane extends JComponent implements Accessible
decrLayer(new Integer(layer));
componentToLayer.remove(c);
super.remove(index);
+ // FIXME: Figure out if this call is correct.
revalidate();
}
diff --git a/javax/swing/JList.java b/javax/swing/JList.java
index 620274d8a..a5a999c07 100644
--- a/javax/swing/JList.java
+++ b/javax/swing/JList.java
@@ -620,6 +620,7 @@ public class JList extends JComponent implements Accessible, Scrollable
*/
public AccessibleJList()
{
+ // Nothing to do here.
}
/**
@@ -922,7 +923,7 @@ public class JList extends JComponent implements Accessible, Scrollable
/**
* This property specifies a foreground color for the selected cells in
- * the list. When {@link ListCellRenderer.getListCellRendererComponent}
+ * the list. When {@link ListCellRenderer#getListCellRendererComponent}
* is called with a selected cell object, the component returned will
* have its "foreground" set to this color.
*/
@@ -930,7 +931,7 @@ public class JList extends JComponent implements Accessible, Scrollable
/**
* This property specifies a background color for the selected cells in
- * the list. When {@link ListCellRenderer.getListCellRendererComponent}
+ * the list. When {@link ListCellRenderer#getListCellRendererComponent}
* is called with a selected cell object, the component returned will
* have its "background" property set to this color.
*/
@@ -957,9 +958,9 @@ public class JList extends JComponent implements Accessible, Scrollable
/**
* This property indicates a <em>preference</em> for the number of rows
* displayed in the list, and will scale the
- * {@link #preferredScrollableViewportSize} property accordingly. The actual
+ * {@link #getPreferredScrollableViewportSize} property accordingly. The actual
* number of displayed rows, when the list is placed in a real {@link
- * Viewport} or other component, may be greater or less than this number.
+ * JViewport} or other component, may be greater or less than this number.
*/
int visibleRowCount;
@@ -1011,7 +1012,7 @@ public class JList extends JComponent implements Accessible, Scrollable
event.getValueIsAdjusting());
JList.this.repaint();
}
- };
+ }
/**
* Shared ListListener instance, subscribed to both the current {@link
@@ -1178,7 +1179,7 @@ public class JList extends JComponent implements Accessible, Scrollable
/**
* Sets the value of the {@link #visibleRowCount} property.
*
- * @param visibleRowCount The new property value
+ * @param vc The new property value
*/
public void setVisibleRowCount(int vc)
{
@@ -1304,8 +1305,8 @@ public class JList extends JComponent implements Accessible, Scrollable
/**
* Returns the list index of the upper left or upper right corner of the
- * {@link #visibleRect} property, depending on the {@link
- * #componentOrientation} property.
+ * visible rectangle of this list, depending on the {@link
+ * Component#getComponentOrientation} property.
*
* @return The index of the first visible list cell, or <code>-1</code>
* if none is visible.
@@ -1344,8 +1345,8 @@ public class JList extends JComponent implements Accessible, Scrollable
/**
* Returns the list index of the lower right or lower left corner of the
- * {@link #visibleRect} property, depending on the {@link
- * #componentOrientation} property.
+ * visible rectangle of this list, depending on the {@link
+ * Component#getComponentOrientation} property.
*
* @return The index of the last visible list cell, or <code>-1</code>
* if none is visible.
@@ -1368,7 +1369,7 @@ public class JList extends JComponent implements Accessible, Scrollable
* selected.
*
* @return An array of model indices, each of which is selected according
- * to the {@link #selection} property
+ * to the {@link #getSelectedValues} property
*/
public int[] getSelectedIndices()
{
@@ -1413,7 +1414,7 @@ public class JList extends JComponent implements Accessible, Scrollable
* @return The first selected element, or <code>null</code> if no element
* is selected.
*
- * @see getSelectedValues
+ * @see #getSelectedValues
*/
public Object getSelectedValue()
{
@@ -1429,7 +1430,7 @@ public class JList extends JComponent implements Accessible, Scrollable
*
* @return An array containing all the selected values
*
- * @see getSelectedValue
+ * @see #setSelectedValue
*/
public Object[] getSelectedValues()
{
@@ -1588,7 +1589,7 @@ public class JList extends JComponent implements Accessible, Scrollable
}
/**
- * Sets the value of the {@link #celLRenderer} property.
+ * Sets the value of the {@link #getCellRenderer} property.
*
* @param renderer The new property value
*/
@@ -1769,7 +1770,7 @@ public class JList extends JComponent implements Accessible, Scrollable
* Returns a size indicating how much space this list would like to
* consume, when contained in a scrollable viewport. This is part of the
* {@link Scrollable} interface, which interacts with {@link
- * ScrollPaneLayout} and {@link Viewport} to define scrollable objects.
+ * ScrollPaneLayout} and {@link JViewport} to define scrollable objects.
*
* @return The preferred size
*/
@@ -1780,7 +1781,7 @@ public class JList extends JComponent implements Accessible, Scrollable
//expected to override getPreferredSize to return an appropriate value.
if (getLayoutOrientation() != VERTICAL)
return getPreferredSize();
-
+
if (fixedCellHeight != -1 && fixedCellWidth != -1)
return new Dimension(fixedCellWidth, getModel().getSize() *
fixedCellHeight);
@@ -1796,12 +1797,12 @@ public class JList extends JComponent implements Accessible, Scrollable
if (getCellBounds(i, i).width > prefWidth)
prefWidth = getCellBounds(i, i).width;
}
-
+
if (getModel().getSize() == 0 && fixedCellWidth == -1)
return new Dimension(256, 16 * getVisibleRowCount());
else if (getModel().getSize() == 0)
return new Dimension (fixedCellWidth, 16 * getVisibleRowCount());
-
+
if (fixedCellHeight != -1)
prefHeight = fixedCellHeight;
else
@@ -1939,7 +1940,7 @@ public class JList extends JComponent implements Accessible, Scrollable
}
/**
- * Gets the value of the {@link #scrollableTracksViewportWidth} property.
+ * Gets the value of the <code>scrollableTracksViewportWidth</code> property.
*
* @return <code>true</code> if the viewport is larger (horizontally)
* than the list and the list should be expanded to fit the viewport;
@@ -1964,7 +1965,7 @@ public class JList extends JComponent implements Accessible, Scrollable
}
/**
- * Gets the value of the {@link #scrollableTracksViewportWidth} property.
+ * Gets the value of the </code>scrollableTracksViewportWidth</code> property.
*
* @return <code>true</code> if the viewport is larger (vertically)
* than the list and the list should be expanded to fit the viewport;
@@ -2126,8 +2127,8 @@ public class JList extends JComponent implements Accessible, Scrollable
*
* @param prefix the prefix to search for in the cell values
* @param startIndex the index where to start searching from
- * @param bias the search direction, either {@link Position.Bias.Forward}
- * or {@link Position.Bias.Backward}
+ * @param bias the search direction, either {@link Position.Bias#Forward}
+ * or {@link Position.Bias#Backward}
*
* @return the index of the found element or -1 if no such element has
* been found
diff --git a/javax/swing/JMenu.java b/javax/swing/JMenu.java
index 8dcad8b77..9734eb873 100644
--- a/javax/swing/JMenu.java
+++ b/javax/swing/JMenu.java
@@ -45,8 +45,6 @@ import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
-import java.io.IOException;
-import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.EventListener;
@@ -137,10 +135,6 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement
this(text);
}
- private void writeObject(ObjectOutputStream stream) throws IOException
- {
- }
-
/**
* Adds specified menu item to this menu
*
@@ -768,6 +762,7 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement
*/
protected void processKeyEvent(KeyEvent event)
{
+ // TODO: Implement this properly.
}
/**
@@ -812,6 +807,7 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement
return accessibleContext;
}
+ // FIXME: This inner class is a complete stub and needs to be implemented.
protected class AccessibleJMenu extends AccessibleJMenuItem
implements AccessibleSelection
{
@@ -819,6 +815,7 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement
protected AccessibleJMenu()
{
+ // Nothing to do here.
}
public int getAccessibleChildrenCount()
@@ -858,32 +855,48 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement
public void addAccessibleSelection(int value0)
{
+ // TODO: Implement this properly.
}
public void removeAccessibleSelection(int value0)
{
+ // TODO: Implement this properly.
}
public void clearAccessibleSelection()
{
+ // TODO: Implement this properly.
}
public void selectAllAccessibleSelection()
{
+ // TODO: Implement this properly.
}
}
protected class WinListener extends WindowAdapter implements Serializable
{
- JPopupMenu popupMenu;
private static final long serialVersionUID = -6415815570638474823L;
+ /**
+ * Creates a new <code>WinListener</code>.
+ *
+ * @param popup the popup menu which is observed
+ */
public WinListener(JPopupMenu popup)
{
+ // TODO: What should we do with the popup argument?
}
+ /**
+ * Receives notification when the popup menu is closing and deselects
+ * the menu.
+ *
+ * @param event the window event
+ */
public void windowClosing(WindowEvent event)
{
+ setSelected(false);
}
}
diff --git a/javax/swing/JMenuBar.java b/javax/swing/JMenuBar.java
index ebbeb5be1..829d671ec 100644
--- a/javax/swing/JMenuBar.java
+++ b/javax/swing/JMenuBar.java
@@ -520,9 +520,14 @@ public class JMenuBar extends JComponent implements Accessible, MenuElement
* Sets help menu for this menu bar
*
* @param menu help menu
+ *
+ * @specnote The specification states that this method is not yet implemented
+ * and should throw an exception.
*/
public void setHelpMenu(JMenu menu)
{
+ // We throw an Error here, just as Sun's JDK does.
+ throw new Error("setHelpMenu() not yet implemented.");
}
/**
diff --git a/javax/swing/JMenuItem.java b/javax/swing/JMenuItem.java
index 825af2be4..9799017f6 100644
--- a/javax/swing/JMenuItem.java
+++ b/javax/swing/JMenuItem.java
@@ -44,9 +44,6 @@ import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
import java.util.EventListener;
import javax.accessibility.Accessible;
@@ -149,15 +146,6 @@ public class JMenuItem extends AbstractButton implements Accessible,
setMnemonic(mnemonic);
}
- private void readObject(ObjectInputStream stream)
- throws IOException, ClassNotFoundException
- {
- }
-
- private void writeObject(ObjectOutputStream stream) throws IOException
- {
- }
-
/**
* Initializes this menu item
*
@@ -676,6 +664,7 @@ public class JMenuItem extends AbstractButton implements Accessible,
public void stateChanged(ChangeEvent event)
{
+ // TODO: What should be done here, if anything?
}
public AccessibleRole getAccessibleRole()
diff --git a/javax/swing/JOptionPane.java b/javax/swing/JOptionPane.java
index 5a44e0211..2f28ccc91 100644
--- a/javax/swing/JOptionPane.java
+++ b/javax/swing/JOptionPane.java
@@ -39,7 +39,6 @@ exception statement from your version. */
package javax.swing;
import java.awt.Component;
-import java.awt.Dimension;
import java.awt.Frame;
import javax.accessibility.Accessible;
@@ -60,6 +59,8 @@ public class JOptionPane extends JComponent implements Accessible
/**
* DOCUMENT ME!
*/
+ // FIXME: This inner class is a complete stub and needs to be implemented
+ // properly.
protected class AccessibleJOptionPane extends JComponent.AccessibleJComponent
{
/** DOCUMENT ME! */
@@ -70,6 +71,7 @@ public class JOptionPane extends JComponent implements Accessible
*/
protected AccessibleJOptionPane()
{
+ // Nothing to do here.
}
/**
@@ -1542,34 +1544,34 @@ public class JOptionPane extends JComponent implements Accessible
* JInternalFrame's preferred size.
*
* @param f The JInternalFrame to make modal.
- * @param pane The JOptionPane to add to the JInternalFrame.
*/
private static void startModal(JInternalFrame f)
{
synchronized (f)
- {
- final JInternalFrame tmp = f;
- tmp.toFront();
-
- f.addInternalFrameListener(new InternalFrameAdapter()
- {
- public void internalFrameClosed(InternalFrameEvent e)
- {
- synchronized (tmp)
- {
- tmp.removeInternalFrameListener(this);
- tmp.notifyAll();
- }
- }
- });
- try
- {
- while (! f.isClosed())
- f.wait();
- }
- catch (InterruptedException ignored)
- {
- }
- }
+ {
+ final JInternalFrame tmp = f;
+ tmp.toFront();
+
+ f.addInternalFrameListener(new InternalFrameAdapter()
+ {
+ public void internalFrameClosed(InternalFrameEvent e)
+ {
+ synchronized (tmp)
+ {
+ tmp.removeInternalFrameListener(this);
+ tmp.notifyAll();
+ }
+ }
+ });
+ try
+ {
+ while (! f.isClosed())
+ f.wait();
+ }
+ catch (InterruptedException ignored)
+ {
+ // Ignore this Exception.
+ }
+ }
}
}
diff --git a/javax/swing/JPasswordField.java b/javax/swing/JPasswordField.java
index 151d2484a..11e45e8a5 100644
--- a/javax/swing/JPasswordField.java
+++ b/javax/swing/JPasswordField.java
@@ -67,6 +67,7 @@ public class JPasswordField extends JTextField
*/
protected AccessibleJPasswordField()
{
+ // Nothing to do here.
}
/**
diff --git a/javax/swing/JPopupMenu.java b/javax/swing/JPopupMenu.java
index 289b9e064..b5809c19a 100644
--- a/javax/swing/JPopupMenu.java
+++ b/javax/swing/JPopupMenu.java
@@ -49,9 +49,6 @@ import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
import java.util.ArrayList;
import java.util.EventListener;
@@ -158,15 +155,6 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement
updateUI();
}
- private void readObject(ObjectInputStream stream)
- throws IOException, ClassNotFoundException
- {
- }
-
- private void writeObject(ObjectOutputStream stream) throws IOException
- {
- }
-
/**
* Adds given menu item to the popup menu
*
@@ -1053,6 +1041,7 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement
{
public Separator()
{
+ super();
}
public String getUIClassID()
@@ -1067,6 +1056,7 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement
protected AccessibleJPopupMenu()
{
+ // Nothing to do here.
}
public AccessibleRole getAccessibleRole()
diff --git a/javax/swing/JProgressBar.java b/javax/swing/JProgressBar.java
index 19815dbfd..0de9115dc 100644
--- a/javax/swing/JProgressBar.java
+++ b/javax/swing/JProgressBar.java
@@ -81,6 +81,8 @@ public class JProgressBar extends JComponent implements SwingConstants,
/**
* AccessibleJProgressBar
*/
+ // FIXME: This inner class is a complete stub and needs to be implemented
+ // properly.
protected class AccessibleJProgressBar extends AccessibleJComponent
implements AccessibleValue
{
@@ -91,6 +93,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
*/
protected AccessibleJProgressBar()
{
+ // Nothing to do here.
}
/**
diff --git a/javax/swing/JRadioButtonMenuItem.java b/javax/swing/JRadioButtonMenuItem.java
index 76a8fef64..61a8dbab3 100644
--- a/javax/swing/JRadioButtonMenuItem.java
+++ b/javax/swing/JRadioButtonMenuItem.java
@@ -38,9 +38,6 @@ exception statement from your version. */
package javax.swing;
-import java.io.IOException;
-import java.io.ObjectOutputStream;
-
import javax.accessibility.Accessible;
import javax.accessibility.AccessibleContext;
import javax.accessibility.AccessibleRole;
@@ -149,10 +146,6 @@ public class JRadioButtonMenuItem extends JMenuItem implements Accessible
model.setSelected(selected);
}
- private void writeObject(ObjectOutputStream stream) throws IOException
- {
- }
-
/**
* This method returns a name to identify which look and feel class will be
* the UI delegate for the menuItem.
@@ -202,6 +195,7 @@ public class JRadioButtonMenuItem extends JMenuItem implements Accessible
*/
protected AccessibleJRadioButtonMenuItem()
{
+ // Nothing to do here.
}
public AccessibleRole getAccessibleRole()
diff --git a/javax/swing/JRootPane.java b/javax/swing/JRootPane.java
index a136a30a0..b5d436d7e 100644
--- a/javax/swing/JRootPane.java
+++ b/javax/swing/JRootPane.java
@@ -76,6 +76,7 @@ public class JRootPane extends JComponent implements Accessible
*/
protected AccessibleJRootPane()
{
+ // Nothing to do here.
}
/**
@@ -101,6 +102,7 @@ public class JRootPane extends JComponent implements Accessible
*/
protected RootLayout()
{
+ // Nothing to do here.
}
/**
@@ -111,6 +113,7 @@ public class JRootPane extends JComponent implements Accessible
*/
public void addLayoutComponent(Component comp, Object constraints)
{
+ // Nothing to do here.
}
/**
@@ -121,6 +124,7 @@ public class JRootPane extends JComponent implements Accessible
*/
public void addLayoutComponent(String name, Component comp)
{
+ // Nothing to do here.
}
/**
@@ -154,6 +158,7 @@ public class JRootPane extends JComponent implements Accessible
*/
public void invalidateLayout(Container target)
{
+ // Nothing to do here.
}
/**
@@ -309,6 +314,7 @@ public class JRootPane extends JComponent implements Accessible
*/
public void removeLayoutComponent(Component comp)
{
+ // Nothing to do here.
}
}
diff --git a/javax/swing/JSeparator.java b/javax/swing/JSeparator.java
index fe47d7af3..602af6a38 100644
--- a/javax/swing/JSeparator.java
+++ b/javax/swing/JSeparator.java
@@ -62,6 +62,7 @@ public class JSeparator extends JComponent implements SwingConstants,
*/
protected AccessibleJSeparator()
{
+ // Nothing to do here.
}
/**
diff --git a/javax/swing/JSlider.java b/javax/swing/JSlider.java
index 2caf509a1..b28b06aba 100644
--- a/javax/swing/JSlider.java
+++ b/javax/swing/JSlider.java
@@ -118,6 +118,8 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
/**
* DOCUMENT ME!
*/
+ // FIXME: This inner class is a complete stub and needs to be implemented
+ // properly.
protected class AccessibleJSlider extends JComponent.AccessibleJComponent
implements AccessibleValue
{
@@ -128,6 +130,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
*/
protected AccessibleJSlider()
{
+ // Nothing to do here.
}
/**
diff --git a/javax/swing/JSpinner.java b/javax/swing/JSpinner.java
index 0ace11fa8..af34d9cf6 100644
--- a/javax/swing/JSpinner.java
+++ b/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.
}
}
diff --git a/javax/swing/JSplitPane.java b/javax/swing/JSplitPane.java
index cea5afef2..cdab7bb6c 100644
--- a/javax/swing/JSplitPane.java
+++ b/javax/swing/JSplitPane.java
@@ -59,6 +59,8 @@ public class JSplitPane extends JComponent implements Accessible
/**
* DOCUMENT ME!
*/
+ // FIXME: This inner class is a complete stub and must be implemented
+ // properly.
protected class AccessibleJSplitPane extends JComponent.AccessibleJComponent
implements AccessibleValue
{
@@ -69,6 +71,7 @@ public class JSplitPane extends JComponent implements Accessible
*/
protected AccessibleJSplitPane()
{
+ // Nothing to do here.
}
/**
diff --git a/javax/swing/JTabbedPane.java b/javax/swing/JTabbedPane.java
index 77e49cba5..8ef1d8f11 100644
--- a/javax/swing/JTabbedPane.java
+++ b/javax/swing/JTabbedPane.java
@@ -75,6 +75,8 @@ public class JTabbedPane extends JComponent implements Serializable,
/**
* Accessibility support for <code>JTabbedPane</code>.
*/
+ // FIXME: This inner class is a complete stub and must be implemented
+ // properly.
protected class AccessibleJTabbedPane extends JComponent.AccessibleJComponent
implements AccessibleSelection, ChangeListener
{
@@ -99,6 +101,7 @@ public class JTabbedPane extends JComponent implements Serializable,
*/
public void stateChanged(ChangeEvent e)
{
+ // Implement this properly.
}
/**
@@ -208,6 +211,7 @@ public class JTabbedPane extends JComponent implements Serializable,
*/
public void addAccessibleSelection(int i)
{
+ // TODO: Implement this properly.
}
/**
@@ -217,6 +221,7 @@ public class JTabbedPane extends JComponent implements Serializable,
*/
public void removeAccessibleSelection(int i)
{
+ // TODO: Implement this properly.
}
/**
@@ -224,6 +229,7 @@ public class JTabbedPane extends JComponent implements Serializable,
*/
public void clearAccessibleSelection()
{
+ // TODO: Implement this properly.
}
/**
@@ -231,6 +237,7 @@ public class JTabbedPane extends JComponent implements Serializable,
*/
public void selectAllAccessibleSelection()
{
+ // TODO: Implement this properly.
}
}
@@ -247,6 +254,7 @@ public class JTabbedPane extends JComponent implements Serializable,
*/
protected ModelListener()
{
+ // Nothing to do here.
}
/**
diff --git a/javax/swing/JTable.java b/javax/swing/JTable.java
index 05c15bab4..b809149e4 100644
--- a/javax/swing/JTable.java
+++ b/javax/swing/JTable.java
@@ -56,6 +56,10 @@ import java.util.Vector;
import javax.accessibility.Accessible;
import javax.accessibility.AccessibleContext;
+import javax.accessibility.AccessibleExtendedTable;
+import javax.accessibility.AccessibleSelection;
+import javax.accessibility.AccessibleTable;
+import javax.accessibility.AccessibleTableModelChange;
import javax.swing.event.CellEditorListener;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ListSelectionEvent;
@@ -80,6 +84,357 @@ public class JTable extends JComponent
implements TableModelListener, Scrollable, TableColumnModelListener,
ListSelectionListener, CellEditorListener, Accessible
{
+ protected class AccessibleJTable extends AccessibleJComponent
+ implements AccessibleSelection, ListSelectionListener, TableModelListener,
+ TableColumnModelListener, CellEditorListener, PropertyChangeListener,
+ AccessibleExtendedTable
+ {
+
+ protected class AccessibleJTableModelChange
+ implements AccessibleTableModelChange
+ {
+ protected int type;
+ protected int firstRow;
+ protected int lastRow;
+ protected int firstColumn;
+ protected int lastColumn;
+
+ protected AccessibleJTableModelChange(int type, int firstRow,
+ int lastRow, int firstColumn,
+ int lastColumn)
+ {
+ this.type = type;
+ this.firstRow = firstRow;
+ this.lastRow = lastRow;
+ this.firstColumn = firstColumn;
+ this.lastColumn = lastColumn;
+ }
+
+ public int getType()
+ {
+ return type;
+ }
+
+ public int getFirstRow()
+ {
+ return firstRow;
+ }
+
+ public int getLastRow()
+ {
+ return lastRow;
+ }
+
+ public int getFirstColumn()
+ {
+ return firstColumn;
+ }
+
+ public int getLastColumn()
+ {
+ return lastColumn;
+ }
+ }
+
+ /**
+ * Creates a new <code>AccessibleJTable</code>.
+ *
+ * @since JDK1.5
+ */
+ protected AccessibleJTable()
+ {
+ getModel().addTableModelListener(this);
+ getSelectionModel().addListSelectionListener(this);
+ getColumnModel().addColumnModelListener(this);
+ getCellEditor().addCellEditorListener(this);
+ }
+
+ public int getAccessibleSelectionCount()
+ {
+ return getSelectedColumnCount();
+ }
+
+ public Accessible getAccessibleSelection(int i)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean isAccessibleChildSelected(int i)
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void addAccessibleSelection(int i)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeAccessibleSelection(int i)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void clearAccessibleSelection()
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void selectAllAccessibleSelection()
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void valueChanged(ListSelectionEvent event)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void tableChanged(TableModelEvent event)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void columnAdded(TableColumnModelEvent event)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void columnMarginChanged(ChangeEvent event)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void columnMoved(TableColumnModelEvent event)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void columnRemoved(TableColumnModelEvent event)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void columnSelectionChanged(ListSelectionEvent event)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void editingCanceled(ChangeEvent event)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void editingStopped(ChangeEvent event)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /**
+ * Receives notification when any of the JTable's properties changes. This
+ * is used to replace the listeners on the table's model, selection model,
+ * column model and cell editor.
+ *
+ * @param e the property change event
+ */
+ public void propertyChange(PropertyChangeEvent e)
+ {
+ String propName = e.getPropertyName();
+ if (propName.equals("tableModel"))
+ {
+ TableModel oldModel = (TableModel) e.getOldValue();
+ oldModel.removeTableModelListener(this);
+ TableModel newModel = (TableModel) e.getNewValue();
+ newModel.addTableModelListener(this);
+ }
+ else if (propName.equals("columnModel"))
+ {
+ TableColumnModel oldModel = (TableColumnModel) e.getOldValue();
+ oldModel.removeColumnModelListener(this);
+ TableColumnModel newModel = (TableColumnModel) e.getNewValue();
+ newModel.addColumnModelListener(this);
+ }
+ else if (propName.equals("selectionModel"))
+ {
+ ListSelectionModel oldModel = (ListSelectionModel) e.getOldValue();
+ oldModel.removeListSelectionListener(this);
+ ListSelectionModel newModel = (ListSelectionModel) e.getNewValue();
+ newModel.addListSelectionListener(this);
+ }
+ else if (propName.equals("cellEditor"))
+ {
+ CellEditor oldEd = (CellEditor) e.getOldValue();
+ oldEd.removeCellEditorListener(this);
+ CellEditor newEd = (CellEditor) e.getNewValue();
+ newEd.addCellEditorListener(this);
+ }
+ }
+
+ public int getAccessibleRow(int index)
+ {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public int getAccessibleColumn(int index)
+ {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public int getAccessibleIndex(int r, int c)
+ {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public Accessible getAccessibleCaption()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void setAccessibleCaption(Accessible caption)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public Accessible getAccessibleSummary()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void setAccessibleSummary(Accessible summary)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public int getAccessibleRowCount()
+ {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public int getAccessibleColumnCount()
+ {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public Accessible getAccessibleAt(int r, int c)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public int getAccessibleRowExtentAt(int r, int c)
+ {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public int getAccessibleColumnExtentAt(int r, int c)
+ {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public AccessibleTable getAccessibleRowHeader()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void setAccessibleRowHeader(AccessibleTable header)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public AccessibleTable getAccessibleColumnHeader()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void setAccessibleColumnHeader(AccessibleTable header)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public Accessible getAccessibleRowDescription(int r)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void setAccessibleRowDescription(int r, Accessible description)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public Accessible getAccessibleColumnDescription(int c)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void setAccessibleColumnDescription(int c, Accessible description)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public boolean isAccessibleSelected(int r, int c)
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean isAccessibleRowSelected(int r)
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean isAccessibleColumnSelected(int c)
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public int[] getSelectedAccessibleRows()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public int[] getSelectedAccessibleColumns()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ }
/**
* Handles property changes from the <code>TableColumn</code>s of this
* <code>JTable</code>.
diff --git a/javax/swing/JTextPane.java b/javax/swing/JTextPane.java
index 00c7d35b4..1f5b99e43 100644
--- a/javax/swing/JTextPane.java
+++ b/javax/swing/JTextPane.java
@@ -39,8 +39,6 @@ exception statement from your version. */
package javax.swing;
import java.awt.Component;
-import java.io.IOException;
-import java.io.ObjectOutputStream;
import javax.swing.text.AttributeSet;
import javax.swing.text.BadLocationException;
@@ -49,7 +47,6 @@ import javax.swing.text.Document;
import javax.swing.text.EditorKit;
import javax.swing.text.Element;
import javax.swing.text.MutableAttributeSet;
-import javax.swing.text.SimpleAttributeSet;
import javax.swing.text.Style;
import javax.swing.text.StyledDocument;
import javax.swing.text.StyledEditorKit;
@@ -106,7 +103,7 @@ public class JTextPane
* @throws IllegalArgumentException if <code>document</code> is not an
* instance of <code>StyledDocument</code>
*
- * @see {@link #setStyledDocument}
+ * @see #setStyledDocument
*/
public void setDocument(Document document)
{
@@ -120,7 +117,7 @@ public class JTextPane
/**
* Returns the {@link StyledDocument} that is the content model for
* this <code>JTextPane</code>. This is a typed wrapper for
- * {@link #getDocument}.
+ * {@link #getDocument()}.
*
* @return the content model of this <code>JTextPane</code>
*/
@@ -298,7 +295,7 @@ public class JTextPane
* @param replace if <code>true</code>, the attributes of the current
* selection are overridden, otherwise they are merged
*
- * @see {@link #getInputAttributes}
+ * @see #getInputAttributes
*/
public void setCharacterAttributes(AttributeSet attribute,
boolean replace)
diff --git a/javax/swing/JToolBar.java b/javax/swing/JToolBar.java
index 649919e06..dc85e294d 100644
--- a/javax/swing/JToolBar.java
+++ b/javax/swing/JToolBar.java
@@ -68,6 +68,8 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
/**
* AccessibleJToolBar
*/
+ // FIXME: This inner class is a complete stub and must be implemented
+ // properly.
protected class AccessibleJToolBar extends AccessibleJComponent
{
/** DOCUMENT ME! */
@@ -78,6 +80,7 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
*/
protected AccessibleJToolBar()
{
+ // Nothing to do here.
}
/**
diff --git a/javax/swing/JToolTip.java b/javax/swing/JToolTip.java
index 8d7747827..6bc3e3fa2 100644
--- a/javax/swing/JToolTip.java
+++ b/javax/swing/JToolTip.java
@@ -58,6 +58,8 @@ public class JToolTip extends JComponent implements Accessible
/**
* DOCUMENT ME!
*/
+ // FIXME: This inner class is a complete stub and must be implemented
+ // properly.
protected class AccessibleJToolTip extends AccessibleJComponent
{
private static final long serialVersionUID = -6222548177795408476L;
@@ -67,6 +69,7 @@ public class JToolTip extends JComponent implements Accessible
*/
protected AccessibleJToolTip()
{
+ // Nothing to do here.
}
/**
diff --git a/javax/swing/JTree.java b/javax/swing/JTree.java
index 091ae2e11..660945c27 100644
--- a/javax/swing/JTree.java
+++ b/javax/swing/JTree.java
@@ -73,7 +73,6 @@ import javax.swing.event.TreeWillExpandListener;
import javax.swing.plaf.TreeUI;
import javax.swing.text.Position;
import javax.swing.tree.DefaultMutableTreeNode;
-import javax.swing.tree.DefaultTreeCellRenderer;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.DefaultTreeSelectionModel;
import javax.swing.tree.ExpandVetoException;
@@ -84,9 +83,7 @@ import javax.swing.tree.TreeNode;
import javax.swing.tree.TreePath;
import javax.swing.tree.TreeSelectionModel;
-public class JTree
- extends JComponent
- implements Scrollable, Accessible
+public class JTree extends JComponent implements Scrollable, Accessible
{
/**
@@ -976,6 +973,8 @@ public class JTree
/**
* Returns the number of items currently selected.
+ *
+ * @return the number of selected accessibles.
*/
public int getAccessibleSelectionCount()
{
@@ -1192,6 +1191,7 @@ public class JTree
*/
protected TreeModelHandler()
{
+ // Nothing to do here.
}
/**
@@ -1266,6 +1266,7 @@ public class JTree
*/
protected TreeSelectionRedirector()
{
+ // Nothing to do here.
}
/**
@@ -1301,6 +1302,7 @@ public class JTree
*/
protected EmptySelectionModel()
{
+ // Nothing to do here.
}
/**
@@ -1583,8 +1585,6 @@ public class JTree
public void updateUI()
{
setUI((TreeUI) UIManager.getUI(this));
- revalidate();
- repaint();
}
/**
@@ -2344,6 +2344,7 @@ public class JTree
}
catch (ExpandVetoException ev)
{
+ // We do nothing if attempt has been vetoed.
}
setExpandedState(path, false);
fireTreeCollapsed(path);
@@ -2372,6 +2373,7 @@ public class JTree
}
catch (ExpandVetoException ev)
{
+ // We do nothing if attempt has been vetoed.
}
setExpandedState(path, true);
@@ -2896,7 +2898,7 @@ public class JTree
}
}
}
-
+
/**
* Sent when the tree has changed enough that we need to resize the bounds,
* but not enough that we need to remove the expanded node set (e.g nodes
diff --git a/javax/swing/KeyStroke.java b/javax/swing/KeyStroke.java
index 12a280c21..b57a71192 100644
--- a/javax/swing/KeyStroke.java
+++ b/javax/swing/KeyStroke.java
@@ -51,6 +51,7 @@ public class KeyStroke
// Called by java.awt.AWTKeyStroke.registerSubclass via reflection.
private KeyStroke()
{
+ // Nothing to do here.
}
private KeyStroke(char keyChar, int keyCode, int modifiers,
diff --git a/javax/swing/LookAndFeel.java b/javax/swing/LookAndFeel.java
index 4e9c921dc..063ffd75d 100644
--- a/javax/swing/LookAndFeel.java
+++ b/javax/swing/LookAndFeel.java
@@ -110,6 +110,8 @@ public abstract class LookAndFeel
*/
public void initialize()
{
+ // We do nothing here. This method is meant to be overridden by
+ // LookAndFeel implementations.
}
/**
@@ -185,6 +187,7 @@ public abstract class LookAndFeel
*/
public static void loadKeyBindings(InputMap retMap, Object[] keys)
{
+ // TODO: Implement this properly.
}
/**
@@ -256,6 +259,8 @@ public abstract class LookAndFeel
*/
public void uninitialize()
{
+ // We do nothing here. This method is meant to be overridden by
+ // LookAndFeel implementations.
}
/**
@@ -264,5 +269,7 @@ public abstract class LookAndFeel
*/
public static void uninstallBorder(JComponent c)
{
+ if (c.getBorder() instanceof UIResource)
+ c.setBorder(null);
}
}
diff --git a/javax/swing/MutableComboBoxModel.java b/javax/swing/MutableComboBoxModel.java
index ee79dac03..93091786e 100644
--- a/javax/swing/MutableComboBoxModel.java
+++ b/javax/swing/MutableComboBoxModel.java
@@ -76,7 +76,7 @@ public interface MutableComboBoxModel extends ComboBoxModel
/**
* This method removes given element from the data model
*
- * @param element to remove.
+ * @param object element to remove.
*/
void removeElement(Object object);
-} // MutableComboBoxModel
+}
diff --git a/javax/swing/Popup.java b/javax/swing/Popup.java
index 69e1f5168..3b3a5c6e5 100644
--- a/javax/swing/Popup.java
+++ b/javax/swing/Popup.java
@@ -89,6 +89,7 @@ public class Popup
*/
protected Popup()
{
+ // Nothing to do here.
}
diff --git a/javax/swing/PopupFactory.java b/javax/swing/PopupFactory.java
index 29cf86d55..1e4ad4af1 100644
--- a/javax/swing/PopupFactory.java
+++ b/javax/swing/PopupFactory.java
@@ -55,8 +55,8 @@ public class PopupFactory
/**
* The shared factory object.
*
- * @see #getSharedFactory
- * @see #setSharedFactory
+ * @see #getSharedInstance
+ * @see #setSharedInstance
*/
private static PopupFactory sharedFactory;
@@ -69,6 +69,7 @@ public class PopupFactory
*/
public PopupFactory()
{
+ // Nothing to do here.
}
diff --git a/javax/swing/RepaintManager.java b/javax/swing/RepaintManager.java
index 9a5f071da..362afe24c 100644
--- a/javax/swing/RepaintManager.java
+++ b/javax/swing/RepaintManager.java
@@ -46,12 +46,8 @@ import java.awt.image.VolatileImage;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
-import java.util.Enumeration;
import java.util.HashMap;
-import java.util.Hashtable;
import java.util.Iterator;
-import java.util.Map;
-import java.util.Vector;
/**
* <p>The repaint manager holds a set of dirty regions, invalid components,
@@ -226,7 +222,7 @@ public class RepaintManager
* manager. This is merely a hint to clients; the RepaintManager will
* always return an offscreen buffer when one is requested.
*
- * @see #getDoubleBufferingEnabled
+ * @see #isDoubleBufferingEnabled
* @see #setDoubleBufferingEnabled
*/
boolean doubleBufferingEnabled;
@@ -257,7 +253,7 @@ public class RepaintManager
* components in all windows. This is package-private to avoid an accessor
* method.
*
- * @see #currentManager
+ * @see #currentManager(JComponent)
* @see #setCurrentManager
*/
static RepaintManager globalManager;
diff --git a/javax/swing/SortingFocusTraversalPolicy.java b/javax/swing/SortingFocusTraversalPolicy.java
index fada17c63..96ef38329 100644
--- a/javax/swing/SortingFocusTraversalPolicy.java
+++ b/javax/swing/SortingFocusTraversalPolicy.java
@@ -72,7 +72,7 @@ public class SortingFocusTraversalPolicy
* simply advance within the containing focus cycle, subject to the
* {@link #comparator} order and the {@link #accept} judgment.</p>
*
- * @see #getNextFocusableComponent
+ * @see #getImplicitDownCycleTraversal()
*/
boolean implicitDownCycleTraversal = true;
diff --git a/javax/swing/Spring.java b/javax/swing/Spring.java
index 69c88c77d..8f7105d49 100644
--- a/javax/swing/Spring.java
+++ b/javax/swing/Spring.java
@@ -65,6 +65,7 @@ public abstract class Spring
*/
protected Spring()
{
+ // Nothing to do here.
}
/**
diff --git a/javax/swing/SwingUtilities.java b/javax/swing/SwingUtilities.java
index d5d4a434b..a1fba1cbd 100644
--- a/javax/swing/SwingUtilities.java
+++ b/javax/swing/SwingUtilities.java
@@ -1116,7 +1116,7 @@ public class SwingUtilities
* <pre>
* [{@link javax.swing.JComponent#getActionMap()}]
* --&gt; [{@link javax.swing.ActionMap}]
- * parent --&gt; [{@link javax.swing.text.KeymapActionMap}]
+ * parent --&gt; [{@link javax.swing.text.JTextComponent.KeymapActionMap}]
* parent --&gt; [{@link javax.swing.plaf.ActionMapUIResource}]
* </pre>
*
@@ -1159,7 +1159,7 @@ public class SwingUtilities
* <pre>
* [{@link javax.swing.JComponent#getInputMap()}]
* --&gt; [{@link javax.swing.InputMap}]
- * parent --&gt; [{@link javax.swing.text.KeymapWrapper}]
+ * parent --&gt; [{@link javax.swing.text.JTextComponent.KeymapWrapper}]
* parent --&gt; [{@link javax.swing.plaf.InputMapUIResource}]
* </pre>
*
diff --git a/javax/swing/ToolTipManager.java b/javax/swing/ToolTipManager.java
index d57cdb2a6..03835794b 100644
--- a/javax/swing/ToolTipManager.java
+++ b/javax/swing/ToolTipManager.java
@@ -67,6 +67,7 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
*/
protected stillInsideTimerAction()
{
+ // Nothing to do here.
}
/**
@@ -92,6 +93,7 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
*/
protected outsideTimerAction()
{
+ // Nothing to do here.
}
/**
@@ -102,6 +104,7 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
*/
public void actionPerformed(ActionEvent event)
{
+ // TODO: What should be done here, if anything?
}
}
@@ -117,6 +120,7 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
*/
protected insideTimerAction()
{
+ // Nothing to do here.
}
/**
diff --git a/javax/swing/TransferHandler.java b/javax/swing/TransferHandler.java
index 96cb9d42a..73479f5c8 100644
--- a/javax/swing/TransferHandler.java
+++ b/javax/swing/TransferHandler.java
@@ -162,15 +162,18 @@ public class TransferHandler implements Serializable
}
public void exportAsDrag (JComponent c, InputEvent e, int action)
- {
+ {
+ // TODO: Implement this properly
}
protected void exportDone (JComponent c, Transferable data, int action)
{
+ // TODO: Implement this properly
}
public void exportToClipboard(JComponent c, Clipboard clip, int action)
{
+ // TODO: Implement this properly
}
public int getSourceActions (JComponent c)
diff --git a/javax/swing/ViewportLayout.java b/javax/swing/ViewportLayout.java
index 5abd87db5..0f8ad5574 100644
--- a/javax/swing/ViewportLayout.java
+++ b/javax/swing/ViewportLayout.java
@@ -56,14 +56,17 @@ public class ViewportLayout implements LayoutManager, Serializable
public ViewportLayout()
{
+ // Nothing to do here.
}
public void addLayoutComponent(String name, Component c)
{
+ // Nothing to do here.
}
public void removeLayoutComponent(Component c)
{
+ // Nothing to do here.
}
public Dimension preferredLayoutSize(Container parent)