Index: javax/swing/AbstractButton.java =================================================================== RCS file: /cvs/gcc/gcc/libjava/javax/swing/AbstractButton.java,v retrieving revision 1.5.2.19 diff -u -r1.5.2.19 AbstractButton.java --- javax/swing/AbstractButton.java 22 Oct 2004 12:41:09 -0000 1.5.2.19 +++ javax/swing/AbstractButton.java 25 Jan 2005 07:05:58 -0000 @@ -661,7 +661,7 @@ * * @param e The event signifying that the button's model changed state */ - public void fireItemStateChanged(ItemEvent e) + protected void fireItemStateChanged(ItemEvent e) { e.setSource(this); ItemListener[] listeners = getItemListeners(); @@ -676,7 +676,7 @@ * * @param e The event signifying that the button's model was clicked */ - public void fireActionPerformed(ActionEvent e) + protected void fireActionPerformed(ActionEvent e) { e.setSource(this); ActionListener[] listeners = getActionListeners(); @@ -689,7 +689,7 @@ * Calls address@hidden ChangeEvent.stateChanged} on each address@hidden ChangeListener} * in the button's listener list. */ - public void fireStateChanged() + protected void fireStateChanged() { ChangeListener[] listeners = getChangeListeners(); @@ -806,7 +806,7 @@ public void setRolloverEnabled(boolean r) { if (rollOverEnabled != r) - { + { rollOverEnabled = r; firePropertyChange(ROLLOVER_ENABLED_CHANGED_PROPERTY, !r, r); revalidate(); Index: javax/swing/DefaultButtonModel.java =================================================================== RCS file: /cvs/gcc/gcc/libjava/javax/swing/DefaultButtonModel.java,v retrieving revision 1.5.2.7 diff -u -r1.5.2.7 DefaultButtonModel.java --- javax/swing/DefaultButtonModel.java 27 Dec 2004 11:25:00 -0000 1.5.2.7 +++ javax/swing/DefaultButtonModel.java 25 Jan 2005 07:05:58 -0000 @@ -272,7 +272,7 @@ * * @param e The ItemEvent to fire */ - public void fireItemStateChanged(ItemEvent e) + protected void fireItemStateChanged(ItemEvent e) { ItemListener[] ll = getItemListeners(); @@ -288,7 +288,7 @@ * * @param e The ActionEvent to fire */ - public void fireActionPerformed(ActionEvent e) + protected void fireActionPerformed(ActionEvent e) { ActionListener[] ll = getActionListeners(); @@ -301,7 +301,7 @@ * has occurred. This happens in response to the any change to a property * of the model. */ - public void fireStateChanged() + protected void fireStateChanged() { ChangeListener[] ll = getChangeListeners(); Index: javax/swing/JApplet.java =================================================================== RCS file: /cvs/gcc/gcc/libjava/javax/swing/JApplet.java,v retrieving revision 1.3.2.8 diff -u -r1.3.2.8 JApplet.java --- javax/swing/JApplet.java 29 Dec 2004 15:53:30 -0000 1.3.2.8 +++ javax/swing/JApplet.java 25 Jan 2005 07:05:58 -0000 @@ -1,5 +1,5 @@ /* JApplet.java -- - Copyright (C) 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -59,16 +59,6 @@ public JApplet() { - frameInit(); - } - - public JApplet(String title) - { - frameInit(); - } - - protected void frameInit() - { super.setLayout(new BorderLayout(1, 1)); getRootPane(); // will do set/create } @@ -100,7 +90,7 @@ return rootPane; } - public void setRootPane(JRootPane root) + protected void setRootPane(JRootPane root) { if (rootPane != null) remove(rootPane); @@ -109,7 +99,7 @@ add(rootPane, BorderLayout.CENTER); } - public JRootPane createRootPane() + protected JRootPane createRootPane() { return new JRootPane(); } Index: javax/swing/JComponent.java =================================================================== RCS file: /cvs/gcc/gcc/libjava/javax/swing/JComponent.java,v retrieving revision 1.7.2.26 diff -u -r1.7.2.26 JComponent.java --- javax/swing/JComponent.java 31 Dec 2004 16:29:58 -0000 1.7.2.26 +++ javax/swing/JComponent.java 25 Jan 2005 07:05:59 -0000 @@ -427,7 +427,7 @@ * @see #getClientProperties * @see #putClientProperty */ - public Object getClientProperty(Object key) + public final Object getClientProperty(Object key) { return getClientProperties().get(key); } @@ -444,7 +444,7 @@ * @see #getClientProperties * @see #getClientProperty */ - public void putClientProperty(Object key, Object value) + public final void putClientProperty(Object key, Object value) { getClientProperties().put(key, value); } Index: javax/swing/JEditorPane.java =================================================================== RCS file: /cvs/gcc/gcc/libjava/javax/swing/JEditorPane.java,v retrieving revision 1.5.2.8 diff -u -r1.5.2.8 JEditorPane.java --- javax/swing/JEditorPane.java 10 Jan 2005 18:16:37 -0000 1.5.2.8 +++ javax/swing/JEditorPane.java 25 Jan 2005 07:05:59 -0000 @@ -113,7 +113,7 @@ return null; } - public String getContentType() + public final String getContentType() { return getEditorKit().getContentType(); } @@ -243,7 +243,7 @@ { } - public void setContentType(String type) + public final void setContentType(String type) { if (editorKit != null && editorKit.getContentType().equals(type)) Index: javax/swing/JFrame.java =================================================================== RCS file: /cvs/gcc/gcc/libjava/javax/swing/JFrame.java,v retrieving revision 1.4.2.10 diff -u -r1.4.2.10 JFrame.java --- javax/swing/JFrame.java 22 Oct 2004 12:41:12 -0000 1.4.2.10 +++ javax/swing/JFrame.java 25 Jan 2005 07:05:59 -0000 @@ -1,5 +1,5 @@ /* JFrame.java -- - Copyright (C) 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -123,7 +123,7 @@ return rootPane; } - public void setRootPane(JRootPane root) + protected void setRootPane(JRootPane root) { if (rootPane != null) remove(rootPane); @@ -132,7 +132,7 @@ add(rootPane, BorderLayout.CENTER); } - public JRootPane createRootPane() + protected JRootPane createRootPane() { return new JRootPane(); } Index: javax/swing/JInternalFrame.java =================================================================== RCS file: /cvs/gcc/gcc/libjava/javax/swing/JInternalFrame.java,v retrieving revision 1.2.18.8 diff -u -r1.2.18.8 JInternalFrame.java --- javax/swing/JInternalFrame.java 22 Dec 2004 21:40:29 -0000 1.2.18.8 +++ javax/swing/JInternalFrame.java 25 Jan 2005 07:06:00 -0000 @@ -1,5 +1,5 @@ /* JInternalFrame.java -- - Copyright (C) 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -780,9 +780,11 @@ * This method returns null because this must always be the root of a focus * traversal. * - * @return null. + * @return always null + * + * @since 1.4 */ - public Container getFocusCycleRootAncestor() + public final Container getFocusCycleRootAncestor() { // as defined. return null; @@ -968,7 +970,7 @@ * * @return null. */ - public String getWarningString() + public final String getWarningString() { // as defined. return null; @@ -1019,9 +1021,11 @@ /** * This must always return true. * - * @return True + * @return always true + * + * @since 1.4 */ - public boolean isFocusCycleRoot() + public final boolean isFocusCycleRoot() { return true; } Index: javax/swing/JScrollBar.java =================================================================== RCS file: /cvs/gcc/gcc/libjava/javax/swing/JScrollBar.java,v retrieving revision 1.2.18.7 diff -u -r1.2.18.7 JScrollBar.java --- javax/swing/JScrollBar.java 9 Oct 2004 07:38:29 -0000 1.2.18.7 +++ javax/swing/JScrollBar.java 25 Jan 2005 07:06:00 -0000 @@ -1,5 +1,5 @@ /* JScrollBar.java -- - Copyright (C) 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -35,6 +35,7 @@ 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.Adjustable; @@ -47,11 +48,8 @@ import javax.accessibility.AccessibleRole; import javax.accessibility.AccessibleStateSet; import javax.accessibility.AccessibleValue; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; import javax.swing.plaf.ScrollBarUI; - /** * The JScrollBar. Two buttons control how the values that the * scroll bar can take. You can also drag the thumb or click the track @@ -178,12 +176,6 @@ /** How much the thumb moves when moving in a unit. */ protected int unitIncrement = 1; - /** The ChangeListener that listens to the model. */ - private transient ChangeListener changeListener; - - /** The ChangeEvent that's fired. */ - private transient ChangeEvent changeEvent; - /** * Creates a new horizontal JScrollBar object with a minimum * of 0, a maxmium of 100, a value of 0 and an extent of 10. @@ -223,8 +215,6 @@ throw new IllegalArgumentException(orientation + " is not a legal orientation"); this.orientation = orientation; - changeListener = createChangeListener(); - model.addChangeListener(changeListener); updateUI(); } @@ -325,8 +315,6 @@ { BoundedRangeModel oldModel = model; model = newModel; - oldModel.removeChangeListener(changeListener); - model.addChangeListener(changeListener); firePropertyChange(MODEL_CHANGED_PROPERTY, oldModel, model); } } @@ -558,70 +546,6 @@ } /** - * This method creates a new ChangeListener. - * - * @return A new ChangeListener. - */ - private ChangeListener createChangeListener() - { - return new ChangeListener() - { - public void stateChanged(ChangeEvent e) - { - fireStateChanged(); - } - }; - } - - /** - * This method is called whenever the model fires a ChangeEvent. It should - * propagate the ChangeEvent to its listeners with a new ChangeEvent that - * identifies the scroll bar as the source. - */ - private void fireStateChanged() - { - Object[] changeListeners = listenerList.getListenerList(); - if (changeEvent == null) - changeEvent = new ChangeEvent(this); - for (int i = changeListeners.length - 2; i >= 0; i -= 2) - { - if (changeListeners[i] == ChangeListener.class) - ((ChangeListener) changeListeners[i + 1]).stateChanged(changeEvent); - } - } - - /** - * This method adds a ChangeListener to the scroll bar. - * - * @param listener The listener to add. - */ - public void addChangeListener(ChangeListener listener) - { - listenerList.add(ChangeListener.class, listener); - } - - /** - * This method removes a ChangeListener from the scroll bar. - * - * @param listener The listener to remove. - */ - public void removeChangeListener(ChangeListener listener) - { - listenerList.remove(ChangeListener.class, listener); - } - - /** - * This method returns an array of all ChangeListeners listening to this - * scroll bar. - * - * @return An array of ChangeListeners listening to this scroll bar. - */ - public ChangeListener[] getChangeListeners() - { - return (ChangeListener[]) listenerList.getListeners(ChangeListener.class); - } - - /** * This method adds an AdjustmentListener to the scroll bar. * * @param listener The listener to add. Index: javax/swing/JScrollPane.java =================================================================== RCS file: /cvs/gcc/gcc/libjava/javax/swing/JScrollPane.java,v retrieving revision 1.3.2.10 diff -u -r1.3.2.10 JScrollPane.java --- javax/swing/JScrollPane.java 24 Jan 2005 21:57:21 -0000 1.3.2.10 +++ javax/swing/JScrollPane.java 25 Jan 2005 07:06:00 -0000 @@ -588,7 +588,7 @@ return new ScrollBar(SwingConstants.VERTICAL); } - public JViewport createViewport() + protected JViewport createViewport() { return new JViewport(); } Index: javax/swing/JViewport.java =================================================================== RCS file: /cvs/gcc/gcc/libjava/javax/swing/JViewport.java,v retrieving revision 1.3.2.12 diff -u -r1.3.2.12 JViewport.java --- javax/swing/JViewport.java 10 Nov 2004 07:19:48 -0000 1.3.2.12 +++ javax/swing/JViewport.java 25 Jan 2005 07:06:00 -0000 @@ -1,5 +1,5 @@ /* JViewport.java -- - Copyright (C) 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -45,6 +45,7 @@ import java.awt.Point; import java.awt.Rectangle; +import javax.swing.border.Border; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.plaf.ViewportUI; @@ -281,7 +282,7 @@ fireStateChanged(); } - public void addImpl(Component comp, Object constraints, int index) + protected void addImpl(Component comp, Object constraints, int index) { if (getComponentCount() > 0) remove(getComponents()[0]); @@ -374,4 +375,10 @@ { super.setUI(ui); } + + public final void setBorder(Border border) + { + if (border != null) + throw new IllegalArgumentException(); + } } Index: javax/swing/JWindow.java =================================================================== RCS file: /cvs/gcc/gcc/libjava/javax/swing/JWindow.java,v retrieving revision 1.3.18.12 diff -u -r1.3.18.12 JWindow.java --- javax/swing/JWindow.java 24 Jan 2005 21:57:23 -0000 1.3.18.12 +++ javax/swing/JWindow.java 25 Jan 2005 07:06:00 -0000 @@ -129,7 +129,7 @@ return rootPane; } - public void setRootPane(JRootPane root) + protected void setRootPane(JRootPane root) { if (rootPane != null) remove(rootPane); @@ -138,7 +138,7 @@ add(rootPane, BorderLayout.CENTER); } - public JRootPane createRootPane() + protected JRootPane createRootPane() { return new JRootPane(); } Index: javax/swing/plaf/basic/BasicButtonUI.java =================================================================== RCS file: /cvs/gcc/gcc/libjava/javax/swing/plaf/basic/BasicButtonUI.java,v retrieving revision 1.6.2.12 diff -u -r1.6.2.12 BasicButtonUI.java --- javax/swing/plaf/basic/BasicButtonUI.java 23 Dec 2004 10:36:17 -0000 1.6.2.12 +++ javax/swing/plaf/basic/BasicButtonUI.java 25 Jan 2005 07:06:00 -0000 @@ -1,5 +1,5 @@ -/* BasicButtonUI.java - Copyright (C) 2002, 2004 Free Software Foundation, Inc. +/* BasicButtonUI.java -- + Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -35,6 +35,7 @@ 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.Color; @@ -136,7 +137,7 @@ return new BasicButtonListener(b); } - public void installListeners(AbstractButton b) + protected void installListeners(AbstractButton b) { listener = createButtonListener(b); b.addChangeListener(listener); @@ -146,7 +147,7 @@ b.addMouseMotionListener(listener); } - public void uninstallListeners(AbstractButton b) + protected void uninstallListeners(AbstractButton b) { b.removeChangeListener(listener); b.removePropertyChangeListener(listener); Index: javax/swing/plaf/basic/BasicProgressBarUI.java =================================================================== RCS file: /cvs/gcc/gcc/libjava/javax/swing/plaf/basic/BasicProgressBarUI.java,v retrieving revision 1.1.2.6 diff -u -r1.1.2.6 BasicProgressBarUI.java --- javax/swing/plaf/basic/BasicProgressBarUI.java 22 Oct 2004 12:41:22 -0000 1.1.2.6 +++ javax/swing/plaf/basic/BasicProgressBarUI.java 25 Jan 2005 07:06:01 -0000 @@ -1,5 +1,5 @@ /* BasicProgressBarUI.java -- - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -467,7 +467,7 @@ /** * This method increments the animation index. */ - public void incrementAnimationIndex() + protected void incrementAnimationIndex() { animationIndex++; //numFrames is like string length, it should be named numFrames or something Index: javax/swing/plaf/basic/BasicTabbedPaneUI.java =================================================================== RCS file: /cvs/gcc/gcc/libjava/javax/swing/plaf/basic/BasicTabbedPaneUI.java,v retrieving revision 1.3.16.16 diff -u -r1.3.16.16 BasicTabbedPaneUI.java --- javax/swing/plaf/basic/BasicTabbedPaneUI.java 24 Dec 2004 09:52:59 -0000 1.3.16.16 +++ javax/swing/plaf/basic/BasicTabbedPaneUI.java 25 Jan 2005 07:06:01 -0000 @@ -1,5 +1,5 @@ -/* BasicTabbedPaneUI.java - Copyright (C) 2002, 2004 Free Software Foundation, Inc. +/* BasicTabbedPaneUI.java -- + Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -35,6 +35,7 @@ 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.Color; @@ -75,7 +76,6 @@ import javax.swing.plaf.UIResource; import javax.swing.text.View; - /** * This is the Basic Look and Feel's UI delegate for JTabbedPane. */ @@ -1458,7 +1458,7 @@ * * @return A layout manager given the tab layout policy. */ - public LayoutManager createLayoutManager() + protected LayoutManager createLayoutManager() { if (tabPane.getTabLayoutPolicy() == JTabbedPane.WRAP_TAB_LAYOUT) return new TabbedPaneLayout(); Index: javax/swing/table/DefaultTableCellRenderer.java =================================================================== RCS file: /cvs/gcc/gcc/libjava/javax/swing/table/DefaultTableCellRenderer.java,v retrieving revision 1.4.4.3 diff -u -r1.4.4.3 DefaultTableCellRenderer.java --- javax/swing/table/DefaultTableCellRenderer.java 22 Oct 2004 12:41:26 -0000 1.4.4.3 +++ javax/swing/table/DefaultTableCellRenderer.java 25 Jan 2005 07:06:01 -0000 @@ -1,5 +1,5 @@ /* DefaultTableCellRenderer.java -- - Copyright (C) 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -199,8 +199,8 @@ *

This method needs to be overridden in a subclass to actually * do something.

*/ - public void firePropertyChange(String propertyName, Object oldValue, - Object newValue) + protected void firePropertyChange(String propertyName, Object oldValue, + Object newValue) { // Does nothing. } Index: javax/swing/table/JTableHeader.java =================================================================== RCS file: /cvs/gcc/gcc/libjava/javax/swing/table/JTableHeader.java,v retrieving revision 1.2.2.6 diff -u -r1.2.2.6 JTableHeader.java --- javax/swing/table/JTableHeader.java 20 Jan 2005 12:17:00 -0000 1.2.2.6 +++ javax/swing/table/JTableHeader.java 25 Jan 2005 07:06:01 -0000 @@ -70,6 +70,11 @@ protected class AccessibleJTableHeaderEntry extends AccessibleContext implements Accessible, AccessibleComponent { + public AccessibleJTableHeaderEntry(int c, JTableHeader p, JTable t) + { + throw new Error("not implemented"); + } + public void addFocusListener(FocusListener l) { throw new Error("not implemented"); Index: javax/swing/text/PlainDocument.java =================================================================== RCS file: /cvs/gcc/gcc/libjava/javax/swing/text/PlainDocument.java,v retrieving revision 1.1.52.5 diff -u -r1.1.52.5 PlainDocument.java --- javax/swing/text/PlainDocument.java 2 Jan 2005 12:49:20 -0000 1.1.52.5 +++ javax/swing/text/PlainDocument.java 25 Jan 2005 07:06:01 -0000 @@ -62,7 +62,7 @@ rootElement = createDefaultRoot(); } - protected void reindex() + private void reindex() { Element[] lines; try Index: javax/swing/text/PlainView.java =================================================================== RCS file: /cvs/gcc/gcc/libjava/javax/swing/text/PlainView.java,v retrieving revision 1.1.2.7 diff -u -r1.1.2.7 PlainView.java --- javax/swing/text/PlainView.java 21 Jan 2005 09:21:12 -0000 1.1.2.7 +++ javax/swing/text/PlainView.java 25 Jan 2005 07:06:01 -0000 @@ -117,7 +117,7 @@ return rect; } - public void drawLine(int lineIndex, Graphics g, int x, int y) + protected void drawLine(int lineIndex, Graphics g, int x, int y) { try { @@ -176,7 +176,7 @@ } } - public int getTabSize() + protected int getTabSize() { return 8; } Index: javax/swing/text/View.java =================================================================== RCS file: /cvs/gcc/gcc/libjava/javax/swing/text/View.java,v retrieving revision 1.2.8.7 diff -u -r1.2.8.7 View.java --- javax/swing/text/View.java 24 Jan 2005 18:49:53 -0000 1.2.8.7 +++ javax/swing/text/View.java 25 Jan 2005 07:06:01 -0000 @@ -80,12 +80,6 @@ return parent; } - public void setSize(int w, int h) - { - width = w; - height = h; - } - public Container getContainer() { View parent = getParent(); @@ -242,5 +236,29 @@ { return getContainer().getGraphics(); } + + public void preferenceChanged(View child, boolean width, boolean height) + { + if (parent != null) + parent.preferenceChanged(this, width, height); + } + + public int getBreakWeight(int axis, float pos, float len) + { + return BadBreakWeight; + } + + public View breakView(int axis, int offset, float pos, float len) + { + return this; + } + + /** + * @since 1.3 + */ + public int getViewIndex(int pos, Position.Bias b) + { + return -1; + } }