Java Code Examples for org.jfree.chart.util.ParamChecks#requireNonNegative()
The following examples show how to use
org.jfree.chart.util.ParamChecks#requireNonNegative() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XYPlot.java From ccu-historian with GNU General Public License v3.0 | 6 votes |
/** * Returns the domain axis for a dataset. * * @param index the dataset index (must be >= 0). * * @return The axis. */ public ValueAxis getDomainAxisForDataset(int index) { ParamChecks.requireNonNegative(index, "index"); ValueAxis valueAxis; List axisIndices = (List) this.datasetToDomainAxesMap.get( new Integer(index)); if (axisIndices != null) { // the first axis in the list is used for data <--> Java2D Integer axisIndex = (Integer) axisIndices.get(0); valueAxis = getDomainAxis(axisIndex.intValue()); } else { valueAxis = getDomainAxis(0); } return valueAxis; }
Example 2
Source File: XYPlot.java From SIMVA-SoS with Apache License 2.0 | 6 votes |
/** * Returns the range axis for a dataset. * * @param index the dataset index (must be >= 0). * * @return The axis. */ public ValueAxis getRangeAxisForDataset(int index) { ParamChecks.requireNonNegative(index, "index"); ValueAxis valueAxis; List axisIndices = (List) this.datasetToRangeAxesMap.get( new Integer(index)); if (axisIndices != null) { // the first axis in the list is used for data <--> Java2D Integer axisIndex = (Integer) axisIndices.get(0); valueAxis = getRangeAxis(axisIndex.intValue()); } else { valueAxis = getRangeAxis(0); } return valueAxis; }
Example 3
Source File: XYPlot.java From SIMVA-SoS with Apache License 2.0 | 6 votes |
/** * Returns the domain axis for a dataset. * * @param index the dataset index (must be >= 0). * * @return The axis. */ public ValueAxis getDomainAxisForDataset(int index) { ParamChecks.requireNonNegative(index, "index"); ValueAxis valueAxis; List axisIndices = (List) this.datasetToDomainAxesMap.get( new Integer(index)); if (axisIndices != null) { // the first axis in the list is used for data <--> Java2D Integer axisIndex = (Integer) axisIndices.get(0); valueAxis = getDomainAxis(axisIndex.intValue()); } else { valueAxis = getDomainAxis(0); } return valueAxis; }
Example 4
Source File: XYPlot.java From ccu-historian with GNU General Public License v3.0 | 6 votes |
/** * Returns the range axis for a dataset. * * @param index the dataset index (must be >= 0). * * @return The axis. */ public ValueAxis getRangeAxisForDataset(int index) { ParamChecks.requireNonNegative(index, "index"); ValueAxis valueAxis; List axisIndices = (List) this.datasetToRangeAxesMap.get( new Integer(index)); if (axisIndices != null) { // the first axis in the list is used for data <--> Java2D Integer axisIndex = (Integer) axisIndices.get(0); valueAxis = getRangeAxis(axisIndex.intValue()); } else { valueAxis = getRangeAxis(0); } return valueAxis; }
Example 5
Source File: XYPlot.java From openstock with GNU General Public License v3.0 | 6 votes |
/** * Returns the range axis for a dataset. * * @param index the dataset index (must be >= 0). * * @return The axis. */ public ValueAxis getRangeAxisForDataset(int index) { ParamChecks.requireNonNegative(index, "index"); ValueAxis valueAxis; List axisIndices = (List) this.datasetToRangeAxesMap.get( new Integer(index)); if (axisIndices != null) { // the first axis in the list is used for data <--> Java2D Integer axisIndex = (Integer) axisIndices.get(0); valueAxis = getRangeAxis(axisIndex.intValue()); } else { valueAxis = getRangeAxis(0); } return valueAxis; }
Example 6
Source File: XYPlot.java From openstock with GNU General Public License v3.0 | 6 votes |
/** * Returns the domain axis for a dataset. * * @param index the dataset index (must be >= 0). * * @return The axis. */ public ValueAxis getDomainAxisForDataset(int index) { ParamChecks.requireNonNegative(index, "index"); ValueAxis valueAxis; List axisIndices = (List) this.datasetToDomainAxesMap.get( new Integer(index)); if (axisIndices != null) { // the first axis in the list is used for data <--> Java2D Integer axisIndex = (Integer) axisIndices.get(0); valueAxis = getDomainAxis(axisIndex.intValue()); } else { valueAxis = getDomainAxis(0); } return valueAxis; }
Example 7
Source File: CategoryPlot.java From openstock with GNU General Public License v3.0 | 5 votes |
/** * Returns the domain axis for a dataset. You can change the axis for a * dataset using the {@link #mapDatasetToDomainAxis(int, int)} method. * * @param index the dataset index (must be >= 0). * * @return The domain axis. * * @see #mapDatasetToDomainAxis(int, int) */ public CategoryAxis getDomainAxisForDataset(int index) { ParamChecks.requireNonNegative(index, "index"); CategoryAxis axis; List axisIndices = (List) this.datasetToDomainAxesMap.get( new Integer(index)); if (axisIndices != null) { // the first axis in the list is used for data <--> Java2D Integer axisIndex = (Integer) axisIndices.get(0); axis = getDomainAxis(axisIndex.intValue()); } else { axis = getDomainAxis(0); } return axis; }
Example 8
Source File: CategoryPlot.java From SIMVA-SoS with Apache License 2.0 | 5 votes |
/** * Returns the domain axis for a dataset. You can change the axis for a * dataset using the {@link #mapDatasetToDomainAxis(int, int)} method. * * @param index the dataset index (must be >= 0). * * @return The domain axis. * * @see #mapDatasetToDomainAxis(int, int) */ public CategoryAxis getDomainAxisForDataset(int index) { ParamChecks.requireNonNegative(index, "index"); CategoryAxis axis; List axisIndices = (List) this.datasetToDomainAxesMap.get( new Integer(index)); if (axisIndices != null) { // the first axis in the list is used for data <--> Java2D Integer axisIndex = (Integer) axisIndices.get(0); axis = getDomainAxis(axisIndex.intValue()); } else { axis = getDomainAxis(0); } return axis; }
Example 9
Source File: CategoryPlot.java From ccu-historian with GNU General Public License v3.0 | 5 votes |
/** * Returns the domain axis for a dataset. You can change the axis for a * dataset using the {@link #mapDatasetToDomainAxis(int, int)} method. * * @param index the dataset index (must be >= 0). * * @return The domain axis. * * @see #mapDatasetToDomainAxis(int, int) */ public CategoryAxis getDomainAxisForDataset(int index) { ParamChecks.requireNonNegative(index, "index"); CategoryAxis axis; List axisIndices = (List) this.datasetToDomainAxesMap.get( new Integer(index)); if (axisIndices != null) { // the first axis in the list is used for data <--> Java2D Integer axisIndex = (Integer) axisIndices.get(0); axis = getDomainAxis(axisIndex.intValue()); } else { axis = getDomainAxis(0); } return axis; }
Example 10
Source File: CategoryPlot.java From ccu-historian with GNU General Public License v3.0 | 5 votes |
/** * Returns the range axis for a dataset. You can change the axis for a * dataset using the {@link #mapDatasetToRangeAxis(int, int)} method. * * @param index the dataset index (must be >= 0). * * @return The range axis. * * @see #mapDatasetToRangeAxis(int, int) */ public ValueAxis getRangeAxisForDataset(int index) { ParamChecks.requireNonNegative(index, "index"); ValueAxis axis; List axisIndices = (List) this.datasetToRangeAxesMap.get( new Integer(index)); if (axisIndices != null) { // the first axis in the list is used for data <--> Java2D Integer axisIndex = (Integer) axisIndices.get(0); axis = getRangeAxis(axisIndex.intValue()); } else { axis = getRangeAxis(0); } return axis; }
Example 11
Source File: CategoryPlot.java From openstock with GNU General Public License v3.0 | 3 votes |
/** * Maps the specified dataset to the axes in the list. Note that the * conversion of data values into Java2D space is always performed using * the first axis in the list. * * @param index the dataset index (zero-based). * @param axisIndices the axis indices (<code>null</code> permitted). * * @since 1.0.12 */ public void mapDatasetToDomainAxes(int index, List axisIndices) { ParamChecks.requireNonNegative(index, "index"); checkAxisIndices(axisIndices); this.datasetToDomainAxesMap.put(index, new ArrayList(axisIndices)); // fake a dataset change event to update axes... datasetChanged(new DatasetChangeEvent(this, getDataset(index))); }
Example 12
Source File: CategoryPlot.java From openstock with GNU General Public License v3.0 | 3 votes |
/** * Maps the specified dataset to the axes in the list. Note that the * conversion of data values into Java2D space is always performed using * the first axis in the list. * * @param index the dataset index (zero-based). * @param axisIndices the axis indices (<code>null</code> permitted). * * @since 1.0.12 */ public void mapDatasetToRangeAxes(int index, List axisIndices) { ParamChecks.requireNonNegative(index, "index"); checkAxisIndices(axisIndices); this.datasetToRangeAxesMap.put(index, new ArrayList(axisIndices)); // fake a dataset change event to update axes... datasetChanged(new DatasetChangeEvent(this, getDataset(index))); }
Example 13
Source File: CategoryPlot.java From SIMVA-SoS with Apache License 2.0 | 3 votes |
/** * Maps the specified dataset to the axes in the list. Note that the * conversion of data values into Java2D space is always performed using * the first axis in the list. * * @param index the dataset index (zero-based). * @param axisIndices the axis indices (<code>null</code> permitted). * * @since 1.0.12 */ public void mapDatasetToRangeAxes(int index, List axisIndices) { ParamChecks.requireNonNegative(index, "index"); checkAxisIndices(axisIndices); this.datasetToRangeAxesMap.put(index, new ArrayList(axisIndices)); // fake a dataset change event to update axes... datasetChanged(new DatasetChangeEvent(this, getDataset(index))); }
Example 14
Source File: XYPlot.java From ccu-historian with GNU General Public License v3.0 | 3 votes |
/** * Maps the specified dataset to the axes in the list. Note that the * conversion of data values into Java2D space is always performed using * the first axis in the list. * * @param index the dataset index (zero-based). * @param axisIndices the axis indices (<code>null</code> permitted). * * @since 1.0.12 */ public void mapDatasetToDomainAxes(int index, List axisIndices) { ParamChecks.requireNonNegative(index, "index"); checkAxisIndices(axisIndices); Integer key = new Integer(index); this.datasetToDomainAxesMap.put(key, new ArrayList(axisIndices)); // fake a dataset change event to update axes... datasetChanged(new DatasetChangeEvent(this, getDataset(index))); }
Example 15
Source File: XYPlot.java From ccu-historian with GNU General Public License v3.0 | 3 votes |
/** * Maps the specified dataset to the axes in the list. Note that the * conversion of data values into Java2D space is always performed using * the first axis in the list. * * @param index the dataset index (zero-based). * @param axisIndices the axis indices (<code>null</code> permitted). * * @since 1.0.12 */ public void mapDatasetToRangeAxes(int index, List axisIndices) { ParamChecks.requireNonNegative(index, "index"); checkAxisIndices(axisIndices); Integer key = new Integer(index); this.datasetToRangeAxesMap.put(key, new ArrayList(axisIndices)); // fake a dataset change event to update axes... datasetChanged(new DatasetChangeEvent(this, getDataset(index))); }
Example 16
Source File: CategoryPlot.java From ccu-historian with GNU General Public License v3.0 | 3 votes |
/** * Maps the specified dataset to the axes in the list. Note that the * conversion of data values into Java2D space is always performed using * the first axis in the list. * * @param index the dataset index (zero-based). * @param axisIndices the axis indices (<code>null</code> permitted). * * @since 1.0.12 */ public void mapDatasetToDomainAxes(int index, List axisIndices) { ParamChecks.requireNonNegative(index, "index"); checkAxisIndices(axisIndices); this.datasetToDomainAxesMap.put(index, new ArrayList(axisIndices)); // fake a dataset change event to update axes... datasetChanged(new DatasetChangeEvent(this, getDataset(index))); }
Example 17
Source File: CategoryPlot.java From ccu-historian with GNU General Public License v3.0 | 3 votes |
/** * Maps the specified dataset to the axes in the list. Note that the * conversion of data values into Java2D space is always performed using * the first axis in the list. * * @param index the dataset index (zero-based). * @param axisIndices the axis indices (<code>null</code> permitted). * * @since 1.0.12 */ public void mapDatasetToRangeAxes(int index, List axisIndices) { ParamChecks.requireNonNegative(index, "index"); checkAxisIndices(axisIndices); this.datasetToRangeAxesMap.put(index, new ArrayList(axisIndices)); // fake a dataset change event to update axes... datasetChanged(new DatasetChangeEvent(this, getDataset(index))); }
Example 18
Source File: XYPlot.java From SIMVA-SoS with Apache License 2.0 | 3 votes |
/** * Maps the specified dataset to the axes in the list. Note that the * conversion of data values into Java2D space is always performed using * the first axis in the list. * * @param index the dataset index (zero-based). * @param axisIndices the axis indices (<code>null</code> permitted). * * @since 1.0.12 */ public void mapDatasetToDomainAxes(int index, List axisIndices) { ParamChecks.requireNonNegative(index, "index"); checkAxisIndices(axisIndices); Integer key = new Integer(index); this.datasetToDomainAxesMap.put(key, new ArrayList(axisIndices)); // fake a dataset change event to update axes... datasetChanged(new DatasetChangeEvent(this, getDataset(index))); }
Example 19
Source File: XYPlot.java From SIMVA-SoS with Apache License 2.0 | 3 votes |
/** * Maps the specified dataset to the axes in the list. Note that the * conversion of data values into Java2D space is always performed using * the first axis in the list. * * @param index the dataset index (zero-based). * @param axisIndices the axis indices (<code>null</code> permitted). * * @since 1.0.12 */ public void mapDatasetToRangeAxes(int index, List axisIndices) { ParamChecks.requireNonNegative(index, "index"); checkAxisIndices(axisIndices); Integer key = new Integer(index); this.datasetToRangeAxesMap.put(key, new ArrayList(axisIndices)); // fake a dataset change event to update axes... datasetChanged(new DatasetChangeEvent(this, getDataset(index))); }
Example 20
Source File: CategoryPlot.java From SIMVA-SoS with Apache License 2.0 | 3 votes |
/** * Maps the specified dataset to the axes in the list. Note that the * conversion of data values into Java2D space is always performed using * the first axis in the list. * * @param index the dataset index (zero-based). * @param axisIndices the axis indices (<code>null</code> permitted). * * @since 1.0.12 */ public void mapDatasetToDomainAxes(int index, List axisIndices) { ParamChecks.requireNonNegative(index, "index"); checkAxisIndices(axisIndices); this.datasetToDomainAxesMap.put(index, new ArrayList(axisIndices)); // fake a dataset change event to update axes... datasetChanged(new DatasetChangeEvent(this, getDataset(index))); }