[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: getLayer fixes in Swing

Kaffe CVS cvs-commits at kaffe.org
Mon Dec 13 20:42:27 PST 2004


PatchSet 5638 
Date: 2004/12/14 04:38:02
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath: getLayer fixes in Swing

2004-12-14  Dalibor Topic  <robilad at kaffe.org>

        * libraries/javalib/javax/swing/JLayeredPane.java,
        libraries/javalib/javax/swing/JInternalFrame.java:
        Resynced with GNU Classpath.

        2004-12-13  Michael Koch  <konqueror at gmx.de>

        * javax/swing/JLayeredPane.java
        (getLayer): Fixed return type, made public.
        (getPosition): Use new getLayer().
        (SetPosition): Likewise.
        (getIndexOf): Likewise.
        (remove): Likewise.
        * javax/swing/JInternalFrame.java
        (getLayer): Use new JLayeredPane.getLayer().

Members: 
	ChangeLog:1.3183->1.3184 
	libraries/javalib/javax/swing/JInternalFrame.java:1.5->1.6 
	libraries/javalib/javax/swing/JLayeredPane.java:1.4->1.5 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3183 kaffe/ChangeLog:1.3184
--- kaffe/ChangeLog:1.3183	Tue Dec 14 04:00:36 2004
+++ kaffe/ChangeLog	Tue Dec 14 04:38:02 2004
@@ -1,5 +1,22 @@
 2004-12-14  Dalibor Topic  <robilad at kaffe.org>
 
+	* libraries/javalib/javax/swing/JLayeredPane.java,
+	libraries/javalib/javax/swing/JInternalFrame.java:
+        Resynced with GNU Classpath.
+
+	2004-12-13  Michael Koch  <konqueror at gmx.de>
+
+        * javax/swing/JLayeredPane.java
+        (getLayer): Fixed return type, made public.
+        (getPosition): Use new getLayer().
+        (SetPosition): Likewise.
+        (getIndexOf): Likewise.
+        (remove): Likewise.
+        * javax/swing/JInternalFrame.java
+        (getLayer): Use new JLayeredPane.getLayer().
+
+2004-12-14  Dalibor Topic  <robilad at kaffe.org>
+
 	* kaffe/kaffe/main.c:
 	Fixed broken .class ending detection to make gjdoc run again.
 
Index: kaffe/libraries/javalib/javax/swing/JInternalFrame.java
diff -u kaffe/libraries/javalib/javax/swing/JInternalFrame.java:1.5 kaffe/libraries/javalib/javax/swing/JInternalFrame.java:1.6
--- kaffe/libraries/javalib/javax/swing/JInternalFrame.java:1.5	Mon Oct 25 19:12:11 2004
+++ kaffe/libraries/javalib/javax/swing/JInternalFrame.java	Tue Dec 14 04:38:06 2004
@@ -860,7 +860,7 @@
   {
     JDesktopPane pane = getDesktopPane();
     if (pane != null)
-      return pane.getLayer(this).intValue();
+      return pane.getLayer(this);
     return -1;
   }
 
Index: kaffe/libraries/javalib/javax/swing/JLayeredPane.java
diff -u kaffe/libraries/javalib/javax/swing/JLayeredPane.java:1.4 kaffe/libraries/javalib/javax/swing/JLayeredPane.java:1.5
--- kaffe/libraries/javalib/javax/swing/JLayeredPane.java:1.4	Fri Dec  3 21:28:40 2004
+++ kaffe/libraries/javalib/javax/swing/JLayeredPane.java	Tue Dec 14 04:38:06 2004
@@ -122,11 +122,11 @@
    * @return the layer the component is currently assigned to, in this container.
    * @throws IllegalArgumentException if the component is not a child of this container.
    */
-  protected Integer getLayer (Component c)
+  public int getLayer(Component c)
   {
     if (! componentToLayer.containsKey (c))
 	    throw new IllegalArgumentException ();
-    return (Integer) componentToLayer.get (c);
+    return ((Integer) componentToLayer.get(c)).intValue();
   }
 
   /**
@@ -270,8 +270,8 @@
    */
   public int getPosition(Component c)
   {
-    Integer layer = getLayer (c);
-    int[] range = layerToRange (layer);
+    int layer = getLayer (c);
+    int[] range = layerToRange(new Integer(layer));
     int top = range[0];
     int bot = range[1];
     Component[] comps = getComponents ();
@@ -297,8 +297,8 @@
    */
   public void setPosition(Component c, int position)
   {
-    Integer layer = getLayer (c);
-    int[] range = layerToRange (layer);
+    int layer = getLayer (c);
+    int[] range = layerToRange(new Integer(layer));
     if (range[0] == range[1])
       throw new IllegalArgumentException ();
 
@@ -389,8 +389,8 @@
    */
   public int getIndexOf(Component c) 
   {
-    Integer layer = getLayer (c);
-    int[] range = layerToRange (layer);
+    int layer = getLayer (c);
+    int[] range = layerToRange(new Integer(layer));
     Component[] comps = getComponents();
     for (int i = range[0]; i < range[1]; ++i)
 	    {
@@ -475,8 +475,8 @@
   public void remove (int index)
   {
     Component c = getComponent (index);
-    Integer layer = getLayer (c);
-    decrLayer (layer);
+    int layer = getLayer (c);
+    decrLayer (new Integer(layer));
     componentToLayer.remove (c);
     super.remove (index);
     revalidate();




More information about the kaffe mailing list