|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.util.Observable
|
+--jclass.chart.ChartDataModel
|
+--edu.brook.ascape.view.ChartViewModel
Class responsible for proivding data style of a chart view. Requires KLGroup JCChart.
| Field Summary | |
protected ChartView |
chart
The chart view delegating to this model. |
protected DataViewSelection |
dataSelection
The selected series for this data model. |
protected java.lang.String |
name
The name of the chart. |
protected Scape |
scape
The scape the model is primarily viewing; delegated from chart view. |
| Constructor Summary | |
ChartViewModel()
Constructs the model. |
|
| Method Summary | |
void |
addScape(Scape scape)
Sets the scape to view. |
ChartView |
getChart()
Returns the chart view this model is responsible for. |
int |
getDataInterpretation()
Data method for JCChart. |
java.lang.Object |
getDataItem(int row,
int column)
Data method for JCChart. |
DataViewSelection |
getDataSelection()
Returns the viewed data group selection for this chart model. |
java.lang.String |
getName()
Returns the name of this chart view model. |
int |
getNumRows()
Data method for JCChart. |
java.lang.String[] |
getPointLabels()
Data method for JCChart. |
Scape |
getScape()
Returns the scape this chart views. |
java.lang.String |
getSeriesLabel(int row)
Data method for JCChart. |
java.lang.String |
getSeriesName(int row)
Data method for JCChart. |
void |
initialize()
Provides initial settings for the chart; including colors, min and max, headers, labels, etc.. |
protected void |
onChange()
Should be called whenever a change is made to the view model that could effect view. |
void |
onIterate()
Called when scape is iterated. |
void |
onSetup()
Method called when the scape is ready for setup. |
void |
onStart()
Method called when the scape is started. |
void |
onStop()
Method called when the scape is stopped. |
void |
onUpdate()
Called when scape reports an update event. |
void |
removeScape(Scape scape)
Removes the scape from this listener. |
void |
scapeUpdated(ScapeEvent scapeEvent)
Informs this view model that the scape has been changed. |
void |
setChart(ChartView chart)
Sets the chart view this model will be responsible for. |
boolean |
setDataItem(int row,
int column,
java.lang.Object o)
Data method for JCChart. |
void |
setDataSelection(DataSelection dataSelection)
Sets the viewed data group selection for this chart model. |
void |
setName(java.lang.String name)
Sets the name of this chart view model. |
void |
update(java.util.Observable observed,
java.lang.Object arg)
Notifies this view model that a change (in the selected group, typically) has occured. |
void |
updateChart()
Updates chart selection, color and label settings. |
void |
updated()
Called (automatically from paint) when this view has been updated. |
| Methods inherited from class jclass.chart.ChartDataModel |
getRow |
| Methods inherited from class java.util.Observable |
addObserver,
clearChanged,
countObservers,
deleteObserver,
deleteObservers,
hasChanged,
notifyObservers,
notifyObservers,
setChanged |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
protected Scape scape
protected DataViewSelection dataSelection
protected ChartView chart
protected java.lang.String name
| Constructor Detail |
public ChartViewModel()
| Method Detail |
public ChartView getChart()
public void setChart(ChartView chart)
chart - the chart viewpublic DataViewSelection getDataSelection()
public void setDataSelection(DataSelection dataSelection)
public void initialize()
public void updateChart()
public void onIterate()
public void onUpdate()
public void onSetup()
public void onStop()
public void onStart()
public boolean setDataItem(int row,
int column,
java.lang.Object o)
public java.lang.Object getDataItem(int row,
int column)
public int getDataInterpretation()
public int getNumRows()
public java.lang.String[] getPointLabels()
public java.lang.String getSeriesName(int row)
public java.lang.String getSeriesLabel(int row)
public java.lang.String getName()
public void setName(java.lang.String name)
public Scape getScape()
public void addScape(Scape scape)
throws java.util.TooManyListenersException
the - scape this chart is viewingpublic void removeScape(Scape scape)
scape - the scape to removeprotected void onChange()
public void scapeUpdated(ScapeEvent scapeEvent)
public void updated()
public void update(java.util.Observable observed,
java.lang.Object arg)
|
(c) 1998-2000 The Brookings Insitution Webpage |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||