|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.etools.pd.widget.viewer.GraphicDocumentGenerator | +--com.ibm.etools.pd.widget.viewer.SVGDocumentGenerator | +--com.ibm.etools.pd.widget.viewer.SVGXYChart
SVGXYChart
is an abstract base class providing implementation of methods
common to classes generating SVG graphics which have x,y axes.
Field Summary | |
protected int |
axisLabelFontSize
|
protected XYChartDataRetriever |
dataRetriever
Provides methods for retrieving the data from the configuration and data documents. |
protected static int |
GRIDXOFFSET
|
protected int |
GRIDYOFFSET
|
protected int |
xAxisLabelYValue
|
protected int |
xAxisLength
|
protected double[] |
xAxisValues
|
protected double |
XRATIO
|
protected int |
yAxisLength
|
protected double |
yMaxValue
|
protected double |
YRATIO
|
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.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 |
Method Summary | |
protected void |
addAxisLabels(org.w3c.dom.Element parent,
java.lang.String[] xAxisLabels,
java.lang.String[] yAxisLabels)
Adds the axis data labels to the x- and y-axes. |
protected void |
addEachTextBox(org.w3c.dom.Element parent,
double x,
double y,
double width,
double height,
java.lang.String value,
int dataSet,
int next,
java.lang.String crossXAxisFlag)
Add one text box (with a value inside it) |
protected void |
addGrid(org.w3c.dom.Element parent,
int xTicks,
int yTicks,
java.lang.String[] yAxisLabels)
Adds the grid for the x,y axes and draws tick lines on them, positioning them based on the y-axis marker values. |
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. |
protected java.util.Vector |
calculateDashGridYPositions(java.lang.String[] yAxisLabels)
Calculate the y position of all dash grid lines |
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. |
void |
setGraphicHeight(java.lang.String newGraphicHeight)
Sets the graphic height and then computes the length of the y-axis as a factor of the graphic height. |
void |
setGraphicWidth(java.lang.String newGraphicWidth)
Sets the graphic width and then computes the length of the x-axis as a factor of the graphic width. |
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, setPreferencesPage, setPreferencesPageHeight, setPreferencesPageWidth |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected XYChartDataRetriever dataRetriever
protected final double XRATIO
protected final double YRATIO
protected static int GRIDXOFFSET
protected final int GRIDYOFFSET
protected int xAxisLength
protected int yAxisLength
protected double[] xAxisValues
protected int axisLabelFontSize
protected int xAxisLabelYValue
protected double yMaxValue
Method Detail |
public void setConfigDocument(org.w3c.dom.Document newConfigDocument) throws DataInputProcessingException
setConfigDocument
in interface IGraphicDocumentGenerator
setConfigDocument
in class GraphicDocumentGenerator
DataInputProcessingException
IGraphicDocumentGenerator.setConfigDocument(Document)
public void setDataDocument(org.w3c.dom.Document newDataDocument) throws DataInputProcessingException
configDocument
has not been
set, retrieves the configuration data from that document.
setDataDocument
in interface IGraphicDocumentGenerator
setDataDocument
in class GraphicDocumentGenerator
DataInputProcessingException
IGraphicDocumentGenerator.setDataDocument(Document)
public void setGraphicWidth(java.lang.String newGraphicWidth)
setGraphicWidth
in interface IGraphicDocumentGenerator
setGraphicWidth
in class SVGDocumentGenerator
IGraphicDocumentGenerator.setGraphicWidth(String)
public void setGraphicHeight(java.lang.String newGraphicHeight)
setGraphicHeight
in interface IGraphicDocumentGenerator
setGraphicHeight
in class SVGDocumentGenerator
IGraphicDocumentGenerator.setGraphicHeight(String)
protected void addJavaScriptFunctions(org.w3c.dom.Element parent, int numberOfSets)
SVGDocumentGenerator
addJavaScriptFunctions
in class SVGDocumentGenerator
parent
- element to which the script-related elements are appendednumberOfSets
- the number of data sets in the inputprotected void addEachTextBox(org.w3c.dom.Element parent, double x, double y, double width, double height, java.lang.String value, int dataSet, int next, java.lang.String crossXAxisFlag)
parent
- element to which the textbox-related elements are appendedx
- x-coordinate of the text boxy
- y-coordinate of the text boxwidth
- width of the text boxheight
- height of the text boxprotected void addGrid(org.w3c.dom.Element parent, int xTicks, int yTicks, java.lang.String[] yAxisLabels)
parent
- element to which the grid-related elements are appendedxTicks
- number of ticks to draw on the x-axisyTicks
- number of ticks to draw on the y-axisyAxisLabels
- the set of y-axis range marker valuesprotected void addTitles(org.w3c.dom.Element parent, java.util.Hashtable input)
parent
- element to which the title-related elements are appendedinput
- the titlesprotected void addAxisLabels(org.w3c.dom.Element parent, java.lang.String[] xAxisLabels, java.lang.String[] yAxisLabels)
parent
- element to which the label-related elements are appendedxAxisLabels
- data labels for the x-axisyAxisLabels
- data labels for the y-axisprotected java.util.Vector calculateDashGridYPositions(java.lang.String[] yAxisLabels)
yAxisLabels
- the set of y-axis range marker values
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |