summaryrefslogtreecommitdiff
path: root/gnu/java/awt/peer/gtk
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2004-10-02 07:53:47 +0000
committerMichael Koch <konqueror@gmx.de>2004-10-02 07:53:47 +0000
commit2b0beb2d93897139196bc49cb2173baedbb62508 (patch)
treea5d65f9b0855f6dbc46b366e4ece791e3a4b533d /gnu/java/awt/peer/gtk
parentae55c413b4388717c24e9b3be4b7563d160b35cb (diff)
downloadclasspath-2b0beb2d93897139196bc49cb2173baedbb62508.tar.gz
2004-10-02 Michael Koch <konqueror@gmx.de>
* gnu/java/awt/peer/gtk/GdkClasspathFontPeer.java, gnu/java/awt/peer/gtk/GdkClasspathFontPeerMetrics.java, gnu/java/awt/peer/gtk/GdkGlyphVector.java, gnu/java/awt/peer/gtk/GdkGraphics2D.java, gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java, gnu/java/awt/peer/gtk/GdkPixbufDecoder.java, gnu/java/awt/peer/gtk/GtkButtonPeer.java, gnu/java/awt/peer/gtk/GtkClipboard.java, gnu/java/awt/peer/gtk/GtkDialogPeer.java, gnu/java/awt/peer/gtk/GtkFileDialogPeer.java, gnu/java/awt/peer/gtk/GtkFontPeer.java, gnu/java/awt/peer/gtk/GtkListPeer.java, gnu/java/awt/peer/gtk/GtkMenuItemPeer.java, gnu/java/awt/peer/gtk/GtkToolkit.java, gnu/java/awt/peer/gtk/GtkWindowPeer.java: Import statements reworked. Some little reformattings.
Diffstat (limited to 'gnu/java/awt/peer/gtk')
-rw-r--r--gnu/java/awt/peer/gtk/GdkClasspathFontPeer.java95
-rw-r--r--gnu/java/awt/peer/gtk/GdkClasspathFontPeerMetrics.java79
-rw-r--r--gnu/java/awt/peer/gtk/GdkGlyphVector.java94
-rw-r--r--gnu/java/awt/peer/gtk/GdkGraphics2D.java76
-rw-r--r--gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java13
-rw-r--r--gnu/java/awt/peer/gtk/GdkPixbufDecoder.java83
-rw-r--r--gnu/java/awt/peer/gtk/GtkButtonPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkClipboard.java2
-rw-r--r--gnu/java/awt/peer/gtk/GtkDialogPeer.java2
-rw-r--r--gnu/java/awt/peer/gtk/GtkFileDialogPeer.java2
-rw-r--r--gnu/java/awt/peer/gtk/GtkFontPeer.java21
-rw-r--r--gnu/java/awt/peer/gtk/GtkListPeer.java2
-rw-r--r--gnu/java/awt/peer/gtk/GtkMenuItemPeer.java6
-rw-r--r--gnu/java/awt/peer/gtk/GtkToolkit.java22
-rw-r--r--gnu/java/awt/peer/gtk/GtkWindowPeer.java2
15 files changed, 277 insertions, 226 deletions
diff --git a/gnu/java/awt/peer/gtk/GdkClasspathFontPeer.java b/gnu/java/awt/peer/gtk/GdkClasspathFontPeer.java
index 1cf24a98d..5eeefc557 100644
--- a/gnu/java/awt/peer/gtk/GdkClasspathFontPeer.java
+++ b/gnu/java/awt/peer/gtk/GdkClasspathFontPeer.java
@@ -1,58 +1,62 @@
/* GdkClasspathFontPeer.java -- backend implementation for Font object
- Copyright (C) 2003 Free Software Foundation, Inc.
-
- This file is part of GNU Classpath.
-
- GNU Classpath is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GNU Classpath is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GNU Classpath; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA.
-
- Linking this library statically or dynamically with other modules is
- making a combined work based on this library. Thus, the terms and
- conditions of the GNU General Public License cover the whole
- combination.
-
- As a special exception, the copyright holders of this library give you
- permission to link this library with independent modules to produce an
- executable, regardless of the license terms of these independent
- modules, and to copy and distribute the resulting executable under
- terms of your choice, provided that you also meet, for each linked
- independent module, the terms and conditions of the license of that
- module. An independent module is a module which is not derived from
- or based on this library. If you modify this library, you may extend
- this exception to your version of the library, but you are not
- obligated to do so. If you do not wish to do so, delete this
- exception statement from your version. */
+ Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.java.awt.peer.gtk;
-import java.awt.*;
-import java.awt.font.*;
-import java.awt.geom.*;
-import java.io.InputStream;
+import gnu.classpath.Configuration;
+import gnu.java.awt.peer.ClasspathFontPeer;
+
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.font.GlyphVector;
+import java.awt.font.FontRenderContext;
+import java.awt.font.LineMetrics;
+import java.awt.font.TextAttribute;
+import java.awt.geom.Rectangle2D;
import java.io.IOException;
+import java.io.InputStream;
import java.io.Serializable;
+import java.text.AttributedCharacterIterator;
+import java.text.CharacterIterator;
+import java.text.StringCharacterIterator;
import java.util.Locale;
import java.util.Map;
import java.util.StringTokenizer;
-import java.text.CharacterIterator;
-import java.text.AttributedCharacterIterator;
-import java.text.StringCharacterIterator;
-import java.awt.font.TextAttribute;
-import gnu.classpath.Configuration;
-import gnu.java.awt.peer.ClasspathFontPeer;
/**
* This class represents a windowing system font using the Pango
@@ -60,7 +64,6 @@ import gnu.java.awt.peer.ClasspathFontPeer;
*
* @author Graydon Hoare (graydon@redhat.com)
*/
-
public class GdkClasspathFontPeer extends ClasspathFontPeer
{
diff --git a/gnu/java/awt/peer/gtk/GdkClasspathFontPeerMetrics.java b/gnu/java/awt/peer/gtk/GdkClasspathFontPeerMetrics.java
index 2f019e4db..7f9cfcd91 100644
--- a/gnu/java/awt/peer/gtk/GdkClasspathFontPeerMetrics.java
+++ b/gnu/java/awt/peer/gtk/GdkClasspathFontPeerMetrics.java
@@ -1,46 +1,49 @@
/* GdkClasspathFontPeerMetrics.java
- Copyright (C) 1999, 2002 Free Software Foundation, Inc.
-
- This file is part of GNU Classpath.
-
- GNU Classpath is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GNU Classpath is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GNU Classpath; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA.
-
- Linking this library statically or dynamically with other modules is
- making a combined work based on this library. Thus, the terms and
- conditions of the GNU General Public License cover the whole
- combination.
-
- As a special exception, the copyright holders of this library give you
- permission to link this library with independent modules to produce an
- executable, regardless of the license terms of these independent
- modules, and to copy and distribute the resulting executable under
- terms of your choice, provided that you also meet, for each linked
- independent module, the terms and conditions of the license of that
- module. An independent module is a module which is not derived from
- or based on this library. If you modify this library, you may extend
- this exception to your version of the library, but you are not
- obligated to do so. If you do not wish to do so, delete this
- exception statement from your version. */
+ Copyright (C) 1999, 2002, 2004 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.java.awt.peer.gtk;
-import java.awt.*;
-import java.awt.font.*;
-import java.awt.geom.*;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.font.FontRenderContext;
+import java.awt.font.GlyphVector;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Rectangle2D;
public class GdkClasspathFontPeerMetrics extends FontMetrics
{
diff --git a/gnu/java/awt/peer/gtk/GdkGlyphVector.java b/gnu/java/awt/peer/gtk/GdkGlyphVector.java
index ff6b4cd29..c811c4787 100644
--- a/gnu/java/awt/peer/gtk/GdkGlyphVector.java
+++ b/gnu/java/awt/peer/gtk/GdkGlyphVector.java
@@ -1,57 +1,65 @@
/* GdkGlyphVector.java -- Glyph vector object
- Copyright (C) 2003 Free Software Foundation, Inc.
-
- This file is part of GNU Classpath.
-
- GNU Classpath is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GNU Classpath is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GNU Classpath; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA.
-
- Linking this library statically or dynamically with other modules is
- making a combined work based on this library. Thus, the terms and
- conditions of the GNU General Public License cover the whole
- combination.
-
- As a special exception, the copyright holders of this library give you
- permission to link this library with independent modules to produce an
- executable, regardless of the license terms of these independent
- modules, and to copy and distribute the resulting executable under
- terms of your choice, provided that you also meet, for each linked
- independent module, the terms and conditions of the license of that
- module. An independent module is a module which is not derived from
- or based on this library. If you modify this library, you may extend
- this exception to your version of the library, but you are not
- obligated to do so. If you do not wish to do so, delete this
- exception statement from your version. */
+ Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.java.awt.peer.gtk;
-import java.awt.*;
-import java.awt.font.*;
-import java.awt.geom.*;
-import java.io.InputStream;
+import gnu.classpath.Configuration;
+
+import java.awt.Font;
+import java.awt.Rectangle;
+import java.awt.Shape;
+import java.awt.font.FontRenderContext;
+import java.awt.font.GlyphMetrics;
+import java.awt.font.GlyphVector;
+import java.awt.font.GlyphJustificationInfo;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
import java.io.IOException;
+import java.io.InputStream;
import java.io.Serializable;
+import java.text.AttributedCharacterIterator;
+import java.text.CharacterIterator;
import java.util.Locale;
import java.util.Map;
import java.util.StringTokenizer;
-import java.text.CharacterIterator;
-import java.text.AttributedCharacterIterator;
-import gnu.classpath.Configuration;
-public class GdkGlyphVector extends GlyphVector
+public class GdkGlyphVector extends GlyphVector
{
static
diff --git a/gnu/java/awt/peer/gtk/GdkGraphics2D.java b/gnu/java/awt/peer/gtk/GdkGraphics2D.java
index 768b35e8d..43fbc4b7a 100644
--- a/gnu/java/awt/peer/gtk/GdkGraphics2D.java
+++ b/gnu/java/awt/peer/gtk/GdkGraphics2D.java
@@ -1,5 +1,5 @@
/* GdkGraphics2D.java
- Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -38,21 +38,60 @@ exception statement from your version. */
package gnu.java.awt.peer.gtk;
-import java.awt.*;
-import java.awt.geom.*;
-import java.awt.font.*;
-import java.awt.color.*;
-import java.awt.image.*;
-import java.awt.image.renderable.*;
-import java.util.HashMap;
-import java.util.Map;
+import gnu.classpath.Configuration;
+import gnu.java.awt.ClasspathToolkit;
+import gnu.java.awt.peer.ClasspathFontPeer;
+import java.awt.AlphaComposite;
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Composite;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.GradientPaint;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.GraphicsConfiguration;
+import java.awt.Image;
+import java.awt.Paint;
+import java.awt.Rectangle;
+import java.awt.RenderingHints;
+import java.awt.Shape;
+import java.awt.Stroke;
+import java.awt.TexturePaint;
+import java.awt.Toolkit;
+import java.awt.color.ColorSpace;
+import java.awt.font.FontRenderContext;
+import java.awt.font.GlyphVector;
+import java.awt.font.GlyphJustificationInfo;
+import java.awt.geom.Arc2D;
+import java.awt.geom.GeneralPath;
+import java.awt.geom.NoninvertibleTransformException;
+import java.awt.geom.PathIterator;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+import java.awt.geom.AffineTransform;
+import java.awt.image.AffineTransformOp;
+import java.awt.image.BufferedImage;
+import java.awt.image.BufferedImageOp;
+import java.awt.image.ColorModel;
+import java.awt.image.CropImageFilter;
+import java.awt.image.DataBuffer;
+import java.awt.image.DataBufferInt;
+import java.awt.image.FilteredImageSource;
+import java.awt.image.ImageConsumer;
+import java.awt.image.ImageObserver;
+import java.awt.image.ImagingOpException;
+import java.awt.image.SampleModel;
+import java.awt.image.Raster;
+import java.awt.image.RenderedImage;
+import java.awt.image.WritableRaster;
+import java.awt.image.renderable.RenderableImage;
+import java.awt.image.renderable.RenderContext;
import java.text.AttributedCharacterIterator;
+import java.util.HashMap;
+import java.util.Map;
import java.util.Stack;
-import java.lang.Integer;
-import gnu.java.awt.ClasspathToolkit;
-import gnu.java.awt.peer.ClasspathFontPeer;
-import gnu.classpath.Configuration;
public class GdkGraphics2D extends Graphics2D
{
@@ -390,7 +429,6 @@ public class GdkGraphics2D extends Graphics2D
RenderingHints.VALUE_RENDER_DEFAULT);
return defaultHints;
-
}
private void updateBufferedImage()
@@ -399,19 +437,13 @@ public class GdkGraphics2D extends Graphics2D
updateImagePixels(pixels);
}
-
private boolean isBufferedImageGraphics ()
{
-
- if (bimage != null)
- return true;
- else
- return false;
+ return bimage != null;
}
private void updateImagePixels (int[] pixels)
{
-
// This function can only be used if
// this graphics object is used to draw into
// buffered image
@@ -443,7 +475,6 @@ public class GdkGraphics2D extends Graphics2D
}
}
-
private boolean drawImage(Image img,
AffineTransform xform,
Color bgcolor,
@@ -467,7 +498,6 @@ public class GdkGraphics2D extends Graphics2D
}
else
{
-
// In this case, xform is an AffineTransform that transforms bounding
// box of the specified image from image space to user space. However
// when we pass this transform to cairo, cairo will use this transform
diff --git a/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java b/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java
index dbcd2d1c4..1fd3d0f11 100644
--- a/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java
+++ b/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java
@@ -38,15 +38,17 @@ exception statement from your version. */
package gnu.java.awt.peer.gtk;
-import java.awt.*;
+import java.awt.Font;
+import java.awt.Graphics2D;
+import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
+import java.awt.Rectangle;
+import java.awt.Shape;
import java.awt.image.BufferedImage;
import java.util.Locale;
-
public class GdkGraphicsEnvironment extends GraphicsEnvironment
{
-
public GdkGraphicsEnvironment ()
{
super();
@@ -81,7 +83,4 @@ public class GdkGraphicsEnvironment extends GraphicsEnvironment
{
throw new java.lang.UnsupportedOperationException ();
}
-
-
-} // class GdkGraphicsEnvironment
-
+}
diff --git a/gnu/java/awt/peer/gtk/GdkPixbufDecoder.java b/gnu/java/awt/peer/gtk/GdkPixbufDecoder.java
index 5c7fd9600..a7b93e5b9 100644
--- a/gnu/java/awt/peer/gtk/GdkPixbufDecoder.java
+++ b/gnu/java/awt/peer/gtk/GdkPixbufDecoder.java
@@ -1,52 +1,57 @@
/* GdkPixbufDecoder.java -- Image data decoding object
- Copyright (C) 2003 Free Software Foundation, Inc.
-
- This file is part of GNU Classpath.
-
- GNU Classpath is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GNU Classpath is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GNU Classpath; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA.
-
- Linking this library statically or dynamically with other modules is
- making a combined work based on this library. Thus, the terms and
- conditions of the GNU General Public License cover the whole
- combination.
-
- As a special exception, the copyright holders of this library give you
- permission to link this library with independent modules to produce an
- executable, regardless of the license terms of these independent
- modules, and to copy and distribute the resulting executable under
- terms of your choice, provided that you also meet, for each linked
- independent module, the terms and conditions of the license of that
- module. An independent module is a module which is not derived from
- or based on this library. If you modify this library, you may extend
- this exception to your version of the library, but you are not
- obligated to do so. If you do not wish to do so, delete this
- exception statement from your version. */
+ Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package gnu.java.awt.peer.gtk;
-import java.awt.image.*;
+import gnu.classpath.Configuration;
+
+import java.awt.image.BufferedImage;
+import java.awt.image.ColorModel;
+import java.awt.image.DirectColorModel;
+import java.awt.image.ImageConsumer;
+import java.awt.image.ImageProducer;
import java.io.FileDescriptor;
import java.io.FileInputStream;
-import java.io.InputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.net.URL;
-import java.util.Vector;
import java.util.Hashtable;
-import gnu.classpath.Configuration;
+import java.util.Vector;
public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
{
diff --git a/gnu/java/awt/peer/gtk/GtkButtonPeer.java b/gnu/java/awt/peer/gtk/GtkButtonPeer.java
index 5281b9a8c..cb3903336 100644
--- a/gnu/java/awt/peer/gtk/GtkButtonPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkButtonPeer.java
@@ -1,5 +1,5 @@
/* GtkButtonPeer.java -- Implements ButtonPeer with GTK
- Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -43,8 +43,8 @@ import java.awt.Button;
import java.awt.Component;
import java.awt.Font;
import java.awt.Point;
-import java.awt.event.MouseEvent;
import java.awt.event.KeyEvent;
+import java.awt.event.MouseEvent;
import java.awt.peer.ButtonPeer;
public class GtkButtonPeer extends GtkComponentPeer
diff --git a/gnu/java/awt/peer/gtk/GtkClipboard.java b/gnu/java/awt/peer/gtk/GtkClipboard.java
index f9348aca3..ecc4c5cf7 100644
--- a/gnu/java/awt/peer/gtk/GtkClipboard.java
+++ b/gnu/java/awt/peer/gtk/GtkClipboard.java
@@ -43,9 +43,9 @@ import java.awt.datatransfer.ClipboardOwner;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.StringSelection;
import java.awt.datatransfer.Transferable;
+import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
-import java.io.IOException;
public class GtkClipboard extends Clipboard
{
diff --git a/gnu/java/awt/peer/gtk/GtkDialogPeer.java b/gnu/java/awt/peer/gtk/GtkDialogPeer.java
index 53b57d474..af22a2723 100644
--- a/gnu/java/awt/peer/gtk/GtkDialogPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkDialogPeer.java
@@ -42,9 +42,9 @@ import java.awt.AWTEvent;
import java.awt.Component;
import java.awt.Dialog;
import java.awt.Graphics;
-import java.awt.peer.DialogPeer;
import java.awt.Rectangle;
import java.awt.event.PaintEvent;
+import java.awt.peer.DialogPeer;
public class GtkDialogPeer extends GtkWindowPeer
implements DialogPeer
diff --git a/gnu/java/awt/peer/gtk/GtkFileDialogPeer.java b/gnu/java/awt/peer/gtk/GtkFileDialogPeer.java
index 7adf72cf2..445cb532d 100644
--- a/gnu/java/awt/peer/gtk/GtkFileDialogPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkFileDialogPeer.java
@@ -45,8 +45,8 @@ import java.awt.Graphics;
import java.awt.Window;
import java.awt.event.WindowEvent;
import java.awt.peer.FileDialogPeer;
-import java.io.FilenameFilter;
import java.io.File;
+import java.io.FilenameFilter;
public class GtkFileDialogPeer extends GtkDialogPeer implements FileDialogPeer
{
diff --git a/gnu/java/awt/peer/gtk/GtkFontPeer.java b/gnu/java/awt/peer/gtk/GtkFontPeer.java
index 5de330127..605d738a1 100644
--- a/gnu/java/awt/peer/gtk/GtkFontPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkFontPeer.java
@@ -1,5 +1,5 @@
/* GtkFontPeer.java -- Implements FontPeer with GTK+
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -37,20 +37,25 @@ exception statement from your version. */
package gnu.java.awt.peer.gtk;
+
+import gnu.java.awt.peer.ClasspathFontPeer;
+
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.font.FontRenderContext;
+import java.awt.font.GlyphVector;
+import java.awt.font.LineMetrics;
+import java.awt.geom.Rectangle2D;
import java.awt.peer.FontPeer;
-import java.awt.*;
-import java.awt.geom.*;
-import java.awt.font.*;
+import java.text.CharacterIterator;
import java.util.Locale;
-import java.util.ResourceBundle;
import java.util.MissingResourceException;
-import java.text.*;
-import gnu.java.awt.peer.ClasspathFontPeer;
+import java.util.ResourceBundle;
public class GtkFontPeer extends ClasspathFontPeer
{
private static ResourceBundle bundle;
-
+
static
{
try
diff --git a/gnu/java/awt/peer/gtk/GtkListPeer.java b/gnu/java/awt/peer/gtk/GtkListPeer.java
index 6447d3e37..3daad27eb 100644
--- a/gnu/java/awt/peer/gtk/GtkListPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkListPeer.java
@@ -41,8 +41,8 @@ package gnu.java.awt.peer.gtk;
import java.awt.AWTEvent;
import java.awt.Dimension;
import java.awt.List;
-import java.awt.event.MouseEvent;
import java.awt.event.KeyEvent;
+import java.awt.event.MouseEvent;
import java.awt.peer.ListPeer;
public class GtkListPeer extends GtkComponentPeer
diff --git a/gnu/java/awt/peer/gtk/GtkMenuItemPeer.java b/gnu/java/awt/peer/gtk/GtkMenuItemPeer.java
index d58916614..81da90df0 100644
--- a/gnu/java/awt/peer/gtk/GtkMenuItemPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkMenuItemPeer.java
@@ -40,12 +40,12 @@ package gnu.java.awt.peer.gtk;
import java.awt.Font;
import java.awt.Menu;
+import java.awt.MenuComponent;
import java.awt.MenuBar;
import java.awt.MenuItem;
-import java.awt.MenuComponent;
-import java.awt.peer.MenuItemPeer;
-import java.awt.peer.MenuComponentPeer;
import java.awt.peer.MenuBarPeer;
+import java.awt.peer.MenuComponentPeer;
+import java.awt.peer.MenuItemPeer;
import java.awt.peer.MenuPeer;
public class GtkMenuItemPeer extends GtkMenuComponentPeer
diff --git a/gnu/java/awt/peer/gtk/GtkToolkit.java b/gnu/java/awt/peer/gtk/GtkToolkit.java
index 3f82159c3..277200b51 100644
--- a/gnu/java/awt/peer/gtk/GtkToolkit.java
+++ b/gnu/java/awt/peer/gtk/GtkToolkit.java
@@ -1,5 +1,5 @@
/* GtkToolkit.java -- Implements an AWT Toolkit using GTK for peers
- Copyright (C) 1998, 1999, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -38,6 +38,13 @@ exception statement from your version. */
package gnu.java.awt.peer.gtk;
+import gnu.classpath.Configuration;
+import gnu.java.awt.EmbeddedWindow;
+import gnu.java.awt.EmbeddedWindowSupport;
+import gnu.java.awt.peer.ClasspathFontPeer;
+import gnu.java.awt.peer.EmbeddedWindowPeer;
+import gnu.java.awt.peer.gtk.GdkPixbufDecoder;
+
import java.awt.*;
import java.awt.datatransfer.Clipboard;
import java.awt.dnd.DragGestureEvent;
@@ -46,10 +53,9 @@ import java.awt.font.TextAttribute;
import java.awt.im.InputMethodHighlight;
import java.awt.image.BufferedImage;
import java.awt.image.ColorModel;
-import java.awt.image.ImageObserver;
import java.awt.image.ImageConsumer;
+import java.awt.image.ImageObserver;
import java.awt.image.ImageProducer;
-import java.awt.GraphicsEnvironment;
import java.awt.peer.*;
import java.net.URL;
import java.util.HashSet;
@@ -58,16 +64,10 @@ import java.util.Iterator;
import java.util.Map;
import java.util.MissingResourceException;
import java.util.Properties;
-import gnu.java.awt.EmbeddedWindow;
-import gnu.java.awt.EmbeddedWindowSupport;
-import gnu.java.awt.peer.EmbeddedWindowPeer;
-import gnu.java.awt.peer.ClasspathFontPeer;
-import gnu.classpath.Configuration;
-import gnu.java.awt.peer.gtk.GdkPixbufDecoder;
/* This class uses a deprecated method java.awt.peer.ComponentPeer.getPeer().
This merits comment. We are basically calling Sun's bluff on this one.
- We think Sun has deprecated it simply to discourage its use as it is
+ We think Sun has deprecated it simply to discourage its use as it is
bad programming style. However, we need to get at a component's peer in
this class. If getPeer() ever goes away, we can implement a hash table
that will keep up with every window's peer, but for now this is faster. */
@@ -79,7 +79,6 @@ import gnu.java.awt.peer.gtk.GdkPixbufDecoder;
* drawing contexts. Any other value will cause the older GdkGraphics
* object to be used.
*/
-
public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
implements EmbeddedWindowSupport
{
@@ -87,7 +86,6 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
Hashtable containers = new Hashtable();
static EventQueue q = new EventQueue();
static Clipboard systemClipboard;
-
static boolean useGraphics2dSet;
static boolean useGraphics2d;
diff --git a/gnu/java/awt/peer/gtk/GtkWindowPeer.java b/gnu/java/awt/peer/gtk/GtkWindowPeer.java
index a2357699b..1bdac28f6 100644
--- a/gnu/java/awt/peer/gtk/GtkWindowPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkWindowPeer.java
@@ -40,8 +40,8 @@ package gnu.java.awt.peer.gtk;
import java.awt.Component;
import java.awt.Dimension;
-import java.awt.Window;
import java.awt.Frame;
+import java.awt.Window;
import java.awt.event.WindowEvent;
import java.awt.peer.WindowPeer;