This is the mail archive of the java-patches@sources.redhat.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch: Moving AWT files and lightweight dispatching


This patch contains the changes suggested by Bryce: moving files away
from gnu/gcj/awt, and moving the lightweight dispatching mechanism 
inside the java.awt package.

One LightweightDispatcher instance is created for each toolkit. Since 
getToolkit() can be costly in deep component trees, a reference to the
LightweightDispatcher instance is cached in the field dispatcher in 
Container.

Is this what you had in mind, Bryce? OK to commit?

2000-10-29  Rolf W. Rasmussen <rolfwr@ii.uib.no>

	* gnu/awt/BitMaskExtent.java, gnu/awt/GLightweightPeer.java,
	gnu/awt/j2d/Buffers.java gnu/awt/j2d/ComponentDataBlitOp.java:
	Moved files from gnu/gcj/awt and updated package statements.
	* gnu/awt/xlib/XGraphicsConfiguration.java,
	gnu/awt/GLightweightPeer.java, java/awt/Toolkit.java,
	java/awt/image/BufferedImage.java, java/awt/image/ColorModel.java,
	java/awt/image/ComponentColorModel.java,
	java/awt/image/ComponentSampleModel.java,
	java/awt/image/DirectColorModel.java,
	java/awt/image/IndexColorModel.java,
	java/awt/image/PackedColorModel.java,
	java/awt/image/SinglePixelPackedSampleModel.java: Updated
	import statements.
	* java/awt/LightweightDispatcher.java: Renamed from
	gnu/awt/LightweightRedirector.java, updated package statement
	and made class package private.
	(dispatchEvent): New method.
	* java/awt/Container.java (dispatcher): Enabled field.
	(dispatchEventImpl): Dispatch events to lightweights.
	(removeNotify): Invalidate cached dispatcher reference.
	* java/awt/Toolkit.java (dispatcher): New field.
	* gnu/awt/xlib/XEventLoop.java (lightweightDispatcher): Removed.
	(getNextEvent): Do not redirect events here.
	* Makefile.am: Updated paths of moved and renamed files.
	(install-exec-hook): Remove old links to allow reinstalling,
	create symbolic links using $(LN_S).
	* Makefile.in: Rebuilt.

- Rolf
Index: Makefile.am
===================================================================
RCS file: /cvs/java/libgcj/libjava/Makefile.am,v
retrieving revision 1.97
diff -u -r1.97 Makefile.am
--- Makefile.am	2000/10/27 10:33:46	1.97
+++ Makefile.am	2000/10/29 12:35:54
@@ -154,7 +154,8 @@
 	if test -f libgcjx.la; then \
 	  for f in libgcjx*; do \
 	    t=`echo $$f | sed -e 's/libgcjx/gnu-awt-xlib/'`; \
-	    ln -s $$f $$t; \
+	    rm -f $$t; \
+	    $(LN_S) $$f $$t; \
 	  done; \
 	fi
 
@@ -527,16 +528,15 @@
 special_java_source_files = java/lang/Class.java java/lang/Object.java
 
 awt_java_source_files =	\
-gnu/awt/LightweightRedirector.java \
+gnu/awt/BitMaskExtent.java \
+gnu/awt/GLightweightPeer.java \
 gnu/awt/j2d/AbstractGraphicsState.java \
+gnu/awt/j2d/Buffers.java \
+gnu/awt/j2d/ComponentDataBlitOp.java \
 gnu/awt/j2d/DirectRasterGraphics.java \
 gnu/awt/j2d/Graphics2DImpl.java \
 gnu/awt/j2d/IntegerGraphicsState.java \
 gnu/awt/j2d/MappedRaster.java \
-gnu/gcj/awt/BitMaskExtent.java \
-gnu/gcj/awt/Buffers.java \
-gnu/gcj/awt/ComponentDataBlitOp.java \
-gnu/gcj/awt/GLightweightPeer.java \
 gnu/java/beans/editors/ColorEditor.java	\
 gnu/java/beans/editors/FontEditor.java \
 gnu/java/beans/editors/NativeBooleanEditor.java	\
@@ -593,6 +593,7 @@
 java/awt/Label.java \
 java/awt/LayoutManager.java \
 java/awt/LayoutManager2.java \
+java/awt/LightweightDispatcher.java \
 java/awt/List.java \
 java/awt/Menu.java \
 java/awt/MenuBar.java \
Index: gnu/awt/BitMaskExtent.java
===================================================================
RCS file: BitMaskExtent.java
diff -N BitMaskExtent.java
--- /dev/null	Tue May  5 13:32:27 1998
+++ BitMaskExtent.java	Sun Oct 29 04:35:57 2000
@@ -0,0 +1,51 @@
+/* Copyright (C) 2000  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+package gnu.awt;
+
+/** 
+ * Simple transparent utility class that can be used to perform bit
+ * mask extent calculations.
+ */
+public final class BitMaskExtent
+{
+  /** The number of the least significant bit of the bit mask extent. */
+  public byte leastSignificantBit;
+
+  /** The number of bits in the bit mask extent. */
+  public byte bitWidth;
+  
+  /**
+   * Set the bit mask. This will calculate and set the leastSignificantBit
+   * and bitWidth fields.
+   *
+   * @see #leastSignificantBit
+   * @see #bitWidth
+   */
+  public void setMask(long mask)
+  {
+    leastSignificantBit = 0;
+    bitWidth = 0;
+    if (mask == 0) return;
+    long shiftMask = mask;
+    for (; (shiftMask&1) == 0; shiftMask >>>=1) leastSignificantBit++;
+    for (; (shiftMask&1) != 0; shiftMask >>>=1) bitWidth++;
+    
+    if (shiftMask != 0)
+      throw new IllegalArgumentException("mask must be continuous");
+  }
+  
+  /** 
+   * Calculate the bit mask based on the values of the
+   * leastSignificantBit and bitWidth fields.
+   */
+  public long toMask()
+  {
+    return ((1<<bitWidth)-1) << leastSignificantBit;
+  }  
+}
Index: gnu/awt/GLightweightPeer.java
===================================================================
RCS file: GLightweightPeer.java
diff -N GLightweightPeer.java
--- /dev/null	Tue May  5 13:32:27 1998
+++ GLightweightPeer.java	Sun Oct 29 04:35:57 2000
@@ -0,0 +1,134 @@
+/* Copyright (C) 2000  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+package gnu.awt;
+
+import java.awt.*;
+import java.awt.peer.*;
+import java.awt.image.*;
+
+/**
+ * @author Rolf W. Rasmussen <rolfwr@ii.uib.no>
+ */
+public class GLightweightPeer implements LightweightPeer
+{
+  public static final GLightweightPeer INSTANCE = new GLightweightPeer();
+
+  public GLightweightPeer() {}
+
+  // -------- java.awt.peer.ComponentPeer implementation:
+  
+  public int checkImage(Image img, int width, int height, ImageObserver o)
+  {
+    return 0;
+  }
+
+  public Image createImage(ImageProducer prod)
+  {
+    return null;
+  }
+
+  public Image createImage(int width, int height)
+  {
+    return null;
+  }
+
+  public void disable() {}
+
+  public void dispose() {}
+
+  public void enable() {}
+
+  public GraphicsConfiguration getGraphicsConfiguration()
+  {
+    return null;
+  }
+  
+  public FontMetrics getFontMetrics(Font f)
+  {
+    return null;
+  }
+
+  public Graphics getGraphics()
+  {
+    return null;
+  }
+
+  public Point getLocationOnScreen()
+  {
+    return null;
+  }
+
+  public Dimension getMinimumSize()
+  {
+    return null;
+  }
+
+  public Dimension getPreferredSize()
+  {
+    return null;
+  }
+
+  public Toolkit getToolkit()
+  {
+    return null;
+  }
+
+  public void handleEvent(AWTEvent e) {}
+
+  public void hide() {}
+
+  public boolean isFocusTraversable()
+  {
+    return false;
+  }
+
+  public Dimension minimumSize()
+  {
+    return null;
+  }
+
+  public Dimension preferredSize()
+  {
+    return null;
+  }
+
+  public void paint(Graphics graphics) {}
+
+  public boolean prepareImage(Image img, int width, int height,
+			      ImageObserver o)
+  {
+    return false;
+  }
+
+  public void print(Graphics graphics) {}
+
+  public void repaint(long tm, int x, int y, int width, int height) {}
+
+  public void requestFocus() {}
+
+  public void reshape(int x, int y, int width, int height) {}
+
+  public void setBackground(Color color) {}
+
+  public void setBounds(int x, int y, int width, int height) {}
+
+  public void setCursor(Cursor cursor) {}
+
+  public void setEnabled(boolean enabled) {}
+
+  public void setEventMask(long eventMask) {}
+
+  public void setFont(Font font) {}
+
+  public void setForeground(Color color) {}
+
+  public void setVisible(boolean visible) {}
+
+  public void show() {}
+}
Index: gnu/awt/LightweightRedirector.java
===================================================================
RCS file: LightweightRedirector.java
diff -N LightweightRedirector.java
--- /sourceware/cvs-tmp/cvsEhwB0H	Sun Oct 29 04:36:03 2000
+++ /dev/null	Tue May  5 13:32:27 1998
@@ -1,183 +0,0 @@
-/* Copyright (C) 2000  Free Software Foundation
-
-   This file is part of libgcj.
-
-This software is copyrighted work licensed under the terms of the
-Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
-details.  */
-
-package gnu.awt;
-
-import java.awt.AWTEvent;
-import java.awt.AWTError;
-import java.awt.Component;
-import java.awt.Container;
-import java.awt.event.MouseEvent;
-import java.awt.event.InputEvent;
-
-/**
- * Encapsulates the logic required to dispatch events to the correct
- * component in a component tree that may contain lightweight
- * components. Toolkits typically only identify heavyweight components
- * as the source of events. This class redirects the events to the
- * appropriate lightweight children of the heavyweight component.
- */
-public class LightweightRedirector
-{
-  final static int LAST_BUTTON_NUMBER = 3;
-
-  /* We sacrifice one array element to allow the button number to 
-     match the index of this array. */
-  Component[] releaseTargets = new Component[LAST_BUTTON_NUMBER+1];
-
-  /** 
-   *
-   * Modifies or replaces the given event with an event that has been
-   * properly redirected.  State of button presses are kept so that
-   * button releases can be redirected to the same component as the
-   * button press.  It is required that all events are sent through
-   * this method in chronological order.
-   */
-  public AWTEvent redirect(AWTEvent event)
-  {
-    if (event instanceof MouseEvent)
-      return redirectMouse((MouseEvent) event);
-
-    /* In case we don't know how to redirect the event, simply return
-       the event unchanged. */
-    return event;
-  }
-
-  MouseEvent redirectMouse(MouseEvent event)
-  {
-    int button = getButtonNumber(event);
-    int id = event.getID();
-
-    Component heavySource = (Component) event.getSource();
-    Component source = heavySource;
-    int x = event.getX();
-    int y = event.getY();
-
-    if (id == MouseEvent.MOUSE_RELEASED)
-      {
-	Component target = releaseTargets[button];
-
-	if (target != null)
-	  {
-	    releaseTargets[button] = null;
-	    source = target;
-
-	    Component child = source;
-	    while (child != heavySource)
-	      {
-		x -= child.getX();
-		y -= child.getY();
-		child = child.getParent();
-		if (child == null)
-		  System.err.println("warning, orphaned release target");
-	      }
-	  }
-      }
-    else
-      {
-	/* Find real component, and adjust source, x and y
-	   accordingly. */
-	
-	while (true)
-	  {
-	    Component parent = source;
-	    
-	    Component child = parent.getComponentAt(x, y);
-	    
-	    if (parent == child)
-	      break;
-	    
-	    // maybe ignoring would be better?
-	    if (child == null)
-	      {
-		String msg = "delivered event not within component. " +
-		  "Heavyweight source was " + heavySource + ". " +
-		  "Component was " + parent;
-		throw new AWTError(msg);
-	      }
-	    if (child.isLightweight())
-	      {
-		// descend down to child
-		source = child;
-		x -= child.getX();
-		y -= child.getY();
-	      }
-	    else
-	      {
-		System.err.println("warning: event delivered to wrong " +
-				   "heavyweight component. Was " +
-				   "delivered to " + source + ". " +
-				   "Should have been delivered to " +
-				   child + ". Maybe the native window " +
-				   "system is bubbling events up the " +
-				   "containment hierarchy.");
-		break;
-	      }
-	  }
-	
-	/* ensure that the release event is delivered to the same
-	   component as the press event. For most toolkits this is
-	   only necessary for lightweight components, since the
-	   underlying windowing system takes care of its heavyweight
-	   components. */
-	if (id == MouseEvent.MOUSE_PRESSED)
-	  releaseTargets[button] = source;
-      }
-    
-    
-    if (source == heavySource)
-      return event; // no change in event
-    
-    // print warning for heavyweights
-    /* this warning can safely be removed if a toolkit that
-       needs heavyweight redirection support is ever created. */
-    if (!source.isLightweight())
-      System.err.println("warning: redirecting to heavyweight");
-    
-    MouseEvent redirected = new MouseEvent(source, event.getID(),
-					   event.getWhen(),
-					   event.getModifiers(),
-					   x, y,
-					   event.getClickCount(),
-					   event.isPopupTrigger());
-    
-    return redirected;
-  }
-  
-  /**
-   * Identifies the button number for an input event.
-   * 
-   * @returns the button number, or 0 if no button modifier was set
-   * for the event.
-   */
-  int getButtonNumber(InputEvent event)
-  {
-    int modifiers = event.getModifiers();
-    
-    modifiers &=
-      InputEvent.BUTTON1_MASK |
-      InputEvent.BUTTON2_MASK |
-      InputEvent.BUTTON3_MASK;
-    
-    switch (modifiers)
-      {
-      case InputEvent.BUTTON1_MASK:
-	return 1;
-      case InputEvent.BUTTON2_MASK:
-	return 2;
-      case InputEvent.BUTTON3_MASK:
-	return 3;
-      case 0:
-	return 0;
-
-      default:
-	System.err.println("FIXME: multibutton event");
-	return 0;
-      }
-  }
-}
Index: gnu/awt/j2d/Buffers.java
===================================================================
RCS file: Buffers.java
diff -N Buffers.java
--- /dev/null	Tue May  5 13:32:27 1998
+++ Buffers.java	Sun Oct 29 04:35:58 2000
@@ -0,0 +1,168 @@
+/* Copyright (C) 2000  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+package gnu.awt.j2d;
+
+import java.awt.image.*;
+
+/** 
+ * Utility class for creating and accessing data buffers of arbitrary
+ * data types.
+ */
+public final class Buffers
+{
+  /**
+   * Create a data buffer of a particular type.
+   *
+   * @param dataType the desired data type of the buffer.
+   * @param data an array containing data, or null
+   * @param size the size of the data buffer bank
+   */
+  public static DataBuffer createBuffer(int dataType, Object data,
+					int size)
+  {
+    if (data == null) return createBuffer(dataType, size, 1);
+
+    return createBufferFromData(dataType, data, size);
+  }
+
+
+  /**
+   * Create a data buffer of a particular type.
+   *
+   * @param dataType the desired data type of the buffer.
+   * @param size the size of the data buffer bank
+   */
+  public static DataBuffer createBuffer(int dataType, int size) {
+    return createBuffer(dataType, size, 1);
+  }
+
+  /**
+   * Create a data buffer of a particular type.
+   *
+   * @param dataType the desired data type of the buffer.
+   * @param size the size of the data buffer bank
+   * @param numBanks the number of banks the buffer should have
+   */
+  public static DataBuffer createBuffer(int dataType, int size, int numBanks)
+  {
+    switch (dataType)
+      {
+      case DataBuffer.TYPE_BYTE:
+	return new DataBufferByte(size, numBanks);
+      case DataBuffer.TYPE_USHORT:
+	return new DataBufferUShort(size, numBanks);
+      case DataBuffer.TYPE_INT:
+	return new DataBufferInt(size, numBanks);
+      default:
+	throw new UnsupportedOperationException();
+      }
+  }
+  
+  /**
+   * Create a data buffer of a particular type.
+   *
+   * @param dataType the desired data type of the buffer
+   * @param data an array containing the data
+   * @param size the size of the data buffer bank
+   */
+  public static DataBuffer createBufferFromData(int dataType, Object data,
+						int size)
+  {
+    switch (dataType)
+      {
+      case DataBuffer.TYPE_BYTE:
+	return new DataBufferByte((byte[]) data, size);
+      case DataBuffer.TYPE_USHORT:
+	return new DataBufferUShort((short[]) data, size);
+      case DataBuffer.TYPE_INT:
+	return new DataBufferInt((int[]) data, size);
+      default:
+	throw new UnsupportedOperationException();
+      }
+  }
+
+  /** 
+   * Return the data array of a data buffer, regardless of the data
+   * type.
+   *
+   * @return an array of primitive values. The actual array type
+   * depends on the data type of the buffer.
+   */
+  public static Object getData(DataBuffer buffer)
+  {
+    if (buffer instanceof DataBufferByte)
+      return ((DataBufferByte) buffer).getData();
+    if (buffer instanceof DataBufferUShort)
+      return ((DataBufferUShort) buffer).getData();
+    if (buffer instanceof DataBufferInt)
+      return ((DataBufferInt) buffer).getData();
+    throw new ClassCastException("Unknown data buffer type");
+  }
+
+    
+  /**
+   * Copy data from array contained in data buffer, much like
+   * System.arraycopy. Create a suitable destination array if the
+   * given destination array is null.
+   */
+  public static Object getData(DataBuffer src, int srcOffset,
+			       Object dest,  int destOffset,
+			       int length)
+  {
+    Object from;
+    if (src instanceof DataBufferByte)
+      {
+	from = ((DataBufferByte) src).getData();
+	if (dest == null) dest = new byte[length+destOffset];
+      }
+    else if (src instanceof DataBufferUShort)
+      {
+	from = ((DataBufferUShort) src).getData();
+	if (dest == null) dest = new short[length+destOffset];
+      }
+    else if (src instanceof DataBufferInt)
+      {
+	from = ((DataBufferInt) src).getData();
+	if (dest == null) dest = new int[length+destOffset];
+      }
+    else
+      {
+	throw new ClassCastException("Unknown data buffer type");
+      }
+    
+    System.arraycopy(from, srcOffset, dest, destOffset, length);
+    return dest;
+  }
+  
+  /**
+   * @param bits the width of a data element measured in bits
+   *
+   * @return the smallest data type that can store data elements of
+   * the given number of bits, without any truncation.
+   */
+  public static int smallestAppropriateTransferType(int bits)
+  {
+    if (bits <= 8)
+      {
+	return DataBuffer.TYPE_BYTE;
+      }
+    else if (bits <= 16)
+      {
+	return DataBuffer.TYPE_USHORT;
+      } 
+    else if (bits <= 32)
+      {
+	return DataBuffer.TYPE_INT;
+      }
+    else
+      {
+	return DataBuffer.TYPE_UNDEFINED;
+      }
+  }
+}
Index: gnu/awt/j2d/ComponentDataBlitOp.java
===================================================================
RCS file: ComponentDataBlitOp.java
diff -N ComponentDataBlitOp.java
--- /dev/null	Tue May  5 13:32:27 1998
+++ ComponentDataBlitOp.java	Sun Oct 29 04:35:58 2000
@@ -0,0 +1,123 @@
+/* Copyright (C) 2000  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+package gnu.awt.j2d;
+
+import java.awt.geom.*;
+import java.awt.image.*;
+import java.awt.RenderingHints;
+
+/**
+ * This raster copy operation assumes that both source and destination
+ * sample models are tightly pixel packed and contain the same number
+ * of bands.
+ *
+ * @throws java.lang.ClassCastException if the sample models of the
+ * rasters are not of type ComponentSampleModel.
+ * 
+ * @author Rolf W. Rasmussen <rolfwr@ii.uib.no>
+ */
+public class ComponentDataBlitOp implements RasterOp
+{
+  public static ComponentDataBlitOp INSTANCE = new ComponentDataBlitOp();
+
+  public WritableRaster filter(Raster src, WritableRaster dest)
+  {
+    if (dest == null)
+      dest = createCompatibleDestRaster(src);
+    
+    DataBuffer  srcDB =  src.getDataBuffer();
+    DataBuffer destDB = dest.getDataBuffer();
+    
+    ComponentSampleModel  srcSM = (ComponentSampleModel)  src.getSampleModel();
+    ComponentSampleModel destSM = (ComponentSampleModel) dest.getSampleModel();
+
+    
+    // Calculate offset to data in the underlying arrays:
+
+    int  srcScanlineStride =  srcSM.getScanlineStride();
+    int destScanlineStride = destSM.getScanlineStride();
+    int srcX  =  src.getMinX() -  src.getSampleModelTranslateX();
+    int srcY  =  src.getMinY() -  src.getSampleModelTranslateY();
+    int destX = dest.getMinX() - dest.getSampleModelTranslateX();
+    int destY = dest.getMinY() - dest.getSampleModelTranslateY();
+
+    int numBands = srcSM.getNumBands();
+
+    /* We can't use getOffset(x, y) from the sample model since we
+       don't want the band offset added in. */
+	
+    int srcOffset = 
+      numBands*srcX + srcScanlineStride*srcY +    // from sample model
+      srcDB.getOffset();                          // from data buffer
+
+    int destOffset =
+      numBands*destX + destScanlineStride*destY + // from sample model
+      destDB.getOffset();                         // from data buffer
+
+    // Determine how much, and how many times to blit.
+    
+    int rowSize = src.getWidth()*numBands;
+    int h = src.getHeight();
+    
+    if ((rowSize == srcScanlineStride) &&
+	(rowSize == destScanlineStride))
+      {
+	// collapse scan line blits to one large blit.
+	rowSize *= h;
+	h = 1;
+      }
+
+	
+    // Do blitting
+    
+    Object srcArray  = Buffers.getData(srcDB);
+    Object destArray = Buffers.getData(destDB);
+    
+    for (int yd = 0; yd<h; yd++)
+      {
+	System.arraycopy(srcArray, srcOffset, 
+			 destArray, destOffset,
+			 rowSize);
+	srcOffset  +=  srcScanlineStride;
+	destOffset += destScanlineStride;
+      }
+    
+
+    return dest;
+  }
+
+  public Rectangle2D getBounds2D(Raster src) 
+  {
+    return src.getBounds();
+  }
+
+  public WritableRaster createCompatibleDestRaster(Raster src) {
+    
+    /* FIXME: Maybe we should explicitly create a raster with a
+       tightly pixel packed sample model, rather than assuming
+       that the createCompatibleWritableRaster() method in Raster
+       will create one. */
+
+    return src.createCompatibleWritableRaster();
+  }
+
+  public Point2D getPoint2D(Point2D srcPoint, Point2D destPoint) 
+  {
+    if (destPoint == null)
+      return (Point2D) srcPoint.clone();
+
+    destPoint.setLocation(srcPoint);
+    return destPoint;
+  }
+
+  public RenderingHints getRenderingHints() 
+  {
+    throw new UnsupportedOperationException("not implemented");
+  }
+}
Index: gnu/awt/xlib/XEventLoop.java
===================================================================
RCS file: /cvs/java/libgcj/libjava/gnu/awt/xlib/XEventLoop.java,v
retrieving revision 1.1
diff -u -r1.1 XEventLoop.java
--- XEventLoop.java	2000/10/22 17:46:09	1.1
+++ XEventLoop.java	2000/10/29 12:35:58
@@ -10,7 +10,6 @@
 
 import java.awt.*;
 
-import gnu.awt.LightweightRedirector;
 import gnu.gcj.xlib.Display;
 import gnu.gcj.xlib.XAnyEvent;
 import gnu.gcj.xlib.XExposeEvent;
@@ -27,8 +26,6 @@
   EventQueue queue;
   XAnyEvent anyEvent;
   Thread eventLoopThread;
-
-  LightweightRedirector lightweightRedirector = new LightweightRedirector();
     
   public XEventLoop(Display display, EventQueue queue)
   {
@@ -75,8 +72,6 @@
 	loadNextEvent();
 	event = createEvent();
       }
-
-    event = lightweightRedirector.redirect(event);
 
     return event;
   }
Index: gnu/awt/xlib/XGraphicsConfiguration.java
===================================================================
RCS file: /cvs/java/libgcj/libjava/gnu/awt/xlib/XGraphicsConfiguration.java,v
retrieving revision 1.1
diff -u -r1.1 XGraphicsConfiguration.java
--- XGraphicsConfiguration.java	2000/10/22 17:46:09	1.1
+++ XGraphicsConfiguration.java	2000/10/29 12:35:58
@@ -26,7 +26,7 @@
 import gnu.gcj.xlib.XColor;
 import gnu.gcj.xlib.Screen;
 import gnu.gcj.xlib.Display;
-import gnu.gcj.awt.Buffers;
+import gnu.awt.j2d.Buffers;
 import java.util.Hashtable;
 
 public class XGraphicsConfiguration extends GraphicsConfiguration
Index: gnu/gcj/awt/BitMaskExtent.java
===================================================================
RCS file: BitMaskExtent.java
diff -N BitMaskExtent.java
--- /sourceware/cvs-tmp/cvswZRrx5	Sun Oct 29 04:36:03 2000
+++ /dev/null	Tue May  5 13:32:27 1998
@@ -1,51 +0,0 @@
-/* Copyright (C) 2000  Free Software Foundation
-
-   This file is part of libgcj.
-
-This software is copyrighted work licensed under the terms of the
-Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
-details.  */
-
-package gnu.gcj.awt;
-
-/** 
- * Simple transparent utility class that can be used to perform bit
- * mask extent calculations.
- */
-public final class BitMaskExtent
-{
-  /** The number of the least significant bit of the bit mask extent. */
-  public byte leastSignificantBit;
-
-  /** The number of bits in the bit mask extent. */
-  public byte bitWidth;
-  
-  /**
-   * Set the bit mask. This will calculate and set the leastSignificantBit
-   * and bitWidth fields.
-   *
-   * @see #leastSignificantBit
-   * @see #bitWidth
-   */
-  public void setMask(long mask)
-  {
-    leastSignificantBit = 0;
-    bitWidth = 0;
-    if (mask == 0) return;
-    long shiftMask = mask;
-    for (; (shiftMask&1) == 0; shiftMask >>>=1) leastSignificantBit++;
-    for (; (shiftMask&1) != 0; shiftMask >>>=1) bitWidth++;
-    
-    if (shiftMask != 0)
-      throw new IllegalArgumentException("mask must be continuous");
-  }
-  
-  /** 
-   * Calculate the bit mask based on the values of the
-   * leastSignificantBit and bitWidth fields.
-   */
-  public long toMask()
-  {
-    return ((1<<bitWidth)-1) << leastSignificantBit;
-  }  
-}
Index: gnu/gcj/awt/Buffers.java
===================================================================
RCS file: Buffers.java
diff -N Buffers.java
--- /sourceware/cvs-tmp/cvsSuV6xU	Sun Oct 29 04:36:03 2000
+++ /dev/null	Tue May  5 13:32:27 1998
@@ -1,168 +0,0 @@
-/* Copyright (C) 2000  Free Software Foundation
-
-   This file is part of libgcj.
-
-This software is copyrighted work licensed under the terms of the
-Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
-details.  */
-
-package gnu.gcj.awt;
-
-import java.awt.image.*;
-
-/** 
- * Utility class for creating and accessing data buffers of arbitrary
- * data types.
- */
-public final class Buffers
-{
-  /**
-   * Create a data buffer of a particular type.
-   *
-   * @param dataType the desired data type of the buffer.
-   * @param data an array containing data, or null
-   * @param size the size of the data buffer bank
-   */
-  public static DataBuffer createBuffer(int dataType, Object data,
-					int size)
-  {
-    if (data == null) return createBuffer(dataType, size, 1);
-
-    return createBufferFromData(dataType, data, size);
-  }
-
-
-  /**
-   * Create a data buffer of a particular type.
-   *
-   * @param dataType the desired data type of the buffer.
-   * @param size the size of the data buffer bank
-   */
-  public static DataBuffer createBuffer(int dataType, int size) {
-    return createBuffer(dataType, size, 1);
-  }
-
-  /**
-   * Create a data buffer of a particular type.
-   *
-   * @param dataType the desired data type of the buffer.
-   * @param size the size of the data buffer bank
-   * @param numBanks the number of banks the buffer should have
-   */
-  public static DataBuffer createBuffer(int dataType, int size, int numBanks)
-  {
-    switch (dataType)
-      {
-      case DataBuffer.TYPE_BYTE:
-	return new DataBufferByte(size, numBanks);
-      case DataBuffer.TYPE_USHORT:
-	return new DataBufferUShort(size, numBanks);
-      case DataBuffer.TYPE_INT:
-	return new DataBufferInt(size, numBanks);
-      default:
-	throw new UnsupportedOperationException();
-      }
-  }
-  
-  /**
-   * Create a data buffer of a particular type.
-   *
-   * @param dataType the desired data type of the buffer
-   * @param data an array containing the data
-   * @param size the size of the data buffer bank
-   */
-  public static DataBuffer createBufferFromData(int dataType, Object data,
-						int size)
-  {
-    switch (dataType)
-      {
-      case DataBuffer.TYPE_BYTE:
-	return new DataBufferByte((byte[]) data, size);
-      case DataBuffer.TYPE_USHORT:
-	return new DataBufferUShort((short[]) data, size);
-      case DataBuffer.TYPE_INT:
-	return new DataBufferInt((int[]) data, size);
-      default:
-	throw new UnsupportedOperationException();
-      }
-  }
-
-  /** 
-   * Return the data array of a data buffer, regardless of the data
-   * type.
-   *
-   * @return an array of primitive values. The actual array type
-   * depends on the data type of the buffer.
-   */
-  public static Object getData(DataBuffer buffer)
-  {
-    if (buffer instanceof DataBufferByte)
-      return ((DataBufferByte) buffer).getData();
-    if (buffer instanceof DataBufferUShort)
-      return ((DataBufferUShort) buffer).getData();
-    if (buffer instanceof DataBufferInt)
-      return ((DataBufferInt) buffer).getData();
-    throw new ClassCastException("Unknown data buffer type");
-  }
-
-    
-  /**
-   * Copy data from array contained in data buffer, much like
-   * System.arraycopy. Create a suitable destination array if the
-   * given destination array is null.
-   */
-  public static Object getData(DataBuffer src, int srcOffset,
-			       Object dest,  int destOffset,
-			       int length)
-  {
-    Object from;
-    if (src instanceof DataBufferByte)
-      {
-	from = ((DataBufferByte) src).getData();
-	if (dest == null) dest = new byte[length+destOffset];
-      }
-    else if (src instanceof DataBufferUShort)
-      {
-	from = ((DataBufferUShort) src).getData();
-	if (dest == null) dest = new short[length+destOffset];
-      }
-    else if (src instanceof DataBufferInt)
-      {
-	from = ((DataBufferInt) src).getData();
-	if (dest == null) dest = new int[length+destOffset];
-      }
-    else
-      {
-	throw new ClassCastException("Unknown data buffer type");
-      }
-    
-    System.arraycopy(from, srcOffset, dest, destOffset, length);
-    return dest;
-  }
-  
-  /**
-   * @param bits the width of a data element measured in bits
-   *
-   * @return the smallest data type that can store data elements of
-   * the given number of bits, without any truncation.
-   */
-  public static int smallestAppropriateTransferType(int bits)
-  {
-    if (bits <= 8)
-      {
-	return DataBuffer.TYPE_BYTE;
-      }
-    else if (bits <= 16)
-      {
-	return DataBuffer.TYPE_USHORT;
-      } 
-    else if (bits <= 32)
-      {
-	return DataBuffer.TYPE_INT;
-      }
-    else
-      {
-	return DataBuffer.TYPE_UNDEFINED;
-      }
-  }
-}
Index: gnu/gcj/awt/ComponentDataBlitOp.java
===================================================================
RCS file: ComponentDataBlitOp.java
diff -N ComponentDataBlitOp.java
--- /sourceware/cvs-tmp/cvsOQIsjK	Sun Oct 29 04:36:03 2000
+++ /dev/null	Tue May  5 13:32:27 1998
@@ -1,123 +0,0 @@
-/* Copyright (C) 2000  Free Software Foundation
-
-   This file is part of libgcj.
-
-This software is copyrighted work licensed under the terms of the
-Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
-details.  */
-
-package gnu.gcj.awt;
-
-import java.awt.geom.*;
-import java.awt.image.*;
-import java.awt.RenderingHints;
-
-/**
- * This raster copy operation assumes that both source and destination
- * sample models are tightly pixel packed and contain the same number
- * of bands.
- *
- * @throws java.lang.ClassCastException if the sample models of the
- * rasters are not of type ComponentSampleModel.
- * 
- * @author Rolf W. Rasmussen <rolfwr@ii.uib.no>
- */
-public class ComponentDataBlitOp implements RasterOp
-{
-  public static ComponentDataBlitOp INSTANCE = new ComponentDataBlitOp();
-
-  public WritableRaster filter(Raster src, WritableRaster dest)
-  {
-    if (dest == null)
-      dest = createCompatibleDestRaster(src);
-    
-    DataBuffer  srcDB =  src.getDataBuffer();
-    DataBuffer destDB = dest.getDataBuffer();
-    
-    ComponentSampleModel  srcSM = (ComponentSampleModel)  src.getSampleModel();
-    ComponentSampleModel destSM = (ComponentSampleModel) dest.getSampleModel();
-
-    
-    // Calculate offset to data in the underlying arrays:
-
-    int  srcScanlineStride =  srcSM.getScanlineStride();
-    int destScanlineStride = destSM.getScanlineStride();
-    int srcX  =  src.getMinX() -  src.getSampleModelTranslateX();
-    int srcY  =  src.getMinY() -  src.getSampleModelTranslateY();
-    int destX = dest.getMinX() - dest.getSampleModelTranslateX();
-    int destY = dest.getMinY() - dest.getSampleModelTranslateY();
-
-    int numBands = srcSM.getNumBands();
-
-    /* We can't use getOffset(x, y) from the sample model since we
-       don't want the band offset added in. */
-	
-    int srcOffset = 
-      numBands*srcX + srcScanlineStride*srcY +    // from sample model
-      srcDB.getOffset();                          // from data buffer
-
-    int destOffset =
-      numBands*destX + destScanlineStride*destY + // from sample model
-      destDB.getOffset();                         // from data buffer
-
-    // Determine how much, and how many times to blit.
-    
-    int rowSize = src.getWidth()*numBands;
-    int h = src.getHeight();
-    
-    if ((rowSize == srcScanlineStride) &&
-	(rowSize == destScanlineStride))
-      {
-	// collapse scan line blits to one large blit.
-	rowSize *= h;
-	h = 1;
-      }
-
-	
-    // Do blitting
-    
-    Object srcArray  = Buffers.getData(srcDB);
-    Object destArray = Buffers.getData(destDB);
-    
-    for (int yd = 0; yd<h; yd++)
-      {
-	System.arraycopy(srcArray, srcOffset, 
-			 destArray, destOffset,
-			 rowSize);
-	srcOffset  +=  srcScanlineStride;
-	destOffset += destScanlineStride;
-      }
-    
-
-    return dest;
-  }
-
-  public Rectangle2D getBounds2D(Raster src) 
-  {
-    return src.getBounds();
-  }
-
-  public WritableRaster createCompatibleDestRaster(Raster src) {
-    
-    /* FIXME: Maybe we should explicitly create a raster with a
-       tightly pixel packed sample model, rather than assuming
-       that the createCompatibleWritableRaster() method in Raster
-       will create one. */
-
-    return src.createCompatibleWritableRaster();
-  }
-
-  public Point2D getPoint2D(Point2D srcPoint, Point2D destPoint) 
-  {
-    if (destPoint == null)
-      return (Point2D) srcPoint.clone();
-
-    destPoint.setLocation(srcPoint);
-    return destPoint;
-  }
-
-  public RenderingHints getRenderingHints() 
-  {
-    throw new UnsupportedOperationException("not implemented");
-  }
-}
Index: gnu/gcj/awt/GLightweightPeer.java
===================================================================
RCS file: GLightweightPeer.java
diff -N GLightweightPeer.java
--- /sourceware/cvs-tmp/cvs6jC6NB	Sun Oct 29 04:36:03 2000
+++ /dev/null	Tue May  5 13:32:27 1998
@@ -1,134 +0,0 @@
-/* Copyright (C) 2000  Free Software Foundation
-
-   This file is part of libgcj.
-
-This software is copyrighted work licensed under the terms of the
-Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
-details.  */
-
-package gnu.gcj.awt;
-
-import java.awt.*;
-import java.awt.peer.*;
-import java.awt.image.*;
-
-/**
- * @author Rolf W. Rasmussen <rolfwr@ii.uib.no>
- */
-public class GLightweightPeer implements LightweightPeer
-{
-  public static final GLightweightPeer INSTANCE = new GLightweightPeer();
-
-  public GLightweightPeer() {}
-
-  // -------- java.awt.peer.ComponentPeer implementation:
-  
-  public int checkImage(Image img, int width, int height, ImageObserver o)
-  {
-    return 0;
-  }
-
-  public Image createImage(ImageProducer prod)
-  {
-    return null;
-  }
-
-  public Image createImage(int width, int height)
-  {
-    return null;
-  }
-
-  public void disable() {}
-
-  public void dispose() {}
-
-  public void enable() {}
-
-  public GraphicsConfiguration getGraphicsConfiguration()
-  {
-    return null;
-  }
-  
-  public FontMetrics getFontMetrics(Font f)
-  {
-    return null;
-  }
-
-  public Graphics getGraphics()
-  {
-    return null;
-  }
-
-  public Point getLocationOnScreen()
-  {
-    return null;
-  }
-
-  public Dimension getMinimumSize()
-  {
-    return null;
-  }
-
-  public Dimension getPreferredSize()
-  {
-    return null;
-  }
-
-  public Toolkit getToolkit()
-  {
-    return null;
-  }
-
-  public void handleEvent(AWTEvent e) {}
-
-  public void hide() {}
-
-  public boolean isFocusTraversable()
-  {
-    return false;
-  }
-
-  public Dimension minimumSize()
-  {
-    return null;
-  }
-
-  public Dimension preferredSize()
-  {
-    return null;
-  }
-
-  public void paint(Graphics graphics) {}
-
-  public boolean prepareImage(Image img, int width, int height,
-			      ImageObserver o)
-  {
-    return false;
-  }
-
-  public void print(Graphics graphics) {}
-
-  public void repaint(long tm, int x, int y, int width, int height) {}
-
-  public void requestFocus() {}
-
-  public void reshape(int x, int y, int width, int height) {}
-
-  public void setBackground(Color color) {}
-
-  public void setBounds(int x, int y, int width, int height) {}
-
-  public void setCursor(Cursor cursor) {}
-
-  public void setEnabled(boolean enabled) {}
-
-  public void setEventMask(long eventMask) {}
-
-  public void setFont(Font font) {}
-
-  public void setForeground(Color color) {}
-
-  public void setVisible(boolean visible) {}
-
-  public void show() {}
-}
Index: java/awt/Container.java
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/awt/Container.java,v
retrieving revision 1.9
diff -u -r1.9 Container.java
--- Container.java	2000/08/16 18:03:47	1.9
+++ Container.java	2000/10/29 12:35:59
@@ -24,7 +24,7 @@
   int ncomponents;
   Component[] component;
   LayoutManager layoutMgr;
-  /* LightweightDispatcher dispatcher; */ // wtf?
+  LightweightDispatcher dispatcher; // cache dispatcher from toolkit
   Dimension maxSize;
   int containerSerializedDataVersion;
 
@@ -433,6 +433,16 @@
   
   void dispatchEventImpl(AWTEvent e)
   {
+    if (dispatcher == null)
+      {
+	Toolkit tk = getToolkit();
+	if (tk != null)
+	  dispatcher = tk.dispatcher;
+      }
+
+    if (dispatcher != null && dispatcher.dispatchEvent(e))
+	return;
+
     if ((e.id <= ContainerEvent.CONTAINER_LAST
              && e.id >= ContainerEvent.CONTAINER_FIRST)
 	&& (containerListener != null
@@ -544,6 +554,9 @@
 
   public void removeNotify()
   {
+    // invalidate cache
+    dispatcher = null;
+
     for (int i = 0; i < ncomponents; ++i)
       component[i].removeNotify ();
     super.removeNotify();
Index: java/awt/LightweightDispatcher.java
===================================================================
RCS file: LightweightDispatcher.java
diff -N LightweightDispatcher.java
--- /dev/null	Tue May  5 13:32:27 1998
+++ LightweightDispatcher.java	Sun Oct 29 04:36:00 2000
@@ -0,0 +1,193 @@
+/* Copyright (C) 2000  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+package java.awt;
+
+import java.awt.event.MouseEvent;
+import java.awt.event.InputEvent;
+
+/**
+ * Encapsulates the logic required to dispatch events to the correct
+ * component in a component tree that may contain lightweight
+ * components. Toolkits typically only identify heavyweight components
+ * as the source of events. This class redirects the events to the
+ * appropriate lightweight children of the heavyweight component.
+ *
+ * <p>Only one lightweight dispatcher instance is needed for each
+ * toolkit.
+ */
+final class LightweightDispatcher
+{
+  final static int LAST_BUTTON_NUMBER = 3;
+
+  /* We sacrifice one array element to allow the button number to 
+     match the index of this array. */
+  Component[] releaseTargets = new Component[LAST_BUTTON_NUMBER+1];
+
+
+  public boolean dispatchEvent(AWTEvent event)
+  {
+    AWTEvent redirectedEvent = redirect(event);
+    if (redirectedEvent == event)
+      return false;
+    
+    Component lwSource = (Component) redirectedEvent.getSource();
+    lwSource.dispatchEvent(redirectedEvent);
+    return true;
+  }
+
+  /** 
+   * Modifies or replaces the given event with an event that has been
+   * properly redirected.  State of button presses are kept so that
+   * button releases can be redirected to the same component as the
+   * button press.  It is required that all events are sent through
+   * this method in chronological order.
+   */
+  public AWTEvent redirect(AWTEvent event)
+  {
+    if (event instanceof MouseEvent)
+      return redirectMouse((MouseEvent) event);
+
+    /* In case we don't know how to redirect the event, simply return
+       the event unchanged. */
+    return event;
+  }
+
+  MouseEvent redirectMouse(MouseEvent event)
+  {
+    int button = getButtonNumber(event);
+    int id = event.getID();
+
+    Component heavySource = (Component) event.getSource();
+    Component source = heavySource;
+    int x = event.getX();
+    int y = event.getY();
+
+    if (id == MouseEvent.MOUSE_RELEASED)
+      {
+	Component target = releaseTargets[button];
+
+	if (target != null)
+	  {
+	    releaseTargets[button] = null;
+	    source = target;
+
+	    Component child = source;
+	    while (child != heavySource)
+	      {
+		x -= child.x;
+		y -= child.y;
+		child = child.getParent();
+		if (child == null)
+		  System.err.println("warning, orphaned release target");
+	      }
+	  }
+      }
+    else
+      {
+	/* Find real component, and adjust source, x and y
+	   accordingly. */
+	
+	while (true)
+	  {
+	    Component parent = source;
+	    
+	    Component child = parent.getComponentAt(x, y);
+	    
+	    if (parent == child)
+	      break;
+	    
+	    // maybe ignoring would be better?
+	    if (child == null)
+	      {
+		String msg = "delivered event not within component. " +
+		  "Heavyweight source was " + heavySource + ". " +
+		  "Component was " + parent;
+		throw new AWTError(msg);
+	      }
+	    if (child.isLightweight())
+	      {
+		// descend down to child
+		source = child;
+		x -= child.x;
+		y -= child.y;
+	      }
+	    else
+	      {
+		System.err.println("warning: event delivered to wrong " +
+				   "heavyweight component. Was " +
+				   "delivered to " + source + ". " +
+				   "Should have been delivered to " +
+				   child + ". Maybe the native window " +
+				   "system is bubbling events up the " +
+				   "containment hierarchy.");
+		break;
+	      }
+	  }
+	
+	/* ensure that the release event is delivered to the same
+	   component as the press event. For most toolkits this is
+	   only necessary for lightweight components, since the
+	   underlying windowing system takes care of its heavyweight
+	   components. */
+	if (id == MouseEvent.MOUSE_PRESSED)
+	  releaseTargets[button] = source;
+      }
+    
+    
+    if (source == heavySource)
+      return event; // no change in event
+    
+    // print warning for heavyweights
+    /* this warning can safely be removed if a toolkit that
+       needs heavyweight redirection support is ever created. */
+    if (!source.isLightweight())
+      System.err.println("warning: redirecting to heavyweight");
+    
+    MouseEvent redirected = new MouseEvent(source, event.getID(),
+					   event.getWhen(),
+					   event.getModifiers(),
+					   x, y,
+					   event.getClickCount(),
+					   event.isPopupTrigger());
+    
+    return redirected;
+  }
+  
+  /**
+   * Identifies the button number for an input event.
+   * 
+   * @returns the button number, or 0 if no button modifier was set
+   * for the event.
+   */
+  int getButtonNumber(InputEvent event)
+  {
+    int modifiers = event.getModifiers();
+    
+    modifiers &=
+      InputEvent.BUTTON1_MASK |
+      InputEvent.BUTTON2_MASK |
+      InputEvent.BUTTON3_MASK;
+    
+    switch (modifiers)
+      {
+      case InputEvent.BUTTON1_MASK:
+	return 1;
+      case InputEvent.BUTTON2_MASK:
+	return 2;
+      case InputEvent.BUTTON3_MASK:
+	return 3;
+      case 0:
+	return 0;
+
+      default:
+	System.err.println("FIXME: multibutton event");
+	return 0;
+      }
+  }
+}
Index: java/awt/Toolkit.java
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/awt/Toolkit.java,v
retrieving revision 1.13
diff -u -r1.13 Toolkit.java
--- Toolkit.java	2000/10/02 05:14:25	1.13
+++ Toolkit.java	2000/10/29 12:36:00
@@ -14,7 +14,7 @@
 import java.awt.image.*;
 import java.awt.datatransfer.Clipboard;
 import java.util.Hashtable;
-import gnu.gcj.awt.GLightweightPeer;
+import gnu.awt.GLightweightPeer;
 
 /* A very incomplete placeholder. */
 
@@ -23,6 +23,8 @@
   static Toolkit defaultToolkit;
   PropertyChangeSupport changeSupport = new PropertyChangeSupport(this);
   Hashtable desktopProperties = new Hashtable();
+
+  LightweightDispatcher dispatcher = new LightweightDispatcher();
 
   public static Toolkit getDefaultToolkit()
   {
Index: java/awt/image/BufferedImage.java
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/awt/image/BufferedImage.java,v
retrieving revision 1.3
diff -u -r1.3 BufferedImage.java
--- BufferedImage.java	2000/10/02 05:14:25	1.3
+++ BufferedImage.java	2000/10/29 12:36:00
@@ -12,7 +12,7 @@
 import java.awt.color.*;
 import java.util.*;
 
-import gnu.gcj.awt.ComponentDataBlitOp;
+import gnu.awt.j2d.ComponentDataBlitOp;
 
 /**
  * A buffered image always starts at coordinates (0, 0).
Index: java/awt/image/ColorModel.java
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/awt/image/ColorModel.java,v
retrieving revision 1.3
diff -u -r1.3 ColorModel.java
--- ColorModel.java	2000/08/29 03:23:57	1.3
+++ ColorModel.java	2000/10/29 12:36:01
@@ -11,7 +11,7 @@
 import java.awt.Point;
 import java.awt.Transparency;
 import java.awt.color.ColorSpace;
-import gnu.gcj.awt.Buffers;
+import gnu.awt.j2d.Buffers;
 
 /**
  * A color model operates with colors in several formats:
Index: java/awt/image/ComponentColorModel.java
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/awt/image/ComponentColorModel.java,v
retrieving revision 1.2
diff -u -r1.2 ComponentColorModel.java
--- ComponentColorModel.java	2000/08/29 03:23:57	1.2
+++ ComponentColorModel.java	2000/10/29 12:36:01
@@ -10,7 +10,7 @@
 
 import java.awt.color.*;
 import java.awt.Point;
-import gnu.gcj.awt.Buffers;
+import gnu.awt.j2d.Buffers;
 
 public class ComponentColorModel extends ColorModel
 {
Index: java/awt/image/ComponentSampleModel.java
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/awt/image/ComponentSampleModel.java,v
retrieving revision 1.2
diff -u -r1.2 ComponentSampleModel.java
--- ComponentSampleModel.java	2000/08/29 03:23:57	1.2
+++ ComponentSampleModel.java	2000/10/29 12:36:01
@@ -8,7 +8,7 @@
 
 package java.awt.image;
 
-import gnu.gcj.awt.Buffers;
+import gnu.awt.j2d.Buffers;
 
 /* FIXME: This class does not yet support data type TYPE_SHORT */
 
Index: java/awt/image/DirectColorModel.java
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/awt/image/DirectColorModel.java,v
retrieving revision 1.2
diff -u -r1.2 DirectColorModel.java
--- DirectColorModel.java	2000/08/29 03:23:57	1.2
+++ DirectColorModel.java	2000/10/29 12:36:01
@@ -11,7 +11,7 @@
 import java.awt.Point;
 import java.awt.Transparency;
 import java.awt.color.ColorSpace;
-import gnu.gcj.awt.Buffers;
+import gnu.awt.j2d.Buffers;
 
 /**
  * @author Rolf W. Rasmussen <rolfwr@ii.uib.no>
Index: java/awt/image/IndexColorModel.java
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/awt/image/IndexColorModel.java,v
retrieving revision 1.2
diff -u -r1.2 IndexColorModel.java
--- IndexColorModel.java	2000/08/29 03:23:57	1.2
+++ IndexColorModel.java	2000/10/29 12:36:02
@@ -10,7 +10,7 @@
 
 import java.awt.Transparency;
 import java.awt.color.ColorSpace;
-import gnu.gcj.awt.Buffers;
+import gnu.awt.j2d.Buffers;
 
 /**
  * @author Rolf W. Rasmussen <rolfwr@ii.uib.no>
Index: java/awt/image/PackedColorModel.java
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/awt/image/PackedColorModel.java,v
retrieving revision 1.2
diff -u -r1.2 PackedColorModel.java
--- PackedColorModel.java	2000/08/29 03:23:57	1.2
+++ PackedColorModel.java	2000/10/29 12:36:02
@@ -10,7 +10,7 @@
 
 import java.awt.Point;
 import java.awt.color.ColorSpace;
-import gnu.gcj.awt.BitMaskExtent;
+import gnu.awt.BitMaskExtent;
 
 /**
  * @author Rolf W. Rasmussen <rolfwr@ii.uib.no>
Index: java/awt/image/SinglePixelPackedSampleModel.java
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/awt/image/SinglePixelPackedSampleModel.java,v
retrieving revision 1.2
diff -u -r1.2 SinglePixelPackedSampleModel.java
--- SinglePixelPackedSampleModel.java	2000/08/29 03:23:57	1.2
+++ SinglePixelPackedSampleModel.java	2000/10/29 12:36:02
@@ -8,8 +8,8 @@
 
 package java.awt.image;
 
-import gnu.gcj.awt.BitMaskExtent;
-import gnu.gcj.awt.Buffers;
+import gnu.awt.BitMaskExtent;
+import gnu.awt.j2d.Buffers;
 
 /**
  * @author Rolf W. Rasmussen <rolfwr@ii.uib.no>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]