com.jinsight.svg
Class SVGEncoder

java.lang.Object
  |
  +--com.jinsight.svg.SVGEncoder

public class SVGEncoder
extends java.lang.Object

This class implements methods to configure the SVG graphic context and start the encoding process. The SVG graphic context is represented by the SVGGraphics class, which cannot be directly instantiated. Rather, SVGEncoder creates an instance of SVGGraphics and implements a 'get' method returning a reference to the SVGGraphics object.

See Also:
SVGGraphics

Field Summary
static int HIGH_QUALITY
          Constant used to enable antialiasing.
static int LOW_QUALITY
          Constant used to disable antialiasing.
 
Constructor Summary
SVGEncoder(java.awt.Component comp)
          Class constructor.
 
Method Summary
 void encode(java.io.OutputStream out)
          Starts the SVG encoding process, sending bytes to an output stream.
 SVGGraphics getSVGGraphics()
          Returns the SVG graphic context.
 void setQuality(int quality)
          Sets the image quality.
 void setToolTipEnabled(boolean isToolTipEnabled)
          Enables/disables tooltips.
 void setToolTipProperties(java.awt.Color toolTipForeground, java.awt.Color toolTipBackground, boolean isToolTipOpacityEnabled, java.awt.Font toolTipFont)
          Sets the properties of tooltips.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOW_QUALITY

public static final int LOW_QUALITY
Constant used to disable antialiasing.

HIGH_QUALITY

public static final int HIGH_QUALITY
Constant used to enable antialiasing.
Constructor Detail

SVGEncoder

public SVGEncoder(java.awt.Component comp)
Class constructor.
Parameters:
comp - The Component to be encoded.
Method Detail

getSVGGraphics

public SVGGraphics getSVGGraphics()
Returns the SVG graphic context.
Returns:
An SVGGraphics object.
See Also:
SVGGraphics

setQuality

public void setQuality(int quality)
Sets the image quality. Default image quality is LOW_QUALITY.
See Also:
LOW_QUALITY, HIGH_QUALITY

setToolTipEnabled

public void setToolTipEnabled(boolean isToolTipEnabled)
Enables/disables tooltips. Tooltips are popup windows showing content associated with a geometric shape. Tooltips are displayed when mouse hovers over the area of a geometric shape.
This method was implemented to be used with The JetChart Library. It is invoked by private classes of JetChart and has no effect if SVGEncoder is used outside the library.
Parameters:
isToolTipEnabled - A boolean value(true/false).

setToolTipProperties

public void setToolTipProperties(java.awt.Color toolTipForeground,
                                 java.awt.Color toolTipBackground,
                                 boolean isToolTipOpacityEnabled,
                                 java.awt.Font toolTipFont)
Sets the properties of tooltips.
Parameters:
toolTipForeground - A Color object.
toolTipBackground - A Color object.
isToolTipOpacityEnabled - A boolean value(true/false).
toolTipFont - A Font object.
See Also:
setToolTipEnabled(boolean)

encode

public void encode(java.io.OutputStream out)
            throws java.io.IOException
Starts the SVG encoding process, sending bytes to an output stream.
Parameters:
out - An OutputStream object.
Throws:
java.io.IOException -