[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]
Re: [zzdev] Re: [zzdev] Re: [Gzigzag-commits] gzigzag/src/gfx GraphicsList.java
- To: "B. Fallenstein" <b.fallenstein@xxxxxx>
- Subject: Re: [zzdev] Re: [zzdev] Re: [Gzigzag-commits] gzigzag/src/gfx GraphicsList.java
- From: Tuomas Lukka <lukka@xxxxxxxxxx>
- Date: Sat, 5 May 2001 12:43:36 +0300
- Cc: zzdev@xxxxxxxxxx
- In-reply-to: <3AF2DC92.1032AF04@xxxxxx>; from b.fallenstein@xxxxxx on Fri, May 04, 2001 at 06:45:07PM +0200
- Mail-followup-to: "B. Fallenstein" <b.fallenstein@xxxxxx>, zzdev@xxxxxxxxxx
- References: <E14vGso-0006MN-00@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <20010504072454.A15672@xxxxxxxxxxxxxx> <3AF2DC92.1032AF04@xxxxxx>
> > Most annoying breakage by the Java API. How should we resolve this?
>
> The only idea that comes readily to mind is having two separate versions
> & the Makefile deciding which one to use (or, having it be an
> autogenerated file, and have some kind of detector for the Java
> version). Hmmmm...
>
> Well, we could also simply add a class
> java.text.AttributedCharacterIterator to SRC in the makefile if we
> detect 1.1.
>
> I dunno, it's not satisfying. But I've tried some other possibilities,
> using Object instead of AttributedCharacterIterator, and imporing an
> AttributedCharacterIterator from another package after importing it from
> java.text (so that the former would be used if present, and the latter
> otherwise), but neither option does work.
BTW: this is documented in
http://java.sun.com/products/jdk/1.2/compatibility.html
12. In the Java 2 SDK, abstract method drawString(AttributedCharacterIterator,
int, int) has been added to class java.awt.Graphics as part of the
Input Method Framework for use by the PersonalJava platform. It
is expected that suclasses of Graphics in applications based
on the 1.1 platform are rare. Any such subclasses that do exist,
however, will need to provide an implementation of this new abstract method
for use in conjunction with the 1.2 platform. [bug 4128205]
The problem is that we want to be able to *run* the same .class files
on both 1.1 and 1.3. So no compile-time detection is satisfactory. Grr...
Tuomas