public class ChartSettingModel
extends java.util.Observable
| Modifier and Type | Class and Description |
|---|---|
class |
ChartSettingModel.ChartSettingsUpdateNotification
This class provides information about changes of settings to observers
|
static class |
ChartSettingModel.EventType
List of constants indicating changes of chart settings
|
| Modifier and Type | Field and Description |
|---|---|
protected DataModel |
parentDataModel |
| Constructor and Description |
|---|
ChartSettingModel(DataModel parentDataModel)
Instantiates a new chart setting model.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChartSettingModelListener(ChartSettingModelListener listener)
Adds the chart setting model listener.
|
java.util.Vector<ChartSettingModelListener> |
getChartSettingModelListener()
Gets the vector chart setting model listener.
|
java.lang.String |
getChartTitle()
Gets the chart title.
|
java.lang.String |
getChartXAxisLabel()
Gets the chart x axis label.
|
java.lang.String |
getChartYAxisLabel()
Gets the chart y axis label.
|
java.lang.String |
getRenderType()
Returns the current render type.
|
javax.swing.table.DefaultTableModel |
getTableModelSeriesSettings()
Gets the table model series settings.
|
protected void |
informChartSettingModelListener()
Inform chart setting model listener.
|
boolean |
isNotificationsEnabled() |
void |
refresh()
Sets the current instance according to the settings in the ontology.
|
void |
removeChartSettingModelListener(ChartSettingModelListener listener)
Removes the chart setting model listener.
|
protected void |
sendNotifications(ChartSettingModel.EventType eventType,
int seriesIndex,
java.lang.Object newValue)
Sends a notification about a series related change to the observers
|
protected void |
sendNotifications(ChartSettingModel.EventType eventType,
java.lang.Object newValue)
Sends a notification about a chart related change to the observers
|
void |
setChartTitle(java.lang.String newTitle)
Sets a new chart title.
|
void |
setChartXAxisLabel(java.lang.String newXAxisLabel)
Sets the chart x axis label.
|
void |
setChartYAxisLabel(java.lang.String newYAxisLabel)
Sets the chart y axis label.
|
void |
setNotificationsEnabled(boolean notificationsEnabled) |
void |
setRenderType(java.lang.String newRendererType)
Sets a new render type.
|
void |
setSeriesColor(int seriesIndex,
java.awt.Color newColor)
Sets the plot color for a data series, specified by its index
|
void |
setSeriesLabel(int seriesIndex,
java.lang.String newLabel)
Sets the series label for a data series, specified by its index
|
void |
setSeriesLineWidth(int seriesIndex,
java.lang.Float newWidth)
Sets the plot line width for a data series, specified by its index
|
void |
setTableModelSeriesSettings(javax.swing.table.DefaultTableModel tableModelSeriesSettings)
Sets the table model series settings.
|
void |
updateSeriesList()
Updates the list of series-specific settings.
|
protected DataModel parentDataModel
public ChartSettingModel(DataModel parentDataModel)
parentDataModel - the parent data modelpublic void refresh()
public java.lang.String getChartTitle()
public void setChartTitle(java.lang.String newTitle)
newTitle - the chartTitle to setpublic java.lang.String getChartXAxisLabel()
public void setChartXAxisLabel(java.lang.String newXAxisLabel)
newXAxisLabel - the chartXAxisLabel to setpublic java.lang.String getChartYAxisLabel()
public void setChartYAxisLabel(java.lang.String newYAxisLabel)
newYAxisLabel - the chartYAxisLabel to setpublic java.lang.String getRenderType()
public void setRenderType(java.lang.String newRendererType)
newRendererType - the renderer to setpublic void setSeriesLabel(int seriesIndex,
java.lang.String newLabel)
throws NoSuchSeriesException
seriesIndex - The series indexnewLabel - The new series labelNoSuchSeriesException - Invalid series indexpublic void setSeriesColor(int seriesIndex,
java.awt.Color newColor)
throws NoSuchSeriesException
seriesIndex - The series indexnewColor - The new plot colorNoSuchSeriesException - Invalid series indexpublic void setSeriesLineWidth(int seriesIndex,
java.lang.Float newWidth)
throws NoSuchSeriesException
seriesIndex - The series indexnewWidth - The new plot line widthNoSuchSeriesException - Invalid series indexpublic void setTableModelSeriesSettings(javax.swing.table.DefaultTableModel tableModelSeriesSettings)
tableModelSeriesSettings - the tableModelSeriesSettings to setpublic javax.swing.table.DefaultTableModel getTableModelSeriesSettings()
public void updateSeriesList()
public java.util.Vector<ChartSettingModelListener> getChartSettingModelListener()
public void addChartSettingModelListener(ChartSettingModelListener listener)
listener - the listenerpublic void removeChartSettingModelListener(ChartSettingModelListener listener)
listener - the listenerprotected void informChartSettingModelListener()
protected void sendNotifications(ChartSettingModel.EventType eventType, java.lang.Object newValue)
eventType - The event type, indicating which setting was changednewValue - The new value of the settingprotected void sendNotifications(ChartSettingModel.EventType eventType, int seriesIndex, java.lang.Object newValue)
eventType - The event type, indicating which setting was changedseriesIndex - The index of the affected seriesnewValue - The new value of the settingpublic boolean isNotificationsEnabled()
public void setNotificationsEnabled(boolean notificationsEnabled)