com.ibm.etools.pd.widget.viewer
Class SVGPieChart

java.lang.Object
  |
  +--com.ibm.etools.pd.widget.viewer.GraphicDocumentGenerator
        |
        +--com.ibm.etools.pd.widget.viewer.SVGDocumentGenerator
              |
              +--com.ibm.etools.pd.widget.viewer.SVGPieChart
All Implemented Interfaces:
IDataInputConstants, IDataInputProcessingExceptionCodes, IGraphicDocumentGenerator, IGraphicDocumentStyle, java.io.Serializable

public class SVGPieChart
extends SVGDocumentGenerator
implements IGraphicDocumentStyle, IDataInputProcessingExceptionCodes, IDataInputConstants, java.io.Serializable

SVGPieChart generates a pie chart graphic DOM using Scalable Vector Graphics (SVG).

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ibm.etools.pd.widget.viewer.SVGDocumentGenerator
svgRoot
 
Fields inherited from class com.ibm.etools.pd.widget.viewer.GraphicDocumentGenerator
configDocument, dataDocument, generatedDocument, graphicColourPalette, graphicColourPaletteName, graphicFont, graphicHeight, graphicLegendTitle, graphicTimestampPrefix, graphicTitle, graphicType, graphicWidth, preferencesPage, preferencesPageHeight, preferencesPageWidth, resourcesFolder, suppressLegend
 
Fields inherited from interface com.ibm.etools.pd.widget.viewer.IGraphicDocumentStyle
BAR_PREFS, BAR_PREFS_HEIGHT, BASIC_FONT, BASIC_FONTSIZE, BASIC_FONTSTYLE, BASIC_HEIGHT, BASIC_SHOW_PERCENTS, BASIC_SHOW_SHAPES, BASIC_SHOW_VALUES, BASIC_WIDTH, COMMON_STYLE, EARTH, EARTH_PALETTE, HARVEST, HARVEST_PALETTE, LABEL_FONTSIZE_DELTA, LINE_DEFAULT_WIDTH, LINE_PREFS, LINE_PREFS_HEIGHT, METER_DEFAULT_WIDTH, METER_PREFS, METER_PREFS_HEIGHT, METER_STYLE, NS_BAR_PREFS_HEIGHT, NS_LINE_PREFS_HEIGHT, NS_METER_PREFS_HEIGHT, NS_PIE_PREFS_HEIGHT, NS_PREFS, NS_PREFS_WIDTH, NS_STACKBAR_PREFS_HEIGHT, PASTEL, PASTEL_PALETTE, PIE_DEFAULT_WIDTH, PIE_PREFS, PIE_PREFS_HEIGHT, PIE_STYLE, PREFS, PREFS_WIDTH, SEASIDE, SEASIDE_PALETTE, SPRING, SPRING_PALETTE, STACKBAR_DEFAULT_WIDTH, STACKBAR_PREFS, STACKBAR_PREFS_HEIGHT, SUMMER, SUMMER_PALETTE, TITLE_FONTSIZE_DELTA, XYCHART_STYLE
 
Fields inherited from interface com.ibm.etools.pd.widget.viewer.IDataInputProcessingExceptionCodes
CATEGORY_ID_MISMATCH, DUPLICATE_POSITION_NUMBER, INVALID_NUMBER_FORMAT, MAXIMUM_NUMBER_OF_SEGMENT_MARKERS_EXCEEDED, MISSING_CATEGORY_IDS_OR_DATAPOINT_VALUES, MISSING_CATEGORY_NAMES, MISSING_IDS_OR_POSITIONS, MISSING_NAMES_OR_POSITIONS, MISSING_PERCENTAGE_OF_DATAPOINT_TOTAL_OR_POSITION, MISSING_PERCENTAGES, MISSING_TOTALS, MISSING_TOTALS_OR_POSITIONS, MISSING_VALUES_OR_POSITIONS, NO_CONTEXT_FOUND, NO_DATA_DOCUMENT, NO_DATASETS_FOUND, NO_DESCRIPTION_FOUND, NO_IDS_FOUND, NO_NAMES_FOUND, NO_PERCENTAGE_OF_DATAPOINT_TOTAL_FOUND, NO_SUMMARY_FOUND, NO_TIMESTAMP_FOUND, NO_TOTALS_FOUND, NO_VALUE_FOUND, NO_VALUES_FOUND, POSITION_NUMBER_OUT_OF_BOUNDS
 
Fields inherited from interface com.ibm.etools.pd.widget.viewer.IDataInputConstants
ACTUAL_RATE, CATEGORIZATION, CATEGORY, CONFIGURATION, CONTEXT, DATAPOINT, DATASET, DATAUPDATE, DESCRIPTION, EMPTY_STRING, FONT, HEIGHT, ID, LEGEND_TITLE, MAXVALUE, MINVALUE, NAME, PERCENTAGE_OF_DATAPOINT_TOTAL, POSITION, RANGE, RATE_DEFINITION, SEGMENT_MARKER, SUMMARY, SUPPRESS_LEGEND, TIMESTAMP, TIMESTAMP_PREFIX, TITLE, TOTAL, TOTAL_TITLE, VALUE, VALUE_TITLE, WIDTH, X_TITLE, Y_TITLE
 
Constructor Summary
SVGPieChart()
          Sole constructor.
 
Method Summary
protected  void addJavaScriptFunctions(org.w3c.dom.Element parent, int numberOfSets)
          Adds the JavaScript functions required by this object's graphic.
protected  void addTitles(org.w3c.dom.Element parent, java.util.Hashtable input)
          Adds the titles to the SVG graphic.
 org.w3c.dom.Document generateGraphicDocument()
          In addition to those thrown by PieChartDataRetriever, this method throws DataInputProcessingException for codes MISSING_TOTALS, MISSING_PERCENTAGES.
 void setConfigDocument(org.w3c.dom.Document newConfigDocument)
          Sets the document which is to be used for configuration data retrieval and then retrieves the configuration data from that document.
 void setDataDocument(org.w3c.dom.Document newDataDocument)
          Sets the document which is to be used for data update retrieval and then, if configDocument has not been set, retrieves the configuration data from that document.
 
Methods inherited from class com.ibm.etools.pd.widget.viewer.SVGDocumentGenerator
addBorder, addLabel, addLegend, addLegendShapes, addPreferenceIcon, addTimeStamp, addTitle, createDOMTextElement, createGraphicColourPalettes, createSvgDocument, getPreferencesPage, getPreferencesPageHeight, getPreferencesPageWidth, setGraphicFont, setGraphicHeight, setGraphicWidth, setPreferencesPage, setPreferencesPageHeight, setPreferencesPageWidth
 
Methods inherited from class com.ibm.etools.pd.widget.viewer.GraphicDocumentGenerator
addGraphicColourPalette, generateAndSerialize, generateAndSerializeTo, getConfigDocument, getDataDocument, getGeneratedDocument, getGraphicColourPalette, getGraphicColourPaletteName, getGraphicFont, getGraphicHeight, getGraphicLegendTitle, getGraphicTimestampPrefix, getGraphicTitle, getGraphicType, getGraphicWidth, getResourcesFolder, isLegendSuppressed, serializeGeneratedDocumentToFile, serializeGeneratedDocumentToStream, serializeGeneratedDocumentToString, setGraphicColourPaletteName, setGraphicLegendTitle, setGraphicTimestampPrefix, setGraphicTitle, setResourcesFolder, setSuppressLegend
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SVGPieChart

public SVGPieChart()
Sole constructor.

Method Detail

setConfigDocument

public void setConfigDocument(org.w3c.dom.Document newConfigDocument)
                       throws DataInputProcessingException
Sets the document which is to be used for configuration data retrieval and then retrieves the configuration data from that document.

Specified by:
setConfigDocument in interface IGraphicDocumentGenerator
Overrides:
setConfigDocument in class GraphicDocumentGenerator
DataInputProcessingException
See Also:
IGraphicDocumentGenerator.setConfigDocument(Document)

setDataDocument

public void setDataDocument(org.w3c.dom.Document newDataDocument)
                     throws DataInputProcessingException
Sets the document which is to be used for data update retrieval and then, if configDocument has not been set, retrieves the configuration data from that document.

Specified by:
setDataDocument in interface IGraphicDocumentGenerator
Overrides:
setDataDocument in class GraphicDocumentGenerator
DataInputProcessingException
See Also:
IGraphicDocumentGenerator.setDataDocument(Document)

generateGraphicDocument

public org.w3c.dom.Document generateGraphicDocument()
                                             throws DataInputProcessingException
In addition to those thrown by PieChartDataRetriever, this method throws DataInputProcessingException for codes MISSING_TOTALS, MISSING_PERCENTAGES.

Specified by:
generateGraphicDocument in interface IGraphicDocumentGenerator
Overrides:
generateGraphicDocument in class GraphicDocumentGenerator
DataInputProcessingException
See Also:
IGraphicDocumentGenerator.generateGraphicDocument()

addJavaScriptFunctions

protected void addJavaScriptFunctions(org.w3c.dom.Element parent,
                                      int numberOfSets)
Description copied from class: SVGDocumentGenerator
Adds the JavaScript functions required by this object's graphic.

Overrides:
addJavaScriptFunctions in class SVGDocumentGenerator
Parameters:
parent - element to which the script-related elements are appended
numberOfSets - the number of data sets in the input

addTitles

protected void addTitles(org.w3c.dom.Element parent,
                         java.util.Hashtable input)
Adds the titles to the SVG graphic.

Parameters:
parent - element to which the title-related elements are appended
input - the titles