com.extjs.gxt.charts.client.model.charts
Class ChartConfig

java.lang.Object
  extended by com.extjs.gxt.ui.client.data.BaseModelData
      extended by com.extjs.gxt.ui.client.data.BaseModel
          extended by com.extjs.gxt.charts.client.model.charts.ChartConfig
All Implemented Interfaces:
ChangeEventSource, Model, ModelData, java.io.Serializable
Direct Known Subclasses:
BarChart, HorizontalBarChart, LineChart, PieChart, ScatterChart, Shape, StackedBarChart

public abstract class ChartConfig
extends BaseModel

Base abstract class for OFC charts.

See Also:
Serialized Form

Field Summary
protected  DataProvider dataProvider
           
protected  ChartModel model
           
 
Fields inherited from class com.extjs.gxt.ui.client.data.BaseModel
changeEventSupport
 
Fields inherited from class com.extjs.gxt.ui.client.data.BaseModelData
allowNestedValues, map
 
Fields inherited from interface com.extjs.gxt.ui.client.data.ChangeEventSource
Add, Remove, Update
 
Constructor Summary
protected ChartConfig(java.lang.String type)
          Creates a new element.
 
Method Summary
 void addChartListener(ChartListener listener)
          Adds a chart listener.
 void addNullValue()
          Adds a null value (skip this value).
 java.util.List<ChartListener> getChartListeners()
          Returns the configs chart listeners.
 DataProvider getDataProvider()
          Returns the chart's data provider.
 java.lang.Integer getFontSize()
          Returns the font size.
 ChartModel getModel()
          Returns the chart's model.
 java.lang.String getText()
          Returns the text.
 java.lang.String getTooltip()
          Returns the tooltip.
 java.lang.String getType()
          Returns the type.
 java.util.List<DataConfig> getValues()
          Returns the values.
 boolean isEnableEvents()
          Returns whether click events are enabled.
 void removeChartListener(ChartListener listener)
          Removes the chart listener.
 void setAnimateOnShow(boolean animateOnShow)
           
protected  void setDataProvider(DataProvider dataProvider)
           
 void setEnableEvents(boolean enableEvents)
          True to enable click events for the chart config (defaults to false).
 void setFontSize(java.lang.Integer fontSize)
          Sets the font size.
 void setKeys(Keys... keys)
          Sets the stack keys.
 void setKeys(java.util.List<Keys> keys)
          Sets the stack keys.
 void setModel(ChartModel model)
          Sets the chart's model.
 void setText(java.lang.String text)
          Sets the text.
 void setTooltip(java.lang.String tooltip)
          Sets the tooltip text (#val# is the default)
 void setValues(java.util.List<DataConfig> values)
          Sets the values.
 
Methods inherited from class com.extjs.gxt.ui.client.data.BaseModel
addChangeListener, addChangeListener, fireEvent, fireEvent, isSilent, notify, notifyPropertyChanged, remove, removeChangeListener, removeChangeListeners, set, setSilent
 
Methods inherited from class com.extjs.gxt.ui.client.data.BaseModelData
get, get, getProperties, getPropertyNames, isAllowNestedValues, setAllowNestedValues, setProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.extjs.gxt.ui.client.data.ModelData
get, getProperties, getPropertyNames
 

Field Detail

model

protected ChartModel model

dataProvider

protected DataProvider dataProvider
Constructor Detail

ChartConfig

protected ChartConfig(java.lang.String type)
Creates a new element.

Parameters:
type - the type
Method Detail

setAnimateOnShow

public void setAnimateOnShow(boolean animateOnShow)

addChartListener

public void addChartListener(ChartListener listener)
Adds a chart listener.

Parameters:
listener - the listener

addNullValue

public void addNullValue()
Adds a null value (skip this value).


getChartListeners

public java.util.List<ChartListener> getChartListeners()
Returns the configs chart listeners.

Returns:
the chart listeners

getDataProvider

public DataProvider getDataProvider()
Returns the chart's data provider.

Returns:
the data provider

getFontSize

public java.lang.Integer getFontSize()
Returns the font size.

Returns:
the font size

getModel

public ChartModel getModel()
Returns the chart's model.

Returns:
the model

getText

public java.lang.String getText()
Returns the text.

Returns:
the text

getTooltip

public java.lang.String getTooltip()
Returns the tooltip.

Returns:
the tooltip

getType

public java.lang.String getType()
Returns the type.

Returns:
the type

getValues

public java.util.List<DataConfig> getValues()
Returns the values.

Returns:
the values

isEnableEvents

public boolean isEnableEvents()
Returns whether click events are enabled.

Returns:
true if click events are enabled

removeChartListener

public void removeChartListener(ChartListener listener)
Removes the chart listener.

Parameters:
listener - the listener to be removed

setEnableEvents

public void setEnableEvents(boolean enableEvents)
True to enable click events for the chart config (defaults to false).

Parameters:
enableEvents - true to enable click events

setFontSize

public void setFontSize(java.lang.Integer fontSize)
Sets the font size.

Parameters:
fontSize - the font size

setKeys

public void setKeys(Keys... keys)
Sets the stack keys.

Parameters:
keys - the keys

setKeys

public void setKeys(java.util.List<Keys> keys)
Sets the stack keys.

Parameters:
keys - the keys

setModel

public void setModel(ChartModel model)
Sets the chart's model.

Parameters:
model - the model

setText

public void setText(java.lang.String text)
Sets the text.

Parameters:
text - the text

setTooltip

public void setTooltip(java.lang.String tooltip)
Sets the tooltip text (#val# is the default)

Parameters:
tooltip - the tooltip

setValues

public void setValues(java.util.List<DataConfig> values)
Sets the values.

Parameters:
values - the values

setDataProvider

protected void setDataProvider(DataProvider dataProvider)