[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: crypto, awt and swing fixes
Kaffe CVS
cvs-commits at kaffe.org
Mon Aug 15 15:40:19 PDT 2005
PatchSet 6834
Date: 2005/08/15 22:35:32
Author: robilad
Branch: HEAD
Tag: (none)
Log:
Resynced with GNU Classpath: crypto, awt and swing fixes
Members:
ChangeLog:1.4358->1.4359
libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c:1.12->1.13
libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c:1.16->1.17
libraries/clib/awt/classpath-gtk/gtk-peer/gtkpeer.h:1.15->1.16
libraries/javalib/gnu/java/awt/ClasspathToolkit.java:1.11->1.12
libraries/javalib/gnu/java/awt/peer/gtk/GtkButtonPeer.java:1.9->1.10
libraries/javalib/gnu/java/awt/peer/gtk/GtkToolkit.java:1.19->1.20
libraries/javalib/gnu/java/security/provider/DSAKeyPairGenerator.java:1.3->1.4
libraries/javalib/java/awt/FlowLayout.java:1.12->1.13
libraries/javalib/javax/imageio/spi/IIORegistry.java:1.5->1.6
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4358 kaffe/ChangeLog:1.4359
--- kaffe/ChangeLog:1.4358 Mon Aug 15 20:58:10 2005
+++ kaffe/ChangeLog Mon Aug 15 22:35:32 2005
@@ -1,5 +1,46 @@
2005-08-15 Dalibor Topic <robilad at kaffe.org>
+ Resynced with GNU Classpath.
+
+ 2005-08-15 Roman Kennke <roman at kennke.org>
+
+ * java/awt/FlowLayout.java
+ (setAlignment): Removed check for illegal values. These values
+ are treated as LEFT alignment instead.
+ (layoutContainer): Treat unknown align values as LEFT in default
+ clause of if-else statement.
+
+ 2005-08-15 Thomas Fitzsimmons <fitzsim at redhat.com>
+
+ * gnu/java/awt/peer/gtk/GtkButtonPeer.java (handleEvent): Remove
+ method.
+ (postActionEvent): New method.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c:
+ Rename state_to_awt_mods cp_gtk_state_to_awt_mods.
+ * native/jni/gtk-peer/gtkpeer.h: Declare cp_gtk_state_to_awt_mods.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c
+ (clicked_cb): New function.
+ (connectSignals): Connect clicked_cb callback to "clicked" signal.
+
+ 2005-08-14 Casey Marshall <csm at gnu.org>
+
+ * gnu/java/security/provider/DSAKeyPairGenerator.java
+ (initialize): set 'keysize' to 'modlen.'
+ (getDefaults): return 'true' for keysizes '768' and '1024.'
+
+ 2005-08-14 Sven de Marothy <sven at physto.se>
+
+ * gnu/java/awt/ClasspathToolkit.java
+ (getScreenSize, getColorModel, getFontMetrics, getImage, createImage,
+ createImageProducer, registerImageIOSpis):
+ Remove redundant (overloaded) methods.
+ * gnu/java/awt/peer/gtk/GtkToolkit.java
+ (registerImageIOSpis): Move registration to static initializer.
+ * javax/imageio/spi/IIORegistry.java:
+ Remove call to Toolkit registration method.
+
+2005-08-15 Dalibor Topic <robilad at kaffe.org>
+
* configure.ac: Fixed jikes test on AIX.
Reported by: Riccardo Mottola <multix at gmail.com>
Index: kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c
diff -u kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c:1.12 kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c:1.13
--- kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c:1.12 Sat Aug 13 21:45:41 2005
+++ kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c Mon Aug 15 22:35:38 2005
@@ -41,7 +41,8 @@
static jmethodID beginNativeRepaintID;
static jmethodID endNativeRepaintID;
-
+static jmethodID postActionEventID;
+
void
cp_gtk_button_init_jni (void)
{
@@ -56,11 +57,18 @@
endNativeRepaintID = (*cp_gtk_gdk_env())->GetMethodID (cp_gtk_gdk_env(), gtkbuttonpeer,
"endNativeRepaint", "()V");
+
+ postActionEventID = (*cp_gtk_gdk_env())->GetMethodID (cp_gtk_gdk_env(),
+ gtkbuttonpeer,
+ "postActionEvent", "(I)V");
}
static void block_expose_event_cb (GtkWidget *widget,
jobject peer);
+static void clicked_cb (GtkButton *button,
+ jobject peer);
+
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GtkButtonPeer_create
(JNIEnv *env, jobject obj, jstring label)
@@ -158,6 +166,9 @@
g_signal_connect_after (G_OBJECT (button), "released",
G_CALLBACK (block_expose_event_cb), *gref);
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK (clicked_cb), *gref);
+
/* Component signals */
cp_gtk_component_connect_signals (G_OBJECT (button), gref);
@@ -385,4 +396,20 @@
endNativeRepaintID);
gdk_threads_enter ();
+}
+
+static void
+clicked_cb (GtkButton* button __attribute__((unused)),
+ jobject peer)
+{
+ GdkEventButton* event;
+
+ event = (GdkEventButton*) gtk_get_current_event ();
+ g_assert (event);
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
+ postActionEventID,
+ cp_gtk_state_to_awt_mods (event->state));
+
+ gdk_event_free ((GdkEvent*) event);
}
Index: kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
diff -u kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c:1.16 kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c:1.17
--- kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c:1.16 Tue Jul 26 16:22:02 2005
+++ kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c Mon Aug 15 22:35:38 2005
@@ -145,8 +145,8 @@
return 0;
}
-static jint
-state_to_awt_mods (guint state)
+jint
+cp_gtk_state_to_awt_mods (guint state)
{
jint result = 0;
@@ -946,7 +946,7 @@
postMouseEventID,
AWT_MOUSE_PRESSED,
(jlong)event->time,
- state_to_awt_mods (event->state)
+ cp_gtk_state_to_awt_mods (event->state)
| button_to_awt_mods (event->button),
(jint)event->x,
(jint)event->y,
@@ -974,7 +974,7 @@
postMouseEventID,
AWT_MOUSE_RELEASED,
(jlong)event->time,
- state_to_awt_mods (event->state)
+ cp_gtk_state_to_awt_mods (event->state)
| button_to_awt_mods (event->button),
(jint)event->x,
(jint)event->y,
@@ -999,7 +999,7 @@
postMouseEventID,
AWT_MOUSE_CLICKED,
(jlong)event->time,
- state_to_awt_mods (event->state)
+ cp_gtk_state_to_awt_mods (event->state)
| button_to_awt_mods (event->button),
(jint)event->x,
(jint)event->y,
@@ -1045,7 +1045,7 @@
(*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer, postMouseEventID,
AWT_MOUSE_MOVED,
(jlong)event->time,
- state_to_awt_mods (event->state),
+ cp_gtk_state_to_awt_mods (event->state),
(jint)event->x,
(jint)event->y,
0,
Index: kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gtkpeer.h
diff -u kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gtkpeer.h:1.15 kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gtkpeer.h:1.16
--- kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gtkpeer.h:1.15 Sat Jul 30 16:39:07 2005
+++ kaffe/libraries/clib/awt/classpath-gtk/gtk-peer/gtkpeer.h Mon Aug 15 22:35:38 2005
@@ -163,8 +163,9 @@
GtkWidget **widget;
};
-/* Keycode helpers */
+/* Constant conversion helpers */
guint cp_gtk_awt_keycode_to_keysym (jint keyCode, jint keyLocation);
+jint cp_gtk_state_to_awt_mods (guint state);
/* Image helpers */
GdkPixbuf *cp_gtk_image_get_pixbuf (JNIEnv *env, jobject obj);
Index: kaffe/libraries/javalib/gnu/java/awt/ClasspathToolkit.java
diff -u kaffe/libraries/javalib/gnu/java/awt/ClasspathToolkit.java:1.11 kaffe/libraries/javalib/gnu/java/awt/ClasspathToolkit.java:1.12
--- kaffe/libraries/javalib/gnu/java/awt/ClasspathToolkit.java:1.11 Wed Jul 6 02:26:21 2005
+++ kaffe/libraries/javalib/gnu/java/awt/ClasspathToolkit.java Mon Aug 15 22:35:38 2005
@@ -92,14 +92,6 @@
extends Toolkit
{
/**
- * A map from URLs to previously loaded images, used by {@link
- * #getImage(java.net.URL)}. For images that were loaded via a path
- * to an image file, the map contains a key with a file URL.
- */
- private HashMap imageCache;
-
-
- /**
* Returns a shared instance of the local, platform-specific
* graphics environment.
*
@@ -109,59 +101,6 @@
*/
public abstract GraphicsEnvironment getLocalGraphicsEnvironment();
-
- /**
- * Determines the current size of the default, primary screen.
- *
- * @throws HeadlessException if the local graphics environment is
- * headless, which means that no screen is attached and no user
- * interaction is allowed.
- */
- public Dimension getScreenSize()
- {
- DisplayMode mode;
-
- // getDefaultScreenDevice throws HeadlessException if the
- // local graphics environment is headless.
- mode = GraphicsEnvironment.getLocalGraphicsEnvironment()
- .getDefaultScreenDevice().getDisplayMode();
-
- return new Dimension(mode.getWidth(), mode.getHeight());
- }
-
-
- /**
- * Determines the current color model of the default, primary
- * screen.
- *
- * @see GraphicsEnvironment#getDefaultScreenDevice()
- * @see java.awt.GraphicsDevice#getDefaultConfiguration()
- * @see java.awt.GraphicsConfiguration#getColorModel()
- *
- * @throws HeadlessException if the local graphics environment is
- * headless, which means that no screen is attached and no user
- * interaction is allowed.
- */
- public ColorModel getColorModel()
- {
- // getDefaultScreenDevice throws HeadlessException if the
- // local graphics environment is headless.
- return GraphicsEnvironment.getLocalGraphicsEnvironment()
- .getDefaultScreenDevice().getDefaultConfiguration()
- .getColorModel();
- }
-
- /**
- * Retrieves the metrics for rendering a font on the screen.
- *
- * @param font the font whose metrics are requested.
- */
- public FontMetrics getFontMetrics(Font font)
- {
- return ((ClasspathFontPeer) font.getPeer ()).getFontMetrics (font);
- }
-
-
/**
* Acquires an appropriate {@link ClasspathFontPeer}, for use in
* classpath's implementation of {@link java.awt.Font}.
@@ -185,8 +124,8 @@
* Creates a {@link Font}, in a platform-specific manner.
*
* The default implementation simply constructs a {@link Font}, but some
- * toolkits may wish to override this, to return {@link Font} subclasses which
- * implement {@link java.awt.font.OpenType} or
+ * toolkits may wish to override this, to return {@link Font} subclasses
+ * which implement {@link java.awt.font.OpenType} or
* {@link java.awt.font.MultipleMaster}.
*/
public Font getFont (String name, Map attrs)
@@ -194,7 +133,6 @@
return new Font (name, attrs);
}
-
/**
* Creates a font, reading the glyph definitions from a stream.
*
@@ -223,137 +161,6 @@
*/
public abstract Font createFont(int format, InputStream stream);
-
- /**
- * Returns an image from the specified file, which must be in a
- * recognized format. The set of recognized image formats may vary
- * from toolkit to toolkit.
- *
- * <p>This method maintains a cache for images. If an image has been
- * loaded from the same path before, the cached copy will be
- * returned. The implementation may hold cached copies for an
- * indefinite time, which can consume substantial resources with
- * large images. Users are therefore advised to use {@link
- * #createImage(java.lang.String)} instead.
- *
- * <p>The default implementation creates a file URL for the
- * specified path and invokes {@link #getImage(URL)}.
- *
- * @param path A path to the image file.
- *
- * @return IllegalArgumentException if <code>path</code> does not
- * designate a valid path.
- */
- public Image getImage(String path)
- {
- try
- {
- return getImage(new File(path).toURL());
- }
- catch (MalformedURLException muex)
- {
- throw (IllegalArgumentException) new IllegalArgumentException(path)
- .initCause(muex);
- }
- }
-
-
- /**
- * Loads an image from the specified URL. The image data must be in
- * a recognized format. The set of recognized image formats may vary
- * from toolkit to toolkit.
- *
- * <p>This method maintains a cache for images. If an image has been
- * loaded from the same URL before, the cached copy will be
- * returned. The implementation may hold cached copies for an
- * indefinite time, which can consume substantial resources with
- * large images. Users are therefore advised to use {@link
- * #createImage(java.net.URL)} instead.
- *
- * @param url the URL from where the image is read.
- */
- public Image getImage(URL url)
- {
- Image result;
-
- synchronized (this)
- {
- // Many applications never call getImage. Therefore, we lazily
- // create the image cache when it is actually needed.
- if (imageCache == null)
- imageCache = new HashMap();
- else
- {
- result = (Image) imageCache.get(url);
- if (result != null)
- return result;
- }
-
- // The createImage(URL) method, which is specified by
- // java.awt.Toolkit, is not implemented by this abstract class
- // because it is platform-dependent. Once Classpath has support
- // for the javax.imageio package, it might be worth considering
- // that toolkits provide native stream readers. Then, the class
- // ClasspathToolkit could provide a general implementation that
- // delegates the image format parsing to javax.imageio.
- result = createImage(url);
-
- // It is not clear whether it would be a good idea to use weak
- // references here. The advantage would be reduced memory
- // consumption, since loaded images would not be kept
- // forever. But on VMs that frequently perform garbage
- // collection (which includes VMs with a parallel or incremental
- // collector), the image might frequently need to be re-loaded,
- // possibly over a slow network connection.
- imageCache.put(url, result);
-
- return result;
- }
- }
-
-
- /**
- * Returns an image from the specified file, which must be in a
- * recognized format. The set of recognized image formats may vary
- * from toolkit to toolkit.
- *
- * <p>A new image is created every time this method gets called,
- * even if the same path has been passed before.
- *
- * <p>The default implementation creates a file URL for the
- * specified path and invokes {@link #createImage(URL)}.
- *
- * @param path A path to the file to be read in.
- */
- public Image createImage(String path)
- {
- try
- {
- // The abstract method createImage(URL) is defined by
- // java.awt.Toolkit, but intentionally not implemented by
- // ClasspathToolkit because it is platform specific.
- return createImage(new File(path).toURL());
- }
- catch (MalformedURLException muex)
- {
- throw (IllegalArgumentException) new IllegalArgumentException(path)
- .initCause(muex);
- }
- }
-
- /**
- * Creates an ImageProducer from the specified URL. The image is assumed
- * to be in a recognised format. If the toolkit does not implement the
- * image format or the image format is not recognised, null is returned.
- * This default implementation is overriden by the Toolkit implementations.
- *
- * @param url URL to read image data from.
- */
- public ImageProducer createImageProducer(URL url)
- {
- return null;
- }
-
public abstract RobotPeer createRobot (GraphicsDevice screen)
throws AWTException;
@@ -365,15 +172,8 @@
*/
public abstract EmbeddedWindowPeer createEmbeddedWindow (EmbeddedWindow w);
- /**
- * Used to register ImageIO SPIs provided by the toolkit.
- */
-
- public void registerImageIOSpis(IIORegistry reg)
- {
- }
-
public abstract boolean nativeQueueEmpty();
public abstract void wakeNativeQueue();
public abstract void iterateNativeQueue(EventQueue locked, boolean block);
}
+
Index: kaffe/libraries/javalib/gnu/java/awt/peer/gtk/GtkButtonPeer.java
diff -u kaffe/libraries/javalib/gnu/java/awt/peer/gtk/GtkButtonPeer.java:1.9 kaffe/libraries/javalib/gnu/java/awt/peer/gtk/GtkButtonPeer.java:1.10
--- kaffe/libraries/javalib/gnu/java/awt/peer/gtk/GtkButtonPeer.java:1.9 Sat Aug 13 21:45:47 2005
+++ kaffe/libraries/javalib/gnu/java/awt/peer/gtk/GtkButtonPeer.java Mon Aug 15 22:35:39 2005
@@ -42,6 +42,7 @@
import java.awt.Button;
import java.awt.Component;
import java.awt.Point;
+import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import java.awt.peer.ButtonPeer;
@@ -84,32 +85,11 @@
gtkSetLabel(label);
}
- public void handleEvent (AWTEvent e)
+ void postActionEvent (int mods)
{
- if (e.getID () == MouseEvent.MOUSE_RELEASED && isEnabled ())
- {
- MouseEvent me = (MouseEvent) e;
- Point p = me.getPoint();
- p.translate(((Component) me.getSource()).getX(),
- ((Component) me.getSource()).getY());
- if (!me.isConsumed ()
- && (me.getModifiersEx () & MouseEvent.BUTTON1_DOWN_MASK) != 0
- && awtComponent.getBounds().contains(p))
- postActionEvent (((Button) awtComponent).getActionCommand (),
- me.getModifiersEx ());
- }
-
- if (e.getID () == KeyEvent.KEY_PRESSED)
- {
- KeyEvent ke = (KeyEvent) e;
- if (!ke.isConsumed () && ke.getKeyCode () == KeyEvent.VK_SPACE)
- {
- postActionEvent (((Button) awtComponent).getActionCommand (),
- ke.getModifiersEx ());
- gtkActivate ();
- }
- }
-
- super.handleEvent (e);
+ q().postEvent (new ActionEvent (awtWidget,
+ ActionEvent.ACTION_PERFORMED,
+ ((Button) awtComponent).getActionCommand (),
+ mods));
}
}
Index: kaffe/libraries/javalib/gnu/java/awt/peer/gtk/GtkToolkit.java
diff -u kaffe/libraries/javalib/gnu/java/awt/peer/gtk/GtkToolkit.java:1.19 kaffe/libraries/javalib/gnu/java/awt/peer/gtk/GtkToolkit.java:1.20
--- kaffe/libraries/javalib/gnu/java/awt/peer/gtk/GtkToolkit.java:1.19 Wed Jul 6 02:26:23 2005
+++ kaffe/libraries/javalib/gnu/java/awt/peer/gtk/GtkToolkit.java Mon Aug 15 22:35:39 2005
@@ -121,6 +121,9 @@
portableNativeSync = 0; // false
gtkInit(portableNativeSync);
+
+ // Register ImageIO SPIs
+ GdkPixbufDecoder.registerSpis( IIORegistry.getDefaultInstance() );
}
public GtkToolkit ()
@@ -639,11 +642,6 @@
public RobotPeer createRobot (GraphicsDevice screen) throws AWTException
{
return new GdkRobotPeer (screen);
- }
-
- public void registerImageIOSpis(IIORegistry reg)
- {
- GdkPixbufDecoder.registerSpis(reg);
}
public native boolean nativeQueueEmpty();
Index: kaffe/libraries/javalib/gnu/java/security/provider/DSAKeyPairGenerator.java
diff -u kaffe/libraries/javalib/gnu/java/security/provider/DSAKeyPairGenerator.java:1.3 kaffe/libraries/javalib/gnu/java/security/provider/DSAKeyPairGenerator.java:1.4
--- kaffe/libraries/javalib/gnu/java/security/provider/DSAKeyPairGenerator.java:1.3 Wed Aug 10 11:37:52 2005
+++ kaffe/libraries/javalib/gnu/java/security/provider/DSAKeyPairGenerator.java Mon Aug 15 22:35:39 2005
@@ -114,7 +114,7 @@
if( ((modlen % 64) != 0) || (modlen < 512) || (modlen > 1024) )
throw new InvalidParameterException();
- this.keysize = keysize;
+ this.keysize = modlen;
this.random = random;
if (this.random == null)
{
@@ -181,10 +181,12 @@
p = new BigInteger("e9e642599d355f37c97ffd3567120b8e25c9cd43e927b3a9670fbec5d890141922d2c3b3ad2480093799869d1e846aab49fab0ad26d2ce6a22219d470bce7d777d4a21fbe9c270b57f607002f3cef8393694cf45ee3688c11a8c56ab127a3daf", 16);
q = new BigInteger("9cdbd84c9f1ac2f38d0f80f42ab952e7338bf511", 16);
g = new BigInteger("30470ad5a005fb14ce2d9dcd87e38bc7d1b1c5facbaecbe95f190aa7a31d23c4dbbcbe06174544401a5b2c020965d8c2bd2171d3668445771f74ba084d2029d83c1c158547f3a9f1a2715be23d51ae4d3e5a1f6a7064f316933a346d3f529252", 16);
+ return true;
} else if( keysize == 1024) {
p = new BigInteger("fd7f53811d75122952df4a9c2eece4e7f611b7523cef4400c31e3f80b6512669455d402251fb593d8d58fabfc5f5ba30f6cb9b556cd7813b801d346ff26660b76b9950a5a49f9fe8047b1022c24fbba9d7feb7c61bf83b57e7c6a8a6150f04fb83f6d3c51ec3023554135a169132f675f3ae2b61d72aeff22203199dd14801c7", 16);
q = new BigInteger("9760508f15230bccb292b982a2eb840bf0581cf5", 16);
g = new BigInteger("f7e1a085d69b3ddecbbcab5c36b857b97994afbbfa3aea82f9574c0b3d0782675159578ebad4594fe67107108180b449167123e84c281613b7cf09328cc8a6e13c167a8b547c8d28e0a3ae1e2bb3a675916ea37f0bfa213562f1fb627a01243bcca4f1bea8519089a883dfe15ae59f06928b665e807b552564014c3bfecf492a", 16);
+ return true;
}
return false;
}
Index: kaffe/libraries/javalib/java/awt/FlowLayout.java
diff -u kaffe/libraries/javalib/java/awt/FlowLayout.java:1.12 kaffe/libraries/javalib/java/awt/FlowLayout.java:1.13
--- kaffe/libraries/javalib/java/awt/FlowLayout.java:1.12 Mon Jul 4 00:06:04 2005
+++ kaffe/libraries/javalib/java/awt/FlowLayout.java Mon Aug 15 22:35:39 2005
@@ -205,12 +205,12 @@
else if (align == TRAILING)
myalign = left_to_right ? RIGHT : LEFT;
- if (myalign == LEFT)
- x = ins.left + hgap;
+ if (myalign == RIGHT)
+ x = ins.left + (d.width - new_w) + hgap;
else if (myalign == CENTER)
x = ins.left + (d.width - new_w) / 2 + hgap;
- else
- x = ins.left + (d.width - new_w) + hgap;
+ else // LEFT and all other values of align.
+ x = ins.left + hgap;
for (int k = i; k < j; ++k)
{
@@ -269,9 +269,6 @@
*/
public void setAlignment (int align)
{
- if (align != LEFT && align != RIGHT && align != CENTER
- && align != LEADING && align != TRAILING)
- throw new IllegalArgumentException ("invalid alignment: " + align);
this.align = align;
}
Index: kaffe/libraries/javalib/javax/imageio/spi/IIORegistry.java
diff -u kaffe/libraries/javalib/javax/imageio/spi/IIORegistry.java:1.5 kaffe/libraries/javalib/javax/imageio/spi/IIORegistry.java:1.6
--- kaffe/libraries/javalib/javax/imageio/spi/IIORegistry.java:1.5 Mon Jul 4 00:07:39 2005
+++ kaffe/libraries/javalib/javax/imageio/spi/IIORegistry.java Mon Aug 15 22:35:40 2005
@@ -39,7 +39,6 @@
package javax.imageio.spi;
import gnu.classpath.ServiceFactory;
-import gnu.java.awt.ClasspathToolkit;
import java.awt.Toolkit;
import java.util.HashMap;
@@ -82,8 +81,6 @@
// XXX: Register built-in Spis here.
Toolkit toolkit = Toolkit.getDefaultToolkit();
- if (toolkit instanceof ClasspathToolkit)
- ((ClasspathToolkit)toolkit).registerImageIOSpis(this);
registerApplicationClasspathSpis();
}
More information about the kaffe
mailing list