com.sas.servlet.tbeans.graphics
Class BaseTileChart

com.sas.servlet.tbeans.graphics.BaseTileChart
All Implemented Interfaces:
ActionProviderViewInterface, HttpActionProviderInterface, HttpActionProviderViewInterface, com.sas.beans.PropertyChangeSource, com.sas.lang.ObjectDataInterface, com.sas.servlet.tbeans.features.FeatureListInterface, RenderableInterface, TransformationInterface, com.sas.util.WriteToPrintWriterInterface, java.io.Serializable
Direct Known Subclasses:
TileChart

public class BaseTileChart

See Also:
Serialized Form

Constructor Summary
BaseTileChart()
          Construct a TileChart using the default GraphStyle (GraphStyle.CONVENTION_STYLE).
 
Method Summary
 void applyGraphStyle(GraphStyle graphStyle)
          Apply the GraphStyle display properties onto the TileChart.
 TileChartModel getGraphModel()
          Returns the TileChartModel that encapsulates most of the TileChart's display properties.
 ChartImageMapInfo getImageMapInfo()
          
The TileChartImageMapInfo class encapsulates the mapping of regions associated with tile elements, labels (for both axes and legends) and values (for both axes and legends) as projected onto the display area along with their associated data.
 void setDataModel(TileChartDataModel newDataModel)
          Sets the TileChartDataModel which provides data properties along with any associated mapping properties to define the number and arrangement of data elements, legend and axes.
 void setGraphModel(TileChartModel newTileChartModel)
          Sets a TileChartModel to define most of the TileChart's display properties.
 
Methods inherited from class com.sas.servlet.tbeans.BaseActionTransformation
dispose, getActionProvider, getActionSupportType, getUniqueId, isActionVisible, listActionTypes, listAreaTypes, setActionProvider, setActionSupportType, setActionVisible, setUniqueId, write
 
Methods inherited from class com.sas.servlet.tbeans.BaseTransformation
addPropertyChangeListener, addPropertyChangeListener, cleanUpResources, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCustomAttributes, getDescription, getId, getInputTransform, getLocale, getName, getObjectData, getObjectDataProperty, getOutputTransform, getRequest, getResponse, getTagEpilog, getTagProlog, hasListeners, isCleanUpResourcesOn, isVisible, removePropertyChangeListener, removePropertyChangeListener, setCleanUpResourcesOn, setCustomAttributes, setDescription, setId, setInputTransform, setLocale, setLocaleDependentProperties, setName, setObjectData, setObjectDataProperty, setOutputTransform, setRequest, setResponse, setTagEpilog, setTagProlog, setVisible, toString, write, write, write
 
Methods inherited from interface com.sas.actionprovider.HttpActionProviderViewInterface
getRequest, setRequest
 

Constructor Detail

BaseTileChart

public BaseTileChart()
Construct a TileChart using the default GraphStyle (GraphStyle.CONVENTION_STYLE).

See Also:
GraphStyle
Method Detail

setGraphModel

public void setGraphModel(TileChartModel newTileChartModel)
                   throws java.lang.IllegalArgumentException
Sets a TileChartModel to define most of the TileChart's display properties. Modifying any TileChartModel property triggers the TileChart to update. The update is asynchronous and delayed so modifying multiple properties in quick succession will result in only a single update. Use the FullPaintInterface if greater control over the TileChart's paint behavior is necessary.

Typically applyGraphStyle is used to modify the graphs display properties.

Parameters:
newTileChartModel - the TileChartModel that encapsulates the TileChart's display properties
Throws:
java.lang.IllegalArgumentException - if newTileChartModel is null.
See Also:
getGraphModel(), TileChartModel.apply(com.sas.graphics.components.tilechart.TileChartModel), GraphStyle

getGraphModel

public TileChartModel getGraphModel()
Returns the TileChartModel that encapsulates most of the TileChart's display properties.

Returns:
the TileChartModel that encapsulates most of the TileChart's display properties
See Also:
setGraphModel(com.sas.graphics.components.tilechart.TileChartModel), TileChartModel.apply(com.sas.graphics.components.tilechart.TileChartModel)

setDataModel

public void setDataModel(TileChartDataModel newDataModel)
Sets the TileChartDataModel which provides data properties along with any associated mapping properties to define the number and arrangement of data elements, legend and axes.

Any change in the TileChartDataModel properties will cause the TileChart to update. The update is asynchronous and delayed so modifying multiple properties in quick succession will result in only a single update. The FullPaintInterface can be used if greater control over the TileChart's paint behavior is needed.

Note: Data value changes will also trigger TileChart to update.

A valid TileChartDataModel is required to draw a graph.

Parameters:
newDataModel - provides data properties
See Also:
TileChartTableDataModel, TileChartOLAPDataModel

getImageMapInfo

public ChartImageMapInfo getImageMapInfo()

The TileChartImageMapInfo class encapsulates the mapping of regions associated with tile elements, labels (for both axes and legends) and values (for both axes and legends) as projected onto the display area along with their associated data. This is particularly useful with creating html imagemap information if the graph is used to create an image for an html document.

Returns:
the mapping of regions associated with graph elements

applyGraphStyle

public void applyGraphStyle(GraphStyle graphStyle)
Apply the GraphStyle display properties onto the TileChart. The use of this method is a convenient way to quickly and easily affect the TileChart's appearance. The TileChartModel (accessible via the getGraphModel method) properties and the NoteModels (accessible via the getTitle and getFootnote methods) properties are modified by this method.

The GraphStyle enforces certain constraints that are not enforced on the Graph's display models (TileChartModel and NoteModels). For example only one value text color may be specified on the GraphStyle, whereas the TileChartModel supports setting different value text colors between axes, legends and data element text. Most presentations only require a single color for all types of value text, which is easily achieved by applying a GraphStyle.

Applying a GraphStyle will modify the display properties of the TileChartModel and the title and footnote NoteModels. The TileChart does not retain a link to the GraphStyle after this method has been called. Modifying any of the GraphStyle properties after this method has been called will have no affect on the TileChart. Similarly modifying any of TileChart's display properties after this method has been called will have no affect on the GraphStyle properties. To affect any change in the TileChart display appearance the modified GraphStyle or a different GraphStyle would need to be applied again.

A blind PropertyChangeEvent is fired by the TileChart after the apply is made.

No action is taken if a null GraphStyle is passed in.

Overrides:
applyGraphStyle in class com.sas.servlet.tbeans.graphics.BaseGraph
Parameters:
graphStyle - the GraphStyle whose properties are conveyed to the TileChart
See Also:
NoteModel, TileChartModel



Copyright © 2009 SAS Institute Inc. All Rights Reserved.