|
|||||||||
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
Abstract base class SVGDocumentGenerator
implements document-building methods
which are common to SVG document-based charts.
Field Summary | |
protected org.w3c.dom.Element |
svgRoot
generated DOM root element |
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 |
Constructor Summary | |
SVGDocumentGenerator()
Sole constructor |
Method Summary | |
protected void |
addBorder(org.w3c.dom.Element parent)
Adds a border around this object's graphic and places preference icon. |
protected void |
addJavaScriptFunctions(org.w3c.dom.Element parent,
int numberOfDataSets)
Adds the JavaScript functions required by this object's graphic. |
protected org.w3c.dom.Element |
addLabel(org.w3c.dom.Element parent,
java.lang.String title,
java.lang.String stylesheetClass,
double x,
double y,
int rotation)
Convenience method for adding text elements to this object's graphic. |
protected void |
addLegend(org.w3c.dom.Element parent,
java.lang.String[] labels,
int xOffset,
int yOffset)
Adds the legend to this object's graphic. |
protected void |
addLegendShapes(org.w3c.dom.Element parent,
int index,
int fontSize,
int x,
int y)
Adds the legend shapes to this object's graphic. |
protected void |
addPreferenceIcon(org.w3c.dom.Element parent)
Adds the preferences icon to this object's graphic. |
protected void |
addTimeStamp(org.w3c.dom.Element parent,
java.lang.String timestamp)
Adds the timestamp to this object's graphic |
protected void |
addTitle(org.w3c.dom.Element parent)
Adds the main title to this object's graphic for display in the border region. |
protected org.w3c.dom.Element |
createDOMTextElement(java.lang.String text,
java.lang.String styleClass,
java.lang.String x,
java.lang.String y,
int rotation)
Convenience method for creating DOM text nodes. |
protected void |
createGraphicColourPalettes()
Creates the documented colour palettes for this object's graphic. |
protected void |
createSvgDocument(org.w3c.dom.DOMImplementation dImplement)
Creates the required document elements for this object's graphic. |
java.lang.String |
getPreferencesPage()
Returns the user preferences page name associated with the generated graphic or null if none has been specified. |
java.lang.String |
getPreferencesPageHeight()
Returns the height of the window which displays the user preferences page associated with the generated graphic. |
java.lang.String |
getPreferencesPageWidth()
Returns the width of the window which displays the user preferences page associated with the generated graphic. |
void |
setGraphicFont(java.lang.String newGraphicFont)
Attempts to set the graphic font to the value. |
void |
setGraphicHeight(java.lang.String newGraphicHeight)
Attempts to set the graphic height to the value. |
void |
setGraphicWidth(java.lang.String newGraphicWidth)
Attempts to set the graphic width to the value. |
void |
setPreferencesPage(java.lang.String newPreferencesPage)
Specifies the user preferences page to be used. |
void |
setPreferencesPageHeight(java.lang.String newPreferencesPageHeight)
Specifies the height for the window which displays the user preferences page. |
void |
setPreferencesPageWidth(java.lang.String newPreferencesPageWidth)
Specifies the width for the window which displays the user preferences page. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected org.w3c.dom.Element svgRoot
Constructor Detail |
public SVGDocumentGenerator()
Method Detail |
public java.lang.String getPreferencesPage()
IGraphicDocumentGenerator
null
if none has been specified.
getPreferencesPage
in interface IGraphicDocumentGenerator
IGraphicDocumentGenerator.getPreferencesPage()
public java.lang.String getPreferencesPageWidth()
IGraphicDocumentGenerator
getPreferencesPageWidth
in interface IGraphicDocumentGenerator
IGraphicDocumentGenerator.getPreferencesPageWidth()
public java.lang.String getPreferencesPageHeight()
IGraphicDocumentGenerator
getPreferencesPageHeight
in interface IGraphicDocumentGenerator
IGraphicDocumentGenerator.getPreferencesPageHeight()
public void setGraphicHeight(java.lang.String newGraphicHeight)
setGraphicHeight
in interface IGraphicDocumentGenerator
setGraphicHeight
in class GraphicDocumentGenerator
IGraphicDocumentGenerator.setGraphicHeight(String)
public void setGraphicWidth(java.lang.String newGraphicWidth)
setGraphicWidth
in interface IGraphicDocumentGenerator
setGraphicWidth
in class GraphicDocumentGenerator
IGraphicDocumentGenerator.setGraphicWidth(String)
public void setGraphicFont(java.lang.String newGraphicFont)
setGraphicFont
in interface IGraphicDocumentGenerator
setGraphicFont
in class GraphicDocumentGenerator
IGraphicDocumentGenerator.setGraphicFont(String)
public void setPreferencesPage(java.lang.String newPreferencesPage)
IGraphicDocumentGenerator
setPreferencesPage
in interface IGraphicDocumentGenerator
newPreferencesPage
- the folder location of the page which is to replace the
existing preferences page. This value will be trimmed.IGraphicDocumentGenerator.setPreferencesPage(String)
public void setPreferencesPageWidth(java.lang.String newPreferencesPageWidth)
IGraphicDocumentGenerator
setPreferencesPageWidth
in interface IGraphicDocumentGenerator
newPreferencesPageWidth
- the pixel widthIGraphicDocumentGenerator.setPreferencesPageWidth(String)
public void setPreferencesPageHeight(java.lang.String newPreferencesPageHeight)
IGraphicDocumentGenerator
setPreferencesPageHeight
in interface IGraphicDocumentGenerator
newPreferencesPageHeight
- the pixel heightsIGraphicDocumentGenerator.setPreferencesPageHeight(String)
protected void createGraphicColourPalettes()
IGraphicDocumentStyle
protected void createSvgDocument(org.w3c.dom.DOMImplementation dImplement)
dImplement
- implementation to use for document creation.protected void addJavaScriptFunctions(org.w3c.dom.Element parent, int numberOfDataSets)
parent
- element to which the script-related elements are appendednumberOfDataSets
- the number of data sets in the inputprotected void addBorder(org.w3c.dom.Element parent)
parent
- element to which the border-related elements are appended.protected void addPreferenceIcon(org.w3c.dom.Element parent)
parent
- element to which the preference icon-related elements
are appendedprotected void addTitle(org.w3c.dom.Element parent)
parent
- element to which the title-related elements are appendedprotected void addTimeStamp(org.w3c.dom.Element parent, java.lang.String timestamp)
parent
- element to which the timestamp-related elements are appendedtimestamp
- timestamp (includes date)protected void addLegend(org.w3c.dom.Element parent, java.lang.String[] labels, int xOffset, int yOffset)
parent
- element to which the legend-related elements are appendedlabels
- legend text labelsxOffset
- starting x positionyOffset
- starting y positionprotected void addLegendShapes(org.w3c.dom.Element parent, int index, int fontSize, int x, int y)
parent
- element to which the legend-related elements are appendedindex
- dataset numberfontSize
- y shift factorx
- upper left xy
- upper left yprotected org.w3c.dom.Element addLabel(org.w3c.dom.Element parent, java.lang.String title, java.lang.String stylesheetClass, double x, double y, int rotation)
parent
- element to which the label-related elements are appended.stylesheetClass
- CSS rule for this elementx
- x location for the labely
- y location for the labelrotation
- the rotation value (0 - 360)protected org.w3c.dom.Element createDOMTextElement(java.lang.String text, java.lang.String styleClass, java.lang.String x, java.lang.String y, int rotation)
text
- text of the elementstyleClass
- CSS rule for the elementx
- The x location for the texty
- The y location for the textrotation
- the rotation value (0 - 360)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |