[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: small AWT fixes

Kaffe CVS cvs-commits at kaffe.org
Thu Dec 2 11:26:23 PST 2004


PatchSet 5505 
Date: 2004/12/02 19:22:16
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath: small AWT fixes

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

        * libraries/javalib/java/awt/CardLayout.java,
        libraries/javalib/java/awt/event/InputEvent.java,
        libraries/javalib/java/awt/image/RGBImageFilter.java:
        Resynced with GNU Classpath.

        2004-11-21  Michael Koch  <konqueror at gmx.de>

        * java/awt/CardLayout.java:
        Made some constants static.
        (serialVersionUID): Made private.
        (addLayoutComponent): Simplified code.
        * java/awt/event/InputEvent.java
        (getModifiersEx): Added missing @param tag.
        * java/awt/image/RGBImageFilter.java
        (filterRGBPixels): Reformatted, removed wrong @param tag.

Members: 
	ChangeLog:1.3051->1.3052 
	libraries/javalib/java/awt/CardLayout.java:1.11->1.12 
	libraries/javalib/java/awt/event/InputEvent.java:1.8->1.9 
	libraries/javalib/java/awt/image/RGBImageFilter.java:1.7->1.8 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3051 kaffe/ChangeLog:1.3052
--- kaffe/ChangeLog:1.3051	Thu Dec  2 19:13:41 2004
+++ kaffe/ChangeLog	Thu Dec  2 19:22:16 2004
@@ -1,5 +1,23 @@
 2004-12-02  Dalibor Topic  <robilad at kaffe.org>
 
+	* libraries/javalib/java/awt/CardLayout.java,
+	libraries/javalib/java/awt/event/InputEvent.java,
+	libraries/javalib/java/awt/image/RGBImageFilter.java:
+        Resynced with GNU Classpath.
+
+	2004-11-21  Michael Koch  <konqueror at gmx.de>
+
+	* java/awt/CardLayout.java:
+	Made some constants static.
+	(serialVersionUID): Made private.
+	(addLayoutComponent): Simplified code.
+	* java/awt/event/InputEvent.java
+	(getModifiersEx): Added missing @param tag.
+	* java/awt/image/RGBImageFilter.java
+	(filterRGBPixels): Reformatted, removed wrong @param tag.
+
+2004-12-02  Dalibor Topic  <robilad at kaffe.org>
+
 	* libraries/javalib/java/net/URLConnection.java:
         Resynced with GNU Classpath.
 
Index: kaffe/libraries/javalib/java/awt/CardLayout.java
diff -u kaffe/libraries/javalib/java/awt/CardLayout.java:1.11 kaffe/libraries/javalib/java/awt/CardLayout.java:1.12
--- kaffe/libraries/javalib/java/awt/CardLayout.java:1.11	Fri Nov 26 18:08:54 2004
+++ kaffe/libraries/javalib/java/awt/CardLayout.java	Thu Dec  2 19:22:19 2004
@@ -53,7 +53,7 @@
  */
 public class CardLayout implements LayoutManager2, Serializable
 {
-  static final long serialVersionUID = -4328196481005934313L;
+  private static final long serialVersionUID = -4328196481005934313L;
 
   /**
    * Initializes a new instance of <code>CardLayout</code> with horizontal
@@ -111,10 +111,7 @@
   {
     tab.put (name, comp);
     // First component added is the default component.
-    if (tab.size() == 1)
-      comp.setVisible(true);
-    else
-      comp.setVisible(false);
+    comp.setVisible(tab.size() == 1);
   }
 
   /**
@@ -474,13 +471,13 @@
   private Hashtable tab;
 
   // These constants are used by the private gotoComponent method.
-  private int FIRST = 0;
-  private int LAST = 1;
-  private int NEXT = 2;
-  private int PREV = 3;
+  private static final int FIRST = 0;
+  private static final int LAST = 1;
+  private static final int NEXT = 2;
+  private static final int PREV = 3;
 
   // These constants are used by the private getSize method.
-  private int MIN = 0;
-  private int MAX = 1;
-  private int PREF = 2;
+  private static final int MIN = 0;
+  private static final int MAX = 1;
+  private static final int PREF = 2;
 }
Index: kaffe/libraries/javalib/java/awt/event/InputEvent.java
diff -u kaffe/libraries/javalib/java/awt/event/InputEvent.java:1.8 kaffe/libraries/javalib/java/awt/event/InputEvent.java:1.9
--- kaffe/libraries/javalib/java/awt/event/InputEvent.java:1.8	Mon Oct  4 09:01:34 2004
+++ kaffe/libraries/javalib/java/awt/event/InputEvent.java	Thu Dec  2 19:22:20 2004
@@ -350,6 +350,7 @@
    * XXX Sun claims this can be localized via the awt.properties file - how
    * do we implement that?
    *
+   * @param modifiers the modifiers
    * @return a string representation of the modifiers in this bitmask
    * @since 1.4
    */
Index: kaffe/libraries/javalib/java/awt/image/RGBImageFilter.java
diff -u kaffe/libraries/javalib/java/awt/image/RGBImageFilter.java:1.7 kaffe/libraries/javalib/java/awt/image/RGBImageFilter.java:1.8
--- kaffe/libraries/javalib/java/awt/image/RGBImageFilter.java:1.7	Sun Sep 12 15:11:02 2004
+++ kaffe/libraries/javalib/java/awt/image/RGBImageFilter.java	Thu Dec  2 19:22:20 2004
@@ -140,28 +140,19 @@
        @param y the y coordinate of the rectangle
        @param w the width of the rectangle
        @param h the height of the rectangle
-       @param model the <code>ColorModel</code> used to translate the pixels
        @param pixels the array of pixel values
        @param offset the index of the first pixels in the <code>pixels</code> array
        @param scansize the width to use in extracting pixels from the <code>pixels</code> array
     */
-    public void filterRGBPixels(int x,
-				int y,
-				int w,
-				int h,
-				int[] pixels,
-				int off,
-				int scansize)
+    public void filterRGBPixels(int x, int y, int w, int h, int[] pixels,
+				int offset, int scansize)
     {
-	int xp, yp, i;
-
-	i = 0;
-	for( xp = x; xp < ( x + w); xp++ )
-	    for( yp = y; yp < (y + h); yp++ )
-	    {
-		pixels[i] = filterRGB( xp, yp, pixels[i] );
-		i++;
-	    }
+      for (int xp = x; xp < (x + w); xp++)
+	for (int yp = y; yp < (y + h); yp++)
+	  {
+	    pixels[offset] = filterRGB(xp, yp, pixels[offset]);
+	    offset++;
+	  }
     }
 
 




More information about the kaffe mailing list