本文整理汇总了Java中org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer类的典型用法代码示例。如果您正苦于以下问题:Java XYBoxAndWhiskerRenderer类的具体用法?Java XYBoxAndWhiskerRenderer怎么用?Java XYBoxAndWhiskerRenderer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
XYBoxAndWhiskerRenderer类属于org.jfree.chart.renderer.xy包,在下文中一共展示了XYBoxAndWhiskerRenderer类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createBoxAndWhiskerChart
import org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer; //导入依赖的package包/类
/**
* Creates and returns a default instance of a box and whisker chart.
*
* @param title the chart title (<code>null</code> permitted).
* @param timeAxisLabel a label for the time axis (<code>null</code> permitted).
* @param valueAxisLabel a label for the value axis (<code>null</code> permitted).
* @param dataset the dataset for the chart (<code>null</code> permitted).
* @param legend a flag specifying whether or not a legend is required.
*
* @return a box and whisker chart.
*/
public static JFreeChart createBoxAndWhiskerChart(String title,
String timeAxisLabel,
String valueAxisLabel,
BoxAndWhiskerXYDataset dataset,
boolean legend) {
ValueAxis timeAxis = new DateAxis(timeAxisLabel);
NumberAxis valueAxis = new NumberAxis(valueAxisLabel);
valueAxis.setAutoRangeIncludesZero(false);
XYBoxAndWhiskerRenderer renderer = new XYBoxAndWhiskerRenderer(10.0);
XYPlot plot = new XYPlot(dataset, timeAxis, valueAxis, renderer);
JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);
return chart;
}
示例2: testEquals
import org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer; //导入依赖的package包/类
/**
* Check that the equals() method distinguishes all fields.
*/
public void testEquals() {
XYBoxAndWhiskerRenderer r1 = new XYBoxAndWhiskerRenderer();
XYBoxAndWhiskerRenderer r2 = new XYBoxAndWhiskerRenderer();
assertEquals(r1, r2);
r1.setPaint(new GradientPaint(1.0f, 2.0f, Color.yellow,
3.0f, 4.0f, Color.red));
assertFalse(r1.equals(r2));
r2.setPaint(new GradientPaint(1.0f, 2.0f, Color.yellow,
3.0f, 4.0f, Color.red));
assertEquals(r1, r2);
r1.setArtifactPaint(new GradientPaint(1.0f, 2.0f, Color.green,
3.0f, 4.0f, Color.red));
assertFalse(r1.equals(r2));
r2.setArtifactPaint(new GradientPaint(1.0f, 2.0f, Color.green,
3.0f, 4.0f, Color.red));
assertEquals(r1, r2);
r1.setBoxWidth(0.55);
assertFalse(r1.equals(r2));
r2.setBoxWidth(0.55);
assertEquals(r1, r2);
r1.setFillBox(!r1.getFillBox());
assertFalse(r1.equals(r2));
r2.setFillBox(!r2.getFillBox());
assertEquals(r1, r2);
}
示例3: createBoxAndWhiskerChart
import org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer; //导入依赖的package包/类
/**
* Creates and returns a default instance of a box and whisker chart.
*
* @param title the chart title (<code>null</code> permitted).
* @param timeAxisLabel a label for the time axis (<code>null</code>
* permitted).
* @param valueAxisLabel a label for the value axis (<code>null</code>
* permitted).
* @param dataset the dataset for the chart (<code>null</code> permitted).
* @param legend a flag specifying whether or not a legend is required.
*
* @return A box and whisker chart.
*/
public static JFreeChart createBoxAndWhiskerChart(String title,
String timeAxisLabel,
String valueAxisLabel,
BoxAndWhiskerXYDataset dataset,
boolean legend) {
ValueAxis timeAxis = new DateAxis(timeAxisLabel);
NumberAxis valueAxis = new NumberAxis(valueAxisLabel);
valueAxis.setAutoRangeIncludesZero(false);
XYBoxAndWhiskerRenderer renderer = new XYBoxAndWhiskerRenderer(10.0);
XYPlot plot = new XYPlot(dataset, timeAxis, valueAxis, renderer);
return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot,
legend);
}
示例4: createBoxAndWhiskerChart
import org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer; //导入依赖的package包/类
/**
* Creates and returns a default instance of a box and whisker chart.
*
* @param title the chart title (<code>null</code> permitted).
* @param timeAxisLabel a label for the time axis (<code>null</code>
* permitted).
* @param valueAxisLabel a label for the value axis (<code>null</code>
* permitted).
* @param dataset the dataset for the chart (<code>null</code> permitted).
* @param legend a flag specifying whether or not a legend is required.
*
* @return A box and whisker chart.
*/
public static JFreeChart createBoxAndWhiskerChart(String title,
String timeAxisLabel, String valueAxisLabel,
BoxAndWhiskerXYDataset dataset, boolean legend) {
ValueAxis timeAxis = new DateAxis(timeAxisLabel);
NumberAxis valueAxis = new NumberAxis(valueAxisLabel);
valueAxis.setAutoRangeIncludesZero(false);
XYBoxAndWhiskerRenderer renderer = new XYBoxAndWhiskerRenderer(10.0);
XYPlot plot = new XYPlot(dataset, timeAxis, valueAxis, renderer);
JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
plot, legend);
currentTheme.apply(chart);
return chart;
}
示例5: createBoxAndWhiskerChart
import org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer; //导入依赖的package包/类
/**
* Creates and returns a default instance of a box and whisker chart.
*
* @param title the chart title ({@code null} permitted).
* @param timeAxisLabel a label for the time axis ({@code null}
* permitted).
* @param valueAxisLabel a label for the value axis ({@code null}
* permitted).
* @param dataset the dataset for the chart ({@code null} permitted).
* @param legend a flag specifying whether or not a legend is required.
*
* @return A box and whisker chart.
*/
public static JFreeChart createBoxAndWhiskerChart(String title,
String timeAxisLabel, String valueAxisLabel,
BoxAndWhiskerXYDataset dataset, boolean legend) {
ValueAxis timeAxis = new DateAxis(timeAxisLabel);
NumberAxis valueAxis = new NumberAxis(valueAxisLabel);
valueAxis.setAutoRangeIncludesZero(false);
XYBoxAndWhiskerRenderer renderer = new XYBoxAndWhiskerRenderer(10.0);
XYPlot plot = new XYPlot(dataset, timeAxis, valueAxis, renderer);
JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
plot, legend);
currentTheme.apply(chart);
return chart;
}
示例6: createBoxAndWhiskerChart
import org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer; //导入依赖的package包/类
/**
* Creates and returns a default instance of a box and whisker chart.
*
* @param title the chart title (<code>null</code> permitted).
* @param timeAxisLabel a label for the time axis (<code>null</code>
* permitted).
* @param valueAxisLabel a label for the value axis (<code>null</code>
* permitted).
* @param dataset the dataset for the chart (<code>null</code> permitted).
* @param legend a flag specifying whether or not a legend is required.
*
* @return A box and whisker chart.
*/
public static JFreeChart createBoxAndWhiskerChart(String title,
String timeAxisLabel,
String valueAxisLabel,
BoxAndWhiskerXYDataset dataset,
boolean legend) {
ValueAxis timeAxis = new DateAxis(timeAxisLabel);
NumberAxis valueAxis = new NumberAxis(valueAxisLabel);
valueAxis.setAutoRangeIncludesZero(false);
XYBoxAndWhiskerRenderer renderer = new XYBoxAndWhiskerRenderer(10.0);
XYPlot plot = new XYPlot(dataset, timeAxis, valueAxis, renderer);
JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
plot, legend);
currentTheme.apply(chart);
return chart;
}
示例7: testEquals
import org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer; //导入依赖的package包/类
/**
* Problem that the equals(...) method distinguishes all fields.
*/
public void testEquals() {
XYBoxAndWhiskerRenderer r1 = new XYBoxAndWhiskerRenderer();
XYBoxAndWhiskerRenderer r2 = new XYBoxAndWhiskerRenderer();
assertEquals(r1, r2);
r1.setPaint(Color.yellow);
assertFalse(r1.equals(r2));
r2.setPaint(Color.yellow);
assertEquals(r1, r2);
r1.setArtifactPaint(Color.yellow);
assertFalse(r1.equals(r2));
r2.setArtifactPaint(Color.yellow);
assertEquals(r1, r2);
r1.setBoxWidth(0.55);
assertFalse(r1.equals(r2));
r2.setBoxWidth(0.55);
assertEquals(r1, r2);
r1.setFillBox(!r1.getFillBox());
assertFalse(r1.equals(r2));
r2.setFillBox(!r2.getFillBox());
assertEquals(r1, r2);
}
示例8: testHashcode
import org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer; //导入依赖的package包/类
/**
* Two objects that are equal are required to return the same hashCode.
*/
public void testHashcode() {
XYBoxAndWhiskerRenderer r1 = new XYBoxAndWhiskerRenderer();
XYBoxAndWhiskerRenderer r2 = new XYBoxAndWhiskerRenderer();
assertTrue(r1.equals(r2));
int h1 = r1.hashCode();
int h2 = r2.hashCode();
assertEquals(h1, h2);
}
示例9: testEquals
import org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer; //导入依赖的package包/类
/**
* Check that the equals() method distinguishes all fields.
*/
public void testEquals() {
XYBoxAndWhiskerRenderer r1 = new XYBoxAndWhiskerRenderer();
XYBoxAndWhiskerRenderer r2 = new XYBoxAndWhiskerRenderer();
assertEquals(r1, r2);
r1.setArtifactPaint(new GradientPaint(1.0f, 2.0f, Color.green,
3.0f, 4.0f, Color.red));
assertFalse(r1.equals(r2));
r2.setArtifactPaint(new GradientPaint(1.0f, 2.0f, Color.green,
3.0f, 4.0f, Color.red));
assertEquals(r1, r2);
r1.setBoxWidth(0.55);
assertFalse(r1.equals(r2));
r2.setBoxWidth(0.55);
assertEquals(r1, r2);
r1.setFillBox(!r1.getFillBox());
assertFalse(r1.equals(r2));
r2.setFillBox(!r2.getFillBox());
assertEquals(r1, r2);
r1.setBoxPaint(Color.yellow);
assertFalse(r1.equals(r2));
r2.setBoxPaint(Color.yellow);
assertEquals(r1, r2);
// check boxPaint null also
r1.setBoxPaint(null);
assertFalse(r1.equals(r2));
r2.setBoxPaint(null);
assertEquals(r1, r2);
}
示例10: testHashcode
import org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer; //导入依赖的package包/类
/**
* Two objects that are equal are required to return the same hashCode.
*/
public void testHashcode() {
XYBoxAndWhiskerRenderer r1 = new XYBoxAndWhiskerRenderer();
XYBoxAndWhiskerRenderer r2 = new XYBoxAndWhiskerRenderer();
assertTrue(r1.equals(r2));
int h1 = r1.hashCode();
int h2 = r2.hashCode();
assertEquals(h1, h2);
}
示例11: testPublicCloneable
import org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer; //导入依赖的package包/类
/**
* Verify that this class implements {@link PublicCloneable}.
*/
public void testPublicCloneable() {
XYBoxAndWhiskerRenderer r1 = new XYBoxAndWhiskerRenderer();
assertTrue(r1 instanceof PublicCloneable);
}