Chart FX 7 for Java Server

com.softwarefx.chartfx.server.writer.svg
Class SvgWriter

java.lang.Object
  extended by com.softwarefx.chartfx.server.writer.svg.SvgWriter
All Implemented Interfaces:
IWriter

public class SvgWriter
extends Object
implements IWriter

Provides access to the Chart's SVG Writer object.

Chart FX allows generation of charts using supported Chart FX external writers. The Svg Class is used to configure additional attributes for the generation of SVG formatted charts.


Constructor Summary
SvgWriter()
           
 
Method Summary
 void addAddContentListener(SvgContentListener value)
          Adds a AddContentListener to the listener list.
 SvgContentListener[] getAddContentListeners()
          Returns an array of all the AddContentListeners added to this class with addAddContentListeners().
 Locale getCulture()
          Deprecated.  
 String getExtraAttributes()
          Gets the ExtraAttributes.
 String getPluginPage()
          Gets the PluginPage.
 boolean isScriptable()
          Gets the Scriptable.
 boolean isXmlDeclaration()
          Gets the XmlDeclaration.
 void removeAddContentListener(SvgContentListener value)
          Removes a AddContentListener from the listener list.
 void setCulture(Locale value)
          Deprecated.  
 void setExtraAttributes(String value)
          Adds custom attributes to the EMBED tag used to display the SVG when the method RenderControl is called.
 void setPluginPage(String value)
          Used to customize the PluginPage attribute of the EMBED tag used to display the SVG in the source of the generated ASPX page.
 void setScriptable(boolean value)
          Instructs Chart FX to group the chart elements in the SVG source code.
 void setXmlDeclaration(boolean value)
          Sets a value indicating to include or discard the XML declaration in the generated svg output.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SvgWriter

public SvgWriter()
Method Detail

addAddContentListener

public void addAddContentListener(SvgContentListener value)

Adds a AddContentListener to the listener list.

Parameters:
value - The AddContentListener to be added.

getAddContentListeners

public SvgContentListener[] getAddContentListeners()

Returns an array of all the AddContentListeners added to this class with addAddContentListeners().


getCulture

public Locale getCulture()
Deprecated. 


getExtraAttributes

public String getExtraAttributes()

Gets the ExtraAttributes. For more detail see setExtraAttributes(java.lang.String).


getPluginPage

public String getPluginPage()

Gets the PluginPage. For more detail see setPluginPage(java.lang.String).


isScriptable

public boolean isScriptable()

Gets the Scriptable. For more detail see setScriptable(boolean).


isXmlDeclaration

public boolean isXmlDeclaration()

Gets the XmlDeclaration. For more detail see setXmlDeclaration(boolean).


removeAddContentListener

public void removeAddContentListener(SvgContentListener value)

Removes a AddContentListener from the listener list.

Parameters:
value - The AddContentListener to be removed.

setCulture

public void setCulture(Locale value)
Deprecated. 


setExtraAttributes

public void setExtraAttributes(String value)

Adds custom attributes to the EMBED tag used to display the SVG when the method RenderControl is called.

Remarks:
  • The EMBED tag is generated when an SVG is the selected chart file format. Using this property, you may add custom attributes included in the EMBED tag. For example the following code will produce the below EMBED tag:

    SVGWriter SVGwriter = new SVGWriter();
    SVGwriter.setExtraAttributes("ExtraAttr=\"XXX\"");
    chart1.setOutputWriter(SVGwriter);

    <EMBED SRC="/ChartFX6/Temp/CFT0311_01562024D0.svg" NAME="Chart1" TYPE="image/svg-xml" PLUGINSPAGE="http://www.adobe.com/svg/viewer/install/" ExtraAttr="XXX" WIDTH="558px" HEIGHT="317px" style="Z-INDEX=101; LEFT=22px; POSITION=absolute; TOP=19px; " >

  • See Also:
    setScriptable(boolean), setPluginPage(java.lang.String)

    setPluginPage

    public void setPluginPage(String value)

    Used to customize the PluginPage attribute of the EMBED tag used to display the SVG in the source of the generated ASPX page.

    Remarks:
  • The default value of the PluginPage attribute is "http://www.adobe.com/svg/viewer/install/", however, using this property developers may customize this to reflect any URL:

    <EMBED SRC="/ChartFX6/Temp/CFT0311_0206201580.svg" NAME="Chart1" TYPE="image/svg-xml" PLUGINSPAGE="http://www.softwarefx.com/svg/svgviewer/" WIDTH="558px" HEIGHT="317px" style="Z-INDEX=101; LEFT=22px; POSITION=absolute; TOP=19px; " >

  • See Also:
    setExtraAttributes(java.lang.String), setScriptable(boolean)

    setScriptable

    public void setScriptable(boolean value)

    Instructs Chart FX to group the chart elements in the SVG source code.

    Remarks:
  • Grouping the chart elements in the chart will allow for easy post scripting for the developer.

  • In order to utilize this property, you must include the SVG reference to your web application.

  • Depending on the different chart types, Chart FX will group the chart elements in different orders.

  • See Also:
    Chart.setRenderFormat(java.lang.String), Chart

    setXmlDeclaration

    public void setXmlDeclaration(boolean value)

    Sets a value indicating to include or discard the XML declaration in the generated svg output.

    Remarks:
  • Here is an example of the XmlDeclaration included in a generated SVG file when this property is set to true:

    <?xml version="1.0" encoding="UTF-8"?>

  • See Also:
    setExtraAttributes(java.lang.String), setScriptable(boolean)

    http://www.softwarefx.com

    2008 Software FX, Inc. All Rights Reserved. Chart FX is a registered trademark of Software FX, Inc
    All other names are trademarks or registered trademarks of their respective owners.