[PATCH] Awt fixes
Dalibor Topic
robilad at yahoo.com
Thu Feb 28 15:32:48 PST 2002
hi,
I am playing around with the examples from the Java Class Libraries
book for Java 1.0 :). I ran the Main example for java.awt.Component
and fixed the few issues I noticed in kaffe's libraries.
It fixes some debugging output, some AWTEvent to Event conversion, and
adds a few simple new methods from Java 1.2 to Component.
With the attached fixes, kaffe & JDK 1.3.1 on i386 linux give almost
exactly the same debugging output. The only difference is the width &
height of the InputCanvas. JDK 1.3.1 picks a different font -> the
canvas has different dimensions.
cheers,
Dalibor Topic
-------------- next part --------------
* libraries/javalib/java/awt/Canvas.java:
(counter) new variable. Used to give canvases distinct default
names.
(Canvas) set default canvas name in constructor.
* libraries/javalib/java/awt/Component.java:
(getX) new method.
(getY) new method.
(paramString) removed unnecessary "". Removed flags output in
parameter string. Now uses 'x' to separate width from height.
(postEvent) commented out event x and y coordinate increase since
it resulted in wrong x and y on example code.
(toString) tweaked to JDK output format.
* libraries/javalib/java/awt/Event.java:
(paramString) now returns just the parameter string. The output
has been tweaked to JDK's format.
(toString) reimplemented according to spec.
* libraries/javalib/java/awt/event/KeyEvent.java:
(initOldEvent) set x and y coordinates of the converted event.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 3272 bytes
Desc: not available
Url : http://kaffe.org/pipermail/kaffe/attachments/20020301/aeda2253/attachment-0003.diff
More information about the kaffe
mailing list