com.sas.graphics.components
Class DataModel

com.sas.graphics.components.DataModel
Direct Known Subclasses:
BarChartDataModel, BarLineChartDataModel, ESRIMapDataModel, GanttChartDataModel, LineChartDataModel, LinePlotDataModel, PieChartDataModel, RadarChartDataModel, ScatterPlotDataModel, TileChartDataModel, WaterfallChartDataModel

public abstract class DataModel

The DataModel class contains general chart data preferences.

It is a base to be sub-classed by the specific chart data model classes (such as BarChartDataModel), and therefore will contain only properties common to all chart types.

Usage

Currently there are no universal data properties.

Extending

This class provides a type for the all chart types data models but is only intended for internal subclassing.

Since:
SAS 9.1
See Also:
ModelBase, BarChartDataModel, PieChartDataModel, ScatterPlotDataModel

Constructor Summary
DataModel()
           
 
Method Summary
 void apply(DataModel theOtherModel)
          Utility method to convey properties contained in "theOtherModel" to this object.
 boolean equals(java.lang.Object obj)
          Determines whether another object is equal to this DataModel.
 java.util.Locale getLocale()
          Returns the locale utilised during the formatting of data values.
 com.sas.rpf.Context getRulesContext()
           
 int getSortStrategy()
           
 int hashCode()
          Computes the hash code for this DataModel.
 void setLocale(java.util.Locale newLocale)
          Sets the locale utilised during the formatting of data values.
 void setRulesContext(com.sas.rpf.Context newRulesContext)
           
 void setSortStrategy(int newSortStrategy)
           
 
Methods inherited from class com.sas.graphics.components.ModelBase
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, setContainedModel
 

Constructor Detail

DataModel

public DataModel()
Method Detail

getRulesContext

public com.sas.rpf.Context getRulesContext()

setRulesContext

public void setRulesContext(com.sas.rpf.Context newRulesContext)

setLocale

public void setLocale(java.util.Locale newLocale)
Sets the locale utilised during the formatting of data values.
Note: If this property is null then the graph component will apply its locale when formatting data values.
Special Note: both (1) com.sas.storage.iquery.BusinessQueryToTableModelAdapter (implements java.util.TableModel) and (2) com.sas.storage.olap.OLAPDataSetInterface supports a locale property that can be associated with the data. If either of these models are assigned and their locale property is non-null then their locale property will trump (i.e. override) this property. This property is primarily a stop-gap measure to ensure that users always retain the option of specifying a data format specific locale.

Why is a data format locale even necessary?
Certain SAS currency formats obtain there currency symbol based upon the specified locale (Ex. "NLMNY"). If the data is representing Japanese Yen then you certainly don't want a client's locale of US to trigger the format to represent the data as if it were dollars. This property allows the locale applied to te data format to vary independently from the component's locale. So that any warning, error or informational messages displayed by the graph component can appear utilising the client's locale while simultaneously the locale applied during the data formatting can retain its context which is primarily necessary when currency formats are specified.

Parameters:
newLocale - the data format locale
See Also:
getLocale()

getLocale

public java.util.Locale getLocale()
Returns the locale utilised during the formatting of data values. This value may be null in which case the locale of the graph component will be utilised. Note: there are some special cases where this value can be trumped, please read details in the javadoc for setLocale.

Returns:
the locale utilized during the formatting of data values.
See Also:
setLocale(java.util.Locale)

setSortStrategy

public void setSortStrategy(int newSortStrategy)

getSortStrategy

public int getSortStrategy()

apply

public void apply(DataModel theOtherModel)
Utility method to convey properties contained in "theOtherModel" to this object.
Note: Contained "models" (i.e. properties that are subclasses of ModelBase) will in turn be called on to convey their properties to the like contained models in the other object. In that respect this can be considered a "tree" type copy.
Also Note: This is a deep copy. Thus after the copy, mutable properties will not be shared by the two instances.


equals

public boolean equals(java.lang.Object obj)
Determines whether another object is equal to this DataModel.

The result is true if and only if the argument is not null and is a DataModel object that has the same property values as this object.

Overrides:
equals in class ModelBase
Parameters:
obj - the object to test for equality with this DataModel
Returns:
true if the objects are the same; false otherwise.

hashCode

public int hashCode()
Computes the hash code for this DataModel.

Overrides:
hashCode in class ModelBase
Returns:
a hash code value for this object.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.