PJA Toolkit

A Java library designed to provide support for drawing graphics.
Download

PJA Toolkit Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • eTeks
  • Publisher web site:
  • http://www.eteks.com/index_us.html
  • Operating Systems:
  • Mac OS X 10.0 or later
  • File Size:
  • 522 KB

PJA Toolkit Tags


PJA Toolkit Description

A Java library designed to provide support for drawing graphics. PJA (Pure Java AWT) Toolkit is a JavaTM library for drawing graphics developed by eTeks. PJA Toolkit is designed to be 100% Pure Java and does not use native graphics resources made available by the system on which the Java Virtual Machine runs.?java.awt.Graphics methods such as drawLine (), fillOval (), drawString (),... are implemented in the default JVM with native graphical functions (except in some cases for Java2D) : That means that drawLine () finally calls a GDI system function on Windows or X11 function on a X11/UNIX machine even if the drawing is done in an off-screen image using the class java.awt.Image. This ensures the best performance for drawing graphics with Java.?But in a few cases, this default behavior can cause problems that PJA Toolkit library improves.When no X11 Display is available on a UNIX machine (also called headless environment) or when GDI resources are low on Windows, it is impossible to compute off-screen images with java.awt.Graphics methods under a JDK version < 1.4, even if your program doesn't need to display these images. Typically, this situation happens for servlets returning dynamically generated images like pies, charts or web counters.?With PJA Toolkit, you don't need to change your Java programs that you expected to run : setting java.awt system property to com.eteks.awt.PJAToolkit is the only required modification to your program with Java 1.1 (see PJA Toolkit FAQ and com.eteks.awt.PJA Toolkit class documentation for more information). It is also impossible to compute off-screen images when the Java security manager forbids access to any Toolkit or the AWT library. In that case you can although create an instance of com.eteks.awt.PJAImage class which extends java.awt.Image, and draw into it with graphics methods.Drawing with native function doesn't give always the exact same results for each pixel on all platforms. For example, SansSerif font renders differently on MacOS, Windows and other systems : each letter of this font isn't drawn the same, and is different if font anti-aliasing is set or not on the system. On MacOS, circles aren't rendered as specified in Java documentation : fillArc () and drawArc () don't use the same base ellipse... Finally, PJA Toolkit library available under GNU General Public License is supplied with its Java source files, and is a good exemple for studying: How pixels are drawn by graphics functions on a computer (com.eteks.awt.PJAGraphics uses Bresenham algorithms to draw lines and circles).How to use the Java paradigm for managing images specified by the ImageConsumer/ImageProducer/ImageObserver interfaces.How Java Toolkit works and what it needs to work (which abstract classes and interfaces to implement). Sources are supplied to allow developers to improve and optimize the graphic drawing methods.?com.eteks.awt package files are Java 1.0 compliant but needs JDK 1.2 or higher library to compile (for Java < 1.2 compilers, this can be done using any Java 2 rt.jar library instead of classes.zip in -classpath option at compile time).?PJA Toolkit library weighs 140 Ko at run-time.


PJA Toolkit Related Software