ptolemy.plot
Class PtolemyGraphics

java.lang.Object
  |
  +--java.awt.Graphics
        |
        +--ptolemy.plot.PtolemyGraphics
Direct Known Subclasses:
EPSGraphics

public abstract class PtolemyGraphics
extends java.awt.Graphics

The sole purpose of this class is to workaround a monstrously poor design decision at Sun to add a method to the java.awt.Graphics class between JDK1.1 and JDK1.2. Usually, adding a method to an abstract class is not a problem, derived classes can easily add dummy methods to handle both the old base class and the new base class. Unfortunately, the method that was added takes an argument of a type that is only present in JDK1.2, so we cannot just add a method in the derived class and expect everything to compile under both JDK1.1 and JDK1.2. The evil workaround is to have two files, PtolemyGraphics1_1.java and PtolemyGraphics1_2.java and to copy the appropriate file to PtolemyGraphics.java, depending on the version of the JDK. This is an evil, unportable, and nasty hack, which would not be necessary if Java had a preprocessor, or Sun had not added this bogus method. :-)

Version:
$Id: PtolemyGraphics1_2.java.in,v 1.3 1999/05/08 22:47:07 cxh Exp $
Author:
Christopher Hylands

Constructor Summary
PtolemyGraphics()
           
 
Method Summary
 void drawString(java.text.AttributedCharacterIterator iterator, int x, int y)
           
 
Methods inherited from class java.awt.Graphics
clearRect, clipRect, copyArea, create, create, dispose, draw3DRect, drawArc, drawBytes, drawChars, drawImage, drawImage, drawImage, drawImage, drawImage, drawImage, drawLine, drawOval, drawPolygon, drawPolygon, drawPolyline, drawRect, drawRoundRect, drawString, fill3DRect, fillArc, fillOval, fillPolygon, fillPolygon, fillRect, fillRoundRect, finalize, getClip, getClipBounds, getClipBounds, getClipRect, getColor, getFont, getFontMetrics, getFontMetrics, hitClip, setClip, setClip, setColor, setFont, setPaintMode, setXORMode, toString, translate
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PtolemyGraphics

public PtolemyGraphics()
Method Detail

drawString

public void drawString(java.text.AttributedCharacterIterator iterator,
                       int x,
                       int y)
Overrides:
drawString in class java.awt.Graphics