[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



> > 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