HATS 9.0.0 Web API Reference

Publicly accessible methods not documented here are for IBM internal use only and may change in a future release of the product.

com.ibm.hats.transform.widgets
Class GraphWidget

java.lang.Object
  extended by com.ibm.hats.transform.widgets.Widget
      extended by com.ibm.hats.transform.widgets.GraphWidget
All Implemented Interfaces:
ICustomPropertySupplier, com.ibm.hats.common.ICustomPropertySupplier2, com.ibm.hats.transform.graph.GraphData, com.ibm.hats.transform.renderers.TextRenderer
Direct Known Subclasses:
HorizontalBarGraphWidget, LineGraphWidget, VerticalBarGraphWidget

public class GraphWidget
extends Widget
implements com.ibm.hats.transform.graph.GraphData, com.ibm.hats.common.ICustomPropertySupplier2

GraphWidget is the parent class for Widgets which render TableComponentElements as visual graphs. Custom widget developers should not extend.

See Also:
TableComponentElement

Field Summary
protected  File bgImageFile
           
static String CLASS_NAME
           
protected  String[] dataSetColors
           
protected  String[] dataSetLabels
           
protected  List dataSets
           
protected  File imagePath
           
protected  String imagePathName
           
static NumberFormat numberFormat
           
protected  com.ibm.hats.transform.IPathInfo pathInfo
           
protected  boolean pathsFound
           
protected  String[] pointLabels
           
static String PROPERTY_ALTERNATE_TEXT
           
static String PROPERTY_BACKGROUND_IMAGE
           
static String PROPERTY_BACKGROUND_ROOT
           
static String PROPERTY_DATA_SET_LABEL_INDEX
           
static String PROPERTY_DATA_SET_NUMBER
           
static String PROPERTY_DATA_SOURCE_N
           
static String PROPERTY_DATA_SOURCE_N_COLOR
           
static String PROPERTY_DATA_SOURCE_N_LEGEND
           
static String PROPERTY_EXTRACT_DATA_SET_LABELS
           
static String PROPERTY_EXTRACT_LABELS
           
static String PROPERTY_EXTRACT_SOURCE
           
static String PROPERTY_LABEL_INDEX
           
static String PROPERTY_SET_BLANKS_TO_ZERO
           
static String SOURCE_COL
           
static String SOURCE_ROW
           
protected  TableComponentElement tce
           
 
Fields inherited from class com.ibm.hats.transform.widgets.Widget
componentElements, contextAttributes, settings
 
Fields inherited from interface com.ibm.hats.transform.graph.GraphData
CLASSNAME
 
Fields inherited from interface com.ibm.hats.common.ICustomPropertySupplier2
CLASSNAME
 
Constructor Summary
GraphWidget(ComponentElement[] componentElements, Properties settings)
           
GraphWidget(ComponentElement[] componentElements, Properties settings, boolean makeSettings)
           
 
Method Summary
static Properties buildSettings(ComponentElement[] cea, Properties settings)
           
protected  List convertToValue(List dataSets)
          Determines how the String data sets are converted to values Can be overridden if necessary.
protected  double convertToValue(String rawData)
          Determines how a single String is converted into a value Can be overridden if necessary.
 StringBuffer drawHTML()
           
 String getAlternateText()
           
 File getBGImageFile()
           
 Class getCustomComposite()
          Returns a Class object (assignable from com.ibm.hats.studio.composites.BasePropertiesComposite) if a custom composite is to be used to represent the customizable properties for this object or null if dynamic GUI is to be used.
 String getCustomCompositeName()
           
 Vector getCustomProperties(int iPageNumber, Properties properties, ResourceBundle bundle)
          Returns a list of this object's custom properties.
 String[] getDataPointLabels()
          Find labels for points along the data path.
 String[] getDataSetColors()
          Get the data set colors into a list, for more convenient access.
 String[] getDataSetLabels()
          Get the labels for the graph legend.
 int getDataSetLength()
           
 List getDataSets()
          Get the data sets in the form of a List of String[]s
 File getGraphImagePath()
           
 String getLocalImagePathName()
           
protected  int getMaxDataPointIndex()
           
protected  int getMaxDataSetIndex()
           
 int getNumDataSets()
           
 int getPropertyPageCount()
          Returns the number of property pages associated with this object.
static String getRandomColor(int dataSetNumber)
           
 String getVirtualImagePathName()
           
static boolean moreSettingsRequired(Properties settings)
           
 void setDataPointLabels(String[] pointLabels)
           
 void setDataSetColors(String[] dataSetColors)
           
 void setDataSetLabels(String[] dataSetLabels)
           
 void setDataSets(List dataSets)
           
 void updateDataInfo()
           
 
Methods inherited from class com.ibm.hats.transform.widgets.Widget
convertBidi, draw, getComponentElements, getContextAttribute, getContextAttributes, getCustomPropertiesBiDi, getDefaultValues, getSettings, insertAlign, insertDir, newInstance, setComponentElements, setContextAttribute, setContextAttributes, setSettings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.hats.transform.graph.GraphData
convertBidi
 
Methods inherited from interface com.ibm.hats.common.ICustomPropertySupplier
getDefaultValues
 

Field Detail

CLASS_NAME

public static final String CLASS_NAME
See Also:
Constant Field Values

PROPERTY_DATA_SET_NUMBER

public static final String PROPERTY_DATA_SET_NUMBER
See Also:
Constant Field Values

PROPERTY_EXTRACT_SOURCE

public static final String PROPERTY_EXTRACT_SOURCE
See Also:
Constant Field Values

PROPERTY_BACKGROUND_IMAGE

public static final String PROPERTY_BACKGROUND_IMAGE
See Also:
Constant Field Values

PROPERTY_BACKGROUND_ROOT

public static final String PROPERTY_BACKGROUND_ROOT
See Also:
Constant Field Values

PROPERTY_EXTRACT_LABELS

public static final String PROPERTY_EXTRACT_LABELS
See Also:
Constant Field Values

PROPERTY_LABEL_INDEX

public static final String PROPERTY_LABEL_INDEX
See Also:
Constant Field Values

PROPERTY_EXTRACT_DATA_SET_LABELS

public static final String PROPERTY_EXTRACT_DATA_SET_LABELS
See Also:
Constant Field Values

PROPERTY_DATA_SET_LABEL_INDEX

public static final String PROPERTY_DATA_SET_LABEL_INDEX
See Also:
Constant Field Values

PROPERTY_DATA_SOURCE_N

public static final String PROPERTY_DATA_SOURCE_N
See Also:
Constant Field Values

PROPERTY_DATA_SOURCE_N_COLOR

public static final String PROPERTY_DATA_SOURCE_N_COLOR
See Also:
Constant Field Values

PROPERTY_DATA_SOURCE_N_LEGEND

public static final String PROPERTY_DATA_SOURCE_N_LEGEND
See Also:
Constant Field Values

PROPERTY_ALTERNATE_TEXT

public static final String PROPERTY_ALTERNATE_TEXT
See Also:
Constant Field Values

PROPERTY_SET_BLANKS_TO_ZERO

public static final String PROPERTY_SET_BLANKS_TO_ZERO
See Also:
Constant Field Values

SOURCE_ROW

public static final String SOURCE_ROW
See Also:
Constant Field Values

SOURCE_COL

public static final String SOURCE_COL
See Also:
Constant Field Values

numberFormat

public static final NumberFormat numberFormat

tce

protected TableComponentElement tce

pathInfo

protected com.ibm.hats.transform.IPathInfo pathInfo

imagePath

protected File imagePath

bgImageFile

protected File bgImageFile

imagePathName

protected String imagePathName

pathsFound

protected boolean pathsFound

dataSets

protected List dataSets

dataSetLabels

protected String[] dataSetLabels

pointLabels

protected String[] pointLabels

dataSetColors

protected String[] dataSetColors
Constructor Detail

GraphWidget

public GraphWidget(ComponentElement[] componentElements,
                   Properties settings)

GraphWidget

public GraphWidget(ComponentElement[] componentElements,
                   Properties settings,
                   boolean makeSettings)
Method Detail

getDataSets

public List getDataSets()
Get the data sets in the form of a List of String[]s

Specified by:
getDataSets in interface com.ibm.hats.transform.graph.GraphData
Returns:
A List of String arrays containing the data sets.

setDataSets

public void setDataSets(List dataSets)
Specified by:
setDataSets in interface com.ibm.hats.transform.graph.GraphData

getDataSetLabels

public String[] getDataSetLabels()
Get the labels for the graph legend.

Specified by:
getDataSetLabels in interface com.ibm.hats.transform.graph.GraphData
Returns:
A String array of labels for the graph legend.

setDataSetLabels

public void setDataSetLabels(String[] dataSetLabels)
Specified by:
setDataSetLabels in interface com.ibm.hats.transform.graph.GraphData

getDataPointLabels

public String[] getDataPointLabels()
Find labels for points along the data path.

Specified by:
getDataPointLabels in interface com.ibm.hats.transform.graph.GraphData
Returns:
A String array of labels for points along the data path.

setDataPointLabels

public void setDataPointLabels(String[] pointLabels)
Specified by:
setDataPointLabels in interface com.ibm.hats.transform.graph.GraphData

getDataSetColors

public String[] getDataSetColors()
Get the data set colors into a list, for more convenient access.

Specified by:
getDataSetColors in interface com.ibm.hats.transform.graph.GraphData
Returns:
A String array of the data set colors.

setDataSetColors

public void setDataSetColors(String[] dataSetColors)
Specified by:
setDataSetColors in interface com.ibm.hats.transform.graph.GraphData

getGraphImagePath

public File getGraphImagePath()

getBGImageFile

public File getBGImageFile()

getVirtualImagePathName

public String getVirtualImagePathName()

getLocalImagePathName

public String getLocalImagePathName()

getAlternateText

public String getAlternateText()

getDataSetLength

public int getDataSetLength()

getNumDataSets

public int getNumDataSets()

getMaxDataSetIndex

protected int getMaxDataSetIndex()

getMaxDataPointIndex

protected int getMaxDataPointIndex()

moreSettingsRequired

public static boolean moreSettingsRequired(Properties settings)

buildSettings

public static Properties buildSettings(ComponentElement[] cea,
                                       Properties settings)

convertToValue

protected List convertToValue(List dataSets)
Determines how the String data sets are converted to values Can be overridden if necessary.


convertToValue

protected double convertToValue(String rawData)
Determines how a single String is converted into a value Can be overridden if necessary.


getCustomProperties

public Vector getCustomProperties(int iPageNumber,
                                  Properties properties,
                                  ResourceBundle bundle)
Description copied from interface: ICustomPropertySupplier
Returns a list of this object's custom properties. Items must be of type com.ibm.hats.common.HCustomProperty.

Specified by:
getCustomProperties in interface ICustomPropertySupplier
Overrides:
getCustomProperties in class Widget
Parameters:
iPageNumber - page number containing desired properties
properties - existing values for properties defined here
bundle - ResourceBundle containing NLS descriptions for the properties
Returns:
Vector containing all the custom properties for this object, or null if there are none
See Also:
HCustomProperty

getCustomComposite

public Class getCustomComposite()
Description copied from interface: ICustomPropertySupplier
Returns a Class object (assignable from com.ibm.hats.studio.composites.BasePropertiesComposite) if a custom composite is to be used to represent the customizable properties for this object or null if dynamic GUI is to be used. Note: this function only applies to HATS Studio

Specified by:
getCustomComposite in interface ICustomPropertySupplier
Overrides:
getCustomComposite in class Widget
Returns:
custom composite (of type BasePropertiesComposite) or null if dynamic GUI should be used
See Also:
BasePropertiesComposite

getCustomCompositeName

public String getCustomCompositeName()
Specified by:
getCustomCompositeName in interface com.ibm.hats.common.ICustomPropertySupplier2

getPropertyPageCount

public int getPropertyPageCount()
Description copied from interface: ICustomPropertySupplier
Returns the number of property pages associated with this object.

Note: Currently only 0 or 1 pages are supported.

Specified by:
getPropertyPageCount in interface ICustomPropertySupplier
Overrides:
getPropertyPageCount in class Widget
Returns:
the number of defined property pages used to configure this object, or 0 if there are none

getRandomColor

public static String getRandomColor(int dataSetNumber)

updateDataInfo

public void updateDataInfo()

drawHTML

public StringBuffer drawHTML()

HATS 9.0.0 (201308041338)