|
|||||||||
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
GraphicDocumentGenerator
is an abstract base class for classes which take
content data input as Document Object Model (DOM) objects and then generate DOM objects
which represent graphic visualizations of that content data.
Field Summary | |
protected org.w3c.dom.Document |
configDocument
Configuration document |
protected org.w3c.dom.Document |
dataDocument
Data document |
protected org.w3c.dom.Document |
generatedDocument
Graphic document |
protected java.util.Hashtable |
graphicColourPalette
Default set of available colour palettes |
protected java.lang.String |
graphicColourPaletteName
Default colour palette |
protected java.lang.String |
graphicFont
Graphic font |
protected short |
graphicHeight
Graphic height |
protected java.lang.String |
graphicLegendTitle
Legend title |
protected java.lang.String |
graphicTimestampPrefix
Timestamp prefix |
protected java.lang.String |
graphicTitle
Graphic title |
protected java.lang.String |
graphicType
Graphic type |
protected short |
graphicWidth
Graphic width |
protected java.lang.String |
preferencesPage
User preference page |
protected java.lang.String |
preferencesPageHeight
User preference page pixel height, resolvable to int . |
protected java.lang.String |
preferencesPageWidth
User preference page pixel width, resolvable to int . |
protected java.lang.String |
resourcesFolder
Resource folder location |
protected boolean |
suppressLegend
Legend display indicator |
Constructor Summary | |
GraphicDocumentGenerator()
|
Method Summary | |
boolean |
addGraphicColourPalette(java.lang.String paletteName,
java.lang.String[] palette)
Adds the specified colour palette to the set of colour palettes which are available for the graphic generated by this object. |
java.lang.String |
generateAndSerialize()
Generates a graphic Document object based on the input data and
returns it XML-serialized to a String . |
boolean |
generateAndSerializeTo(java.lang.String uri)
Generates a graphic Document object by based on the input data and then
XML-serializes it to the specified filename on the local machine where this object
is executing. |
org.w3c.dom.Document |
generateGraphicDocument()
Generates and returns a graphic Document object based on input data |
org.w3c.dom.Document |
getConfigDocument()
Returns the Document object which provides the configuration data
for the graphic generated by this object or null if none has been
set. |
org.w3c.dom.Document |
getDataDocument()
Returns the Document object which provides the content data
for the graphic generated by this object or null if none has been
set. |
org.w3c.dom.Document |
getGeneratedDocument()
Returns the Document object generated by this object or null
if none has been generated. |
java.lang.String[] |
getGraphicColourPalette()
Returns the set of colours belonging to the default colour palette used by the graphic generated by this object. |
java.lang.String |
getGraphicColourPaletteName()
Returns the name of the default colour palette used by the graphic generated by this object. |
java.lang.String |
getGraphicFont()
Returns the font used by the graphic generated by this object. |
java.lang.String |
getGraphicHeight()
Returns the height of the graphic generated by this object. |
java.lang.String |
getGraphicLegendTitle()
Returns the legend title of the graphic generated by this object or null
if the graphic does not support a legend or no title has been specified. |
java.lang.String |
getGraphicTimestampPrefix()
Returns the timestamp prefix of the graphic generated by this object or null if none has been specified. |
java.lang.String |
getGraphicTitle()
Returns the title of the graphic generated by this object or null
if none has been specified. |
java.lang.String |
getGraphicType()
Returns the type indicator for the graphic generated by this object. |
java.lang.String |
getGraphicWidth()
Returns the width of the graphic generated by this object. |
java.lang.String |
getResourcesFolder()
Returns the folder location for any resources needed by the generated graphic or null if none has been specified . |
boolean |
isLegendSuppressed()
Returns the legend suppression indicator for the graphic generated by this object. |
boolean |
serializeGeneratedDocumentToFile(java.lang.String relativeUri)
XML-serializes the generated Document object to the specified location
on the physical machine where this object is executing. |
byte[] |
serializeGeneratedDocumentToStream()
XML-serializes and returns the generated Document object as a byte array. |
java.lang.String |
serializeGeneratedDocumentToString()
XML-serializes and returns the generated Document object as a String . |
void |
setConfigDocument(org.w3c.dom.Document newConfigDocument)
Specifies the XML document which is to provide the configuration data for the graphic generated by this object. |
void |
setDataDocument(org.w3c.dom.Document newDataDocument)
Specifies the XML document which is to provide the content data for the graphic generated by this object. |
boolean |
setGraphicColourPaletteName(java.lang.String newGraphicColourPaletteName)
Specifies the name of the default colour palette to be used by the graphic generated by this object. |
void |
setGraphicFont(java.lang.String newGraphicFont)
Specifies the font to be used by the graphic generated by this object. |
void |
setGraphicHeight(java.lang.String newGraphicHeight)
Specifies the height of the graphic generated by this object. |
void |
setGraphicLegendTitle(java.lang.String newGraphicLegendTitle)
Specifies the legend title of the graphic generated by this object. |
void |
setGraphicTimestampPrefix(java.lang.String newGraphicTimestampPrefix)
Specifies the prefix for the timestamp of the graphic generated by this object. |
void |
setGraphicTitle(java.lang.String newGraphicTitle)
Specifies the title of the graphic generated by this object. |
void |
setGraphicWidth(java.lang.String newGraphicWidth)
Specifies the width of the graphic generated by this object. |
void |
setResourcesFolder(java.lang.String newResourcesFolder)
Specifies the folder URL on the local machine where this object is executing in which any resources needing to be accessed by the generated graphic are located. |
void |
setSuppressLegend(java.lang.String newSuppressLegend)
Specifies whether the legend should be suppressed in the graphic generated by this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.etools.pd.widget.viewer.IGraphicDocumentGenerator |
getPreferencesPage, getPreferencesPageHeight, getPreferencesPageWidth, setPreferencesPage, setPreferencesPageHeight, setPreferencesPageWidth |
Field Detail |
protected org.w3c.dom.Document configDocument
protected org.w3c.dom.Document dataDocument
protected java.lang.String graphicType
protected org.w3c.dom.Document generatedDocument
protected java.lang.String resourcesFolder
protected java.lang.String graphicTitle
protected java.lang.String graphicTimestampPrefix
protected boolean suppressLegend
protected java.lang.String graphicLegendTitle
protected java.lang.String graphicFont
protected java.lang.String graphicColourPaletteName
protected java.util.Hashtable graphicColourPalette
protected short graphicWidth
protected short graphicHeight
protected java.lang.String preferencesPage
protected java.lang.String preferencesPageWidth
int
.
Specific to the preference page.
protected java.lang.String preferencesPageHeight
int
.
Specific to the preference page.
Constructor Detail |
public GraphicDocumentGenerator()
Method Detail |
public org.w3c.dom.Document getGeneratedDocument()
IGraphicDocumentGenerator
Document
object generated by this object or null
if none has been generated.
getGeneratedDocument
in interface IGraphicDocumentGenerator
org.w3c.dom.Document
IGraphicDocumentGenerator.getGeneratedDocument()
public org.w3c.dom.Document getConfigDocument()
IGraphicDocumentGenerator
Document
object which provides the configuration data
for the graphic generated by this object or null
if none has been
set.
getConfigDocument
in interface IGraphicDocumentGenerator
org.w3c.dom.Document
and conforms to the configuration schema for the generator.IGraphicDocumentGenerator.getConfigDocument()
public org.w3c.dom.Document getDataDocument()
IGraphicDocumentGenerator
Document
object which provides the content data
for the graphic generated by this object or null
if none has been
set.
getDataDocument
in interface IGraphicDocumentGenerator
org.w3c.dom.Document
and conforms to the data schema for the generator.IGraphicDocumentGenerator.getDataDocument()
public java.lang.String getGraphicType()
IGraphicDocumentGenerator
getGraphicType
in interface IGraphicDocumentGenerator
IGraphicDocumentGenerator.getGraphicType()
public java.lang.String getGraphicHeight()
IGraphicDocumentGenerator
getGraphicHeight
in interface IGraphicDocumentGenerator
IGraphicDocumentGenerator.getGraphicHeight()
public java.lang.String getGraphicWidth()
IGraphicDocumentGenerator
getGraphicWidth
in interface IGraphicDocumentGenerator
IGraphicDocumentGenerator.getGraphicWidth()
public java.lang.String getGraphicFont()
IGraphicDocumentGenerator
getGraphicFont
in interface IGraphicDocumentGenerator
IGraphicDocumentGenerator.getGraphicFont()
public java.lang.String getGraphicColourPaletteName()
IGraphicDocumentGenerator
getGraphicColourPaletteName
in interface IGraphicDocumentGenerator
IGraphicDocumentGenerator.getGraphicColourPaletteName()
public java.lang.String[] getGraphicColourPalette()
IGraphicDocumentGenerator
getGraphicColourPalette
in interface IGraphicDocumentGenerator
String
array of hexadecimal coloursIGraphicDocumentGenerator.getGraphicColourPalette()
public java.lang.String getGraphicTitle()
IGraphicDocumentGenerator
null
if none has been specified.
getGraphicTitle
in interface IGraphicDocumentGenerator
IGraphicDocumentGenerator.getGraphicTitle()
public boolean isLegendSuppressed()
IGraphicDocumentGenerator
isLegendSuppressed
in interface IGraphicDocumentGenerator
false
, if legend is to be displayed or is not supported by the graphic type.IGraphicDocumentGenerator.isLegendSuppressed()
public java.lang.String getGraphicTimestampPrefix()
IGraphicDocumentGenerator
null
if none has been specified.
getGraphicTimestampPrefix
in interface IGraphicDocumentGenerator
IGraphicDocumentGenerator.getGraphicTimestampPrefix()
public java.lang.String getGraphicLegendTitle()
IGraphicDocumentGenerator
null
if the graphic does not support a legend or no title has been specified.
getGraphicLegendTitle
in interface IGraphicDocumentGenerator
IGraphicDocumentGenerator.getGraphicLegendTitle()
public java.lang.String getResourcesFolder()
IGraphicDocumentGenerator
null
if none has been specified .
getResourcesFolder
in interface IGraphicDocumentGenerator
IGraphicDocumentGenerator.getResourcesFolder()
public void setConfigDocument(org.w3c.dom.Document newConfigDocument) throws DataInputProcessingException
IGraphicDocumentGenerator
setConfigDocument
in interface IGraphicDocumentGenerator
newConfigDocument
- an object, which implements org.w3c.dom.Document
and conforms to the configuration schema for the generator.
DataInputProcessingException
IGraphicDocumentGenerator.setConfigDocument(Document)
public void setDataDocument(org.w3c.dom.Document newDataDocument) throws DataInputProcessingException
IGraphicDocumentGenerator
setDataDocument
in interface IGraphicDocumentGenerator
newDataDocument
- an object, which implements org.w3c.dom.Document
and conforms to the content data schema for the generator.
DataInputProcessingException
IGraphicDocumentGenerator.setDataDocument(Document)
public void setGraphicHeight(java.lang.String newGraphicHeight)
IGraphicDocumentGenerator
int
zero will be substituted. Extending
classes should override this behaviour and provide a default value in this
case. Note that since this information is generated into the graphic, this method
must be called before generating the graphic.
setGraphicHeight
in interface IGraphicDocumentGenerator
newGraphicHeight
- the pixel height of the generated graphicIGraphicDocumentGenerator.setGraphicHeight(String)
public void setGraphicWidth(java.lang.String newGraphicWidth)
IGraphicDocumentGenerator
int
zero will be substituted. Extending
classes should override this behaviour and provide a default value in this
case. Note that since this information is generated into the graphic, this method
must be called before generating the graphic.
setGraphicWidth
in interface IGraphicDocumentGenerator
newGraphicWidth
- the pixel width of the generated graphicIGraphicDocumentGenerator.setGraphicWidth(String)
public void setGraphicTitle(java.lang.String newGraphicTitle)
IGraphicDocumentGenerator
setGraphicTitle
in interface IGraphicDocumentGenerator
newGraphicTitle
- the title, which will be trimmed.IGraphicDocumentGenerator.setGraphicTitle(String)
public void setSuppressLegend(java.lang.String newSuppressLegend)
IGraphicDocumentGenerator
false
will be substituted. Note that since this information
is generated into the graphic, this method must be called before generating the graphic.
setSuppressLegend
in interface IGraphicDocumentGenerator
newSuppressLegend
- must be one of {"true", "false", "1", "0"}.IGraphicDocumentGenerator.setSuppressLegend(String)
public void setGraphicTimestampPrefix(java.lang.String newGraphicTimestampPrefix)
IGraphicDocumentGenerator
setGraphicTimestampPrefix
in interface IGraphicDocumentGenerator
newGraphicTimestampPrefix
- the prefix, which will be trimmed and prepended to the timestamp.IGraphicDocumentGenerator.setGraphicTimestampPrefix(String)
public void setGraphicLegendTitle(java.lang.String newGraphicLegendTitle)
IGraphicDocumentGenerator
setGraphicLegendTitle
in interface IGraphicDocumentGenerator
newGraphicLegendTitle
- the title, which will be trimmed and displayed over the legendIGraphicDocumentGenerator.setGraphicLegendTitle(String)
public void setGraphicFont(java.lang.String newGraphicFont)
IGraphicDocumentGenerator
setGraphicFont
in interface IGraphicDocumentGenerator
newGraphicFont
- the font family nameIGraphicDocumentGenerator.setGraphicFont(String)
public boolean setGraphicColourPaletteName(java.lang.String newGraphicColourPaletteName)
IGraphicDocumentGenerator
setGraphicColourPaletteName
in interface IGraphicDocumentGenerator
newGraphicColourPaletteName
- one of the documented or user-supplied names
true
, if the supplied name is recognizedIGraphicDocumentGenerator.setGraphicColourPaletteName(String)
public void setResourcesFolder(java.lang.String newResourcesFolder)
IGraphicDocumentGenerator
setResourcesFolder
in interface IGraphicDocumentGenerator
newResourcesFolder
- the folder URL location of the resources, which will be trimmed.IGraphicDocumentGenerator.setResourcesFolder(String)
public boolean addGraphicColourPalette(java.lang.String paletteName, java.lang.String[] palette) throws java.lang.NullPointerException
IGraphicDocumentGenerator
addGraphicColourPalette
in interface IGraphicDocumentGenerator
paletteName
- the name of the palettepalette
- the colours (hexadecimal codes)
true
, if the operation is successful
java.lang.NullPointerException
IGraphicDocumentGenerator.addGraphicColourPalette(String paletteName, String [] palette)
public org.w3c.dom.Document generateGraphicDocument() throws DataInputProcessingException
IGraphicDocumentGenerator
Document
object based on input data
generateGraphicDocument
in interface IGraphicDocumentGenerator
DataInputProcessingException
IGraphicDocumentGenerator.generateGraphicDocument()
public boolean generateAndSerializeTo(java.lang.String uri) throws DataInputProcessingException, java.io.IOException
IGraphicDocumentGenerator
Document
object by based on the input data and then
XML-serializes it to the specified filename on the local machine where this object
is executing.
generateAndSerializeTo
in interface IGraphicDocumentGenerator
uri
- the location to where the generated object is to be XML-serialized.
true
, if the operation is successful
DataInputProcessingException
java.io.IOException
IGraphicDocumentGenerator.generateAndSerializeTo(String)
public java.lang.String generateAndSerialize() throws DataInputProcessingException, java.io.IOException
IGraphicDocumentGenerator
Document
object based on the input data and
returns it XML-serialized to a String
.
generateAndSerialize
in interface IGraphicDocumentGenerator
DataInputProcessingException
java.io.IOException
IGraphicDocumentGenerator.generateAndSerialize()
public boolean serializeGeneratedDocumentToFile(java.lang.String relativeUri) throws java.io.IOException
IGraphicDocumentGenerator
Document
object to the specified location
on the physical machine where this object is executing.
serializeGeneratedDocumentToFile
in interface IGraphicDocumentGenerator
relativeUri
- The location to which the object is serialized.
true
, if the operation is successful.
java.io.IOException
IGraphicDocumentGenerator.serializeGeneratedDocumentToFile(String)
public java.lang.String serializeGeneratedDocumentToString() throws java.io.IOException
IGraphicDocumentGenerator
Document
object as a String
.
serializeGeneratedDocumentToString
in interface IGraphicDocumentGenerator
Document
java.io.IOException
IGraphicDocumentGenerator.serializeGeneratedDocumentToString()
public byte[] serializeGeneratedDocumentToStream()
IGraphicDocumentGenerator
Document
object as a byte array.
serializeGeneratedDocumentToStream
in interface IGraphicDocumentGenerator
Document
IGraphicDocumentGenerator.serializeGeneratedDocumentToStream()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |