本文整理汇总了Java中org.jfree.chart.util.ParamChecks.requireNonNegative方法的典型用法代码示例。如果您正苦于以下问题:Java ParamChecks.requireNonNegative方法的具体用法?Java ParamChecks.requireNonNegative怎么用?Java ParamChecks.requireNonNegative使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.chart.util.ParamChecks
的用法示例。
在下文中一共展示了ParamChecks.requireNonNegative方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDomainAxisForDataset
import org.jfree.chart.util.ParamChecks; //导入方法依赖的package包/类
/**
* 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;
}
示例2: getRangeAxisForDataset
import org.jfree.chart.util.ParamChecks; //导入方法依赖的package包/类
/**
* 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;
}
示例3: getDomainAxisForDataset
import org.jfree.chart.util.ParamChecks; //导入方法依赖的package包/类
/**
* 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;
}
示例4: getRangeAxisForDataset
import org.jfree.chart.util.ParamChecks; //导入方法依赖的package包/类
/**
* 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;
}
示例5: mapDatasetToDomainAxes
import org.jfree.chart.util.ParamChecks; //导入方法依赖的package包/类
/**
* 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)));
}
示例6: mapDatasetToRangeAxes
import org.jfree.chart.util.ParamChecks; //导入方法依赖的package包/类
/**
* 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)));
}
示例7: mapDatasetToDomainAxes
import org.jfree.chart.util.ParamChecks; //导入方法依赖的package包/类
/**
* 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)));
}
示例8: mapDatasetToRangeAxes
import org.jfree.chart.util.ParamChecks; //导入方法依赖的package包/类
/**
* 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)));
}