public class XyDataModel extends DataModel
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_ALLOW_DUPLICATE_X_VALUES
Duplicate X values are allowed by default
|
static boolean |
DEFAULT_AUTOSORT_BY_X
By default items will be sorted by the X values
|
static java.lang.String |
DEFAULT_CHART_TITLE
This title will be used for the chart if none is specified
|
static java.lang.String |
DEFAULT_SERIES_LABEL
This label with appended seriesCount+1 will be used for newly added series
|
static java.lang.String |
DEFAULT_X_AXIS_LABEL
This x axis label will be used for the chart if none is specified
|
static java.lang.String |
DEFAULT_Y_AXIS_LABEL
This y axis label will be used for the chart if none is specified
|
chartModel, chartSettingModel, DEFAULT_COLORS, DEFAULT_LINE_WIDTH, ontologyModel, seriesCount, tableModel
Constructor and Description |
---|
XyDataModel(XyChartEditorJPanel myEditorJPanel)
Instantiates a new XyDataModel.
|
Modifier and Type | Method and Description |
---|---|
XyDataSeries |
createNewDataSeries(java.lang.String label)
Creates a new data series of the correct type for the precise type of chart.
|
ValuePair |
createNewValuePair(java.lang.Number key,
java.lang.Number value)
Creates a new value pair for the specific type of chart.
|
void |
editDataSeriesAddData(DataSeries series,
int targetDataSeriesIndex,
boolean editOntology)
Edits the data series by adding data.
|
void |
editDataSeriesAddOrExchangeData(DataSeries series,
int targetDataSeriesIndex,
boolean editOntology)
Edits the data series by adding or exchanging data.
|
void |
editDataSeriesExchangeData(DataSeries series,
int targetDataSeriesIndex,
boolean editOntology)
Edits the data series by exchanging data.
|
void |
editDataSeriesRemoveData(DataSeries series,
int targetDataSeriesIndex,
boolean editOntology)
Edits the data series by remove data.
|
java.lang.String |
getBaseStringForSeriesLabel()
Returns a string that can be used for generating default series labels
|
java.lang.String |
getDefaultSeriesLabel()
Builds a default series label, that can be used for new series if no label is specified.
|
jade.util.leap.List |
getValuePairsFromSeries(DataSeries series)
Gets a list containing all value pairs from the given DataSeries.
|
java.lang.Number |
getXValueFromPair(ValuePair vp)
Gets the key / x value from the given value pair.
|
XyChartEditorJPanel |
getXyChartEditorJPanel()
Returns the current XyChartEditorJPanel.
|
java.lang.Number |
getYValueFromValuePair(ValuePair vp)
Gets the (y) value from the value pair.
|
void |
setKeyForPair(java.lang.Number key,
ValuePair vp)
Updates the key of the value pair.
|
void |
setOntologyInstanceChart(Chart ontologyChart)
Sets the chart given by the data model of the ontology instance.
|
void |
setValueForPair(java.lang.Number value,
ValuePair vp)
Updates the value of the key value pair.
|
addOrExchangeSeries, addSeries, exchangeSeries, getChartModel, getChartSettingModel, getOntologyModel, getSeriesCount, getTableModel, removeSeries, setChartModel, setChartSettingModel, setOntologyModel, setTableModel, update
public static final java.lang.String DEFAULT_SERIES_LABEL
public static final java.lang.String DEFAULT_CHART_TITLE
public static final java.lang.String DEFAULT_X_AXIS_LABEL
public static final java.lang.String DEFAULT_Y_AXIS_LABEL
public static final boolean DEFAULT_ALLOW_DUPLICATE_X_VALUES
public static final boolean DEFAULT_AUTOSORT_BY_X
public XyDataModel(XyChartEditorJPanel myEditorJPanel)
public XyChartEditorJPanel getXyChartEditorJPanel()
public void setOntologyInstanceChart(Chart ontologyChart)
DataModel
setOntologyInstanceChart
in class DataModel
ontologyChart
- the new ontology instance chartpublic XyDataSeries createNewDataSeries(java.lang.String label)
DataModel
createNewDataSeries
in class DataModel
label
- The new data series labelpublic ValuePair createNewValuePair(java.lang.Number key, java.lang.Number value)
DataModel
createNewValuePair
in class DataModel
key
- The key / x valuevalue
- The (y) valuepublic java.lang.Number getXValueFromPair(ValuePair vp)
DataModel
getXValueFromPair
in class DataModel
vp
- The value pairpublic java.lang.Number getYValueFromValuePair(ValuePair vp)
DataModel
getYValueFromValuePair
in class DataModel
vp
- The value pairpublic void setKeyForPair(java.lang.Number key, ValuePair vp)
DataModel
setKeyForPair
in class DataModel
key
- The new keyvp
- The value pair to be updatedpublic void setValueForPair(java.lang.Number value, ValuePair vp)
DataModel
setValueForPair
in class DataModel
value
- The new valuevp
- The value pair to be updatedpublic jade.util.leap.List getValuePairsFromSeries(DataSeries series)
DataModel
getValuePairsFromSeries
in class DataModel
series
- The DataSeriespublic java.lang.String getDefaultSeriesLabel()
DataModel
getDefaultSeriesLabel
in class DataModel
public void editDataSeriesAddData(DataSeries series, int targetDataSeriesIndex, boolean editOntology) throws NoSuchSeriesException
DataModel
editDataSeriesAddData
in class DataModel
series
- the seriestargetDataSeriesIndex
- the target data series indexeditOntology
- true, if the ontology has to be editedNoSuchSeriesException
public void editDataSeriesAddOrExchangeData(DataSeries series, int targetDataSeriesIndex, boolean editOntology) throws NoSuchSeriesException
DataModel
editDataSeriesAddOrExchangeData
in class DataModel
series
- the seriestargetDataSeriesIndex
- the target data series indexeditOntology
- true, if the ontology has to be editedNoSuchSeriesException
public void editDataSeriesExchangeData(DataSeries series, int targetDataSeriesIndex, boolean editOntology) throws NoSuchSeriesException
DataModel
editDataSeriesExchangeData
in class DataModel
series
- the seriestargetDataSeriesIndex
- the target data series indexeditOntology
- true, if the ontology has to be editedNoSuchSeriesException
public void editDataSeriesRemoveData(DataSeries series, int targetDataSeriesIndex, boolean editOntology) throws NoSuchSeriesException
DataModel
editDataSeriesRemoveData
in class DataModel
series
- the seriestargetDataSeriesIndex
- the target data series indexeditOntology
- true, if the ontology has to be editedNoSuchSeriesException
- the no such series exceptionpublic java.lang.String getBaseStringForSeriesLabel()
DataModel
getBaseStringForSeriesLabel
in class DataModel