com.jinsight.jetchart
Class Java2Adapter

java.lang.Object
  extended bycom.jinsight.jetchart.Java2AdapterModel
      extended bycom.jinsight.jetchart.Java2Adapter

public class Java2Adapter
extends com.jinsight.jetchart.Java2AdapterModel

JetChart is a java class library compatible with earlier Java versions, which don't implement more complex and advanced graphic features as antialiasing and rotated texts. To allow for these characteristics to be applied to JetChart graphs, it is necessary to plug any of the chart contexts, represented by the class GenericGraph and its subclasses, into a Java 2 adapter object, whereby the chart context's Graphics object is cast into Graphics2D and appropriate methods are invoked on it to achieve the desired effect.
Currently, a user can only change the antialiasing property in order to display smoother lines, rather than jagged lines. The only public method available is setAntiAliasEnabled(boolean isAntiAliasEnabled).


Constructor Summary
Java2Adapter(GenericGraph graph)
          Creates a Java2Adapter object.
 
Method Summary
protected  void drawLine(java.awt.Graphics g, int x1, int y1, int x2, int y2, int thickness)
           
protected  void paintRotatedText(java.awt.Graphics g, java.lang.String text, int xPos, int yPos, int angle)
           
 void setAntiAliasEnabled(boolean isAntiAliasEnabled)
          Enables/disables antialiased images.
protected  void setGraphics(java.awt.Graphics g)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Java2Adapter

public Java2Adapter(GenericGraph graph)
Creates a Java2Adapter object.

Parameters:
graph - A GenericGraph object.
Method Detail

setAntiAliasEnabled

public void setAntiAliasEnabled(boolean isAntiAliasEnabled)
Enables/disables antialiased images.

Parameters:
isAntiAliasEnabled - A boolean value(true/false).

setGraphics

protected void setGraphics(java.awt.Graphics g)

drawLine

protected void drawLine(java.awt.Graphics g,
                        int x1,
                        int y1,
                        int x2,
                        int y2,
                        int thickness)

paintRotatedText

protected void paintRotatedText(java.awt.Graphics g,
                                java.lang.String text,
                                int xPos,
                                int yPos,
                                int angle)