From: Michael Koch Date: Sun, 30 May 2004 13:16:34 +0000 (+0000) Subject: 2004-05-30 Michael Koch X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=933592af7905835bbb668598ec3cab92eef32163;p=gcc.git 2004-05-30 Michael Koch * java/awt/DefaultKeyboardFocusManager.java (dispatchEvent): Call method to get key event dispatchers. (dispatchKeyEvent): Call method to get key event post processors. * javax/swing/JComponent.java (listenerList): Made protected. * javax/swing/JOptionPane.java (message): Don't initialize. (JOptionPane): Set message text. * javax/swing/JPopupMenu.java (show): Fixed typo in argument name. * javax/swing/RepaintManager.java (paintDirtyRegions): Use public API of java.util.Map. * javax/swing/plaf/basic/BasicSplitPaneDivider.java (positionForMouseEvent): Removed redundant ';'. (continueDrag): Use method arguments. From-SVN: r82445 --- diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 7852a220f33..46a472e549e 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,21 @@ +2004-05-30 Michael Koch + + * java/awt/DefaultKeyboardFocusManager.java + (dispatchEvent): Call method to get key event dispatchers. + (dispatchKeyEvent): Call method to get key event post processors. + * javax/swing/JComponent.java + (listenerList): Made protected. + * javax/swing/JOptionPane.java + (message): Don't initialize. + (JOptionPane): Set message text. + * javax/swing/JPopupMenu.java + (show): Fixed typo in argument name. + * javax/swing/RepaintManager.java + (paintDirtyRegions): Use public API of java.util.Map. + * javax/swing/plaf/basic/BasicSplitPaneDivider.java + (positionForMouseEvent): Removed redundant ';'. + (continueDrag): Use method arguments. + 2004-05-29 Ranjit Mathew * testsuite/libjava.jacks/jacks.xfail: Update for post tree-ssa merge diff --git a/libjava/java/awt/DefaultKeyboardFocusManager.java b/libjava/java/awt/DefaultKeyboardFocusManager.java index 79a98697430..c4dd7eac609 100644 --- a/libjava/java/awt/DefaultKeyboardFocusManager.java +++ b/libjava/java/awt/DefaultKeyboardFocusManager.java @@ -180,7 +180,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager { // Loop through all registered KeyEventDispatchers, giving // each a chance to handle this event. - Iterator i = keyEventDispatchers.iterator (); + Iterator i = getKeyEventDispatchers().iterator(); while (i.hasNext ()) { @@ -234,7 +234,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager // Loop through all registered KeyEventPostProcessors, giving // each a chance to process this event. - Iterator i = keyEventPostProcessors.iterator (); + Iterator i = getKeyEventPostProcessors().iterator(); while (i.hasNext ()) { diff --git a/libjava/javax/swing/JComponent.java b/libjava/javax/swing/JComponent.java index b191635ea77..e03c1c9dde4 100644 --- a/libjava/javax/swing/JComponent.java +++ b/libjava/javax/swing/JComponent.java @@ -305,7 +305,7 @@ public abstract class JComponent extends Container implements Serializable * handled by this listener list. PropertyChangeEvents are handled in * {@link #changeSupport}. */ - EventListenerList listenerList = new EventListenerList(); + protected EventListenerList listenerList = new EventListenerList(); /** * Support for {@link PropertyChangeEvent} events. This is constructed diff --git a/libjava/javax/swing/JOptionPane.java b/libjava/javax/swing/JOptionPane.java index ae7afbf3020..decd02c9213 100644 --- a/libjava/javax/swing/JOptionPane.java +++ b/libjava/javax/swing/JOptionPane.java @@ -203,7 +203,7 @@ public class JOptionPane extends JComponent implements Accessible protected Object inputValue = UNINITIALIZED_VALUE; /** The message displayed in the dialog/internal frame. */ - protected Object message = "JOptionPane message"; + protected Object message; /** The type of message displayed. */ protected int messageType = PLAIN_MESSAGE; @@ -235,7 +235,7 @@ public class JOptionPane extends JComponent implements Accessible */ public JOptionPane() { - this(this.message, PLAIN_MESSAGE, DEFAULT_OPTION, null, null, null); + this("JOptionPane message", PLAIN_MESSAGE, DEFAULT_OPTION, null, null, null); } /** diff --git a/libjava/javax/swing/JPopupMenu.java b/libjava/javax/swing/JPopupMenu.java index e2882f8a01e..3cf3c8343ec 100644 --- a/libjava/javax/swing/JPopupMenu.java +++ b/libjava/javax/swing/JPopupMenu.java @@ -70,7 +70,7 @@ import javax.swing.plaf.PopupMenuUI; * DOCUMENT ME! * * @author $author$ - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ */ public class JPopupMenu extends JComponent implements Accessible, MenuElement { @@ -800,7 +800,7 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement * DOCUMENT ME! * * @author $author$ - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ */ private interface Popup { @@ -824,7 +824,7 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement * DOCUMENT ME! * * @author $author$ - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ */ private class LightWeightPopup extends JPanel implements Popup { @@ -870,7 +870,7 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement * DOCUMENT ME! * * @author $author$ - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ */ private class MediumWeightPopup extends Panel implements Popup { @@ -893,7 +893,7 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement * @param width DOCUMENT ME! * @param heigth DOCUMENT ME! */ - public void show(int x, int y, int width, int heigth) + public void show(int x, int y, int width, int height) { JLayeredPane layeredPane; layeredPane = SwingUtilities.getRootPane(invoker).getLayeredPane(); @@ -917,7 +917,7 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement * DOCUMENT ME! * * @author $author$ - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ */ private class HeavyWeightPopup extends JWindow implements Popup { @@ -958,7 +958,7 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement * DOCUMENT ME! * * @author $author$ - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ */ public static class Separator extends JSeparator { @@ -984,7 +984,7 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement * DOCUMENT ME! * * @author $author$ - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ */ protected class AccessibleJPopupMenu extends AccessibleJComponent { diff --git a/libjava/javax/swing/RepaintManager.java b/libjava/javax/swing/RepaintManager.java index 5219e222e35..22986014738 100644 --- a/libjava/javax/swing/RepaintManager.java +++ b/libjava/javax/swing/RepaintManager.java @@ -41,11 +41,11 @@ import java.awt.Component; import java.awt.Dimension; import java.awt.Image; import java.awt.Rectangle; -import java.util.AbstractMap; import java.util.Enumeration; import java.util.Hashtable; import java.util.HashMap; import java.util.Iterator; +import java.util.Map; import java.util.Vector; @@ -441,7 +441,7 @@ public class RepaintManager Iterator i = roots.values().iterator(); while(i.hasNext()) { - AbstractMap.BasicMapEntry ent = (AbstractMap.BasicMapEntry) i.next(); + Map.Entry ent = (Map.Entry) i.next(); JRootPane root = (JRootPane) ent.getKey(); Rectangle rect = (Rectangle) ent.getValue(); root.paintImmediately(rect); diff --git a/libjava/javax/swing/plaf/basic/BasicSplitPaneDivider.java b/libjava/javax/swing/plaf/basic/BasicSplitPaneDivider.java index 3a2db55a863..e169f6d0952 100644 --- a/libjava/javax/swing/plaf/basic/BasicSplitPaneDivider.java +++ b/libjava/javax/swing/plaf/basic/BasicSplitPaneDivider.java @@ -623,7 +623,6 @@ public class BasicSplitPaneDivider extends Container protected int positionForMouseEvent(MouseEvent e) { return e.getX() + getX() - offset; - ; } /** @@ -650,7 +649,7 @@ public class BasicSplitPaneDivider extends Container protected void continueDrag(int newX, int newY) { if (isValid()) - dragDividerTo(adjust(x, y)); + dragDividerTo(adjust(newX, newY)); } /**