本文整理汇总了Java中org.jfree.chart.renderer.category.MinMaxCategoryRenderer类的典型用法代码示例。如果您正苦于以下问题:Java MinMaxCategoryRenderer类的具体用法?Java MinMaxCategoryRenderer怎么用?Java MinMaxCategoryRenderer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MinMaxCategoryRenderer类属于org.jfree.chart.renderer.category包,在下文中一共展示了MinMaxCategoryRenderer类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testDrawWithNullInfo
import org.jfree.chart.renderer.category.MinMaxCategoryRenderer; //导入依赖的package包/类
/**
* Draws the chart with a <code>null</code> info object to make sure that
* no exceptions are thrown (particularly by code in the renderer).
*/
public void testDrawWithNullInfo() {
boolean success = false;
try {
DefaultCategoryDataset dataset = new DefaultCategoryDataset();
dataset.addValue(1.0, "S1", "C1");
CategoryPlot plot = new CategoryPlot(dataset,
new CategoryAxis("Category"), new NumberAxis("Value"),
new MinMaxCategoryRenderer());
JFreeChart chart = new JFreeChart(plot);
/* BufferedImage image = */ chart.createBufferedImage(300, 200,
null);
success = true;
}
catch (NullPointerException e) {
e.printStackTrace();
success = false;
}
assertTrue(success);
}
示例2: testEquals
import org.jfree.chart.renderer.category.MinMaxCategoryRenderer; //导入依赖的package包/类
/**
* Check that the equals() method distinguishes all fields.
*/
public void testEquals() {
MinMaxCategoryRenderer r1 = new MinMaxCategoryRenderer();
MinMaxCategoryRenderer r2 = new MinMaxCategoryRenderer();
assertEquals(r1, r2);
r1.setDrawLines(true);
assertFalse(r1.equals(r2));
r2.setDrawLines(true);
assertTrue(r1.equals(r2));
r1.setGroupPaint(new GradientPaint(1.0f, 2.0f, Color.red, 3.0f, 4.0f,
Color.yellow));
assertFalse(r1.equals(r2));
r2.setGroupPaint(new GradientPaint(1.0f, 2.0f, Color.red, 3.0f, 4.0f,
Color.yellow));
assertTrue(r1.equals(r2));
r1.setGroupStroke(new BasicStroke(1.2f));
assertFalse(r1.equals(r2));
r2.setGroupStroke(new BasicStroke(1.2f));
assertTrue(r1.equals(r2));
}
示例3: testDrawWithNullInfo
import org.jfree.chart.renderer.category.MinMaxCategoryRenderer; //导入依赖的package包/类
/**
* Draws the chart with a <code>null</code> info object to make sure that
* no exceptions are thrown (particularly by code in the renderer).
*/
public void testDrawWithNullInfo() {
boolean success = false;
try {
DefaultCategoryDataset dataset = new DefaultCategoryDataset();
dataset.addValue(1.0, "S1", "C1");
CategoryPlot plot = new CategoryPlot(dataset,
new CategoryAxis("Category"), new NumberAxis("Value"),
new MinMaxCategoryRenderer());
JFreeChart chart = new JFreeChart(plot);
/* BufferedImage image = */ chart.createBufferedImage(300, 200,
null);
success = true;
}
catch (NullPointerException e) {
e.printStackTrace();
success = false;
}
assertTrue(success);
}
示例4: testHashcode
import org.jfree.chart.renderer.category.MinMaxCategoryRenderer; //导入依赖的package包/类
/**
* Two objects that are equal are required to return the same hashCode.
*/
public void testHashcode() {
MinMaxCategoryRenderer r1 = new MinMaxCategoryRenderer();
MinMaxCategoryRenderer r2 = new MinMaxCategoryRenderer();
assertTrue(r1.equals(r2));
int h1 = r1.hashCode();
int h2 = r2.hashCode();
assertEquals(h1, h2);
}
示例5: applyToCategoryItemRenderer
import org.jfree.chart.renderer.category.MinMaxCategoryRenderer; //导入依赖的package包/类
/**
* Applies the settings of this theme to the specified renderer.
*
* @param renderer the renderer ({@code null} not permitted).
*/
protected void applyToCategoryItemRenderer(CategoryItemRenderer renderer) {
Args.nullNotPermitted(renderer, "renderer");
if (renderer instanceof AbstractRenderer) {
applyToAbstractRenderer((AbstractRenderer) renderer);
}
renderer.setDefaultItemLabelFont(this.regularFont);
renderer.setDefaultItemLabelPaint(this.itemLabelPaint);
// now we handle some special cases - yes, UGLY code alert!
// BarRenderer
if (renderer instanceof BarRenderer) {
BarRenderer br = (BarRenderer) renderer;
br.setBarPainter(this.barPainter);
br.setShadowVisible(this.shadowVisible);
br.setShadowPaint(this.shadowPaint);
}
// StatisticalBarRenderer
if (renderer instanceof StatisticalBarRenderer) {
StatisticalBarRenderer sbr = (StatisticalBarRenderer) renderer;
sbr.setErrorIndicatorPaint(this.errorIndicatorPaint);
}
// MinMaxCategoryRenderer
if (renderer instanceof MinMaxCategoryRenderer) {
MinMaxCategoryRenderer mmcr = (MinMaxCategoryRenderer) renderer;
mmcr.setGroupPaint(this.errorIndicatorPaint);
}
}
示例6: testHashcode
import org.jfree.chart.renderer.category.MinMaxCategoryRenderer; //导入依赖的package包/类
/**
* Two objects that are equal are required to return the same hashCode.
*/
public void testHashcode() {
MinMaxCategoryRenderer r1 = new MinMaxCategoryRenderer();
MinMaxCategoryRenderer r2 = new MinMaxCategoryRenderer();
assertTrue(r1.equals(r2));
int h1 = r1.hashCode();
int h2 = r2.hashCode();
assertEquals(h1, h2);
}
示例7: testEquals
import org.jfree.chart.renderer.category.MinMaxCategoryRenderer; //导入依赖的package包/类
/**
* Problem that the equals(...) method distinguishes all fields.
*/
public void testEquals() {
MinMaxCategoryRenderer r1 = new MinMaxCategoryRenderer();
MinMaxCategoryRenderer r2 = new MinMaxCategoryRenderer();
assertEquals(r1, r2);
}
示例8: testEquals
import org.jfree.chart.renderer.category.MinMaxCategoryRenderer; //导入依赖的package包/类
/**
* Check that the equals() method distinguishes all fields.
*/
public void testEquals() {
MinMaxCategoryRenderer r1 = new MinMaxCategoryRenderer();
MinMaxCategoryRenderer r2 = new MinMaxCategoryRenderer();
assertEquals(r1, r2);
}
示例9: applyToCategoryItemRenderer
import org.jfree.chart.renderer.category.MinMaxCategoryRenderer; //导入依赖的package包/类
/**
* Applies the settings of this theme to the specified renderer.
*
* @param renderer the renderer (<code>null</code> not permitted).
*/
protected void applyToCategoryItemRenderer(CategoryItemRenderer renderer) {
ParamChecks.nullNotPermitted(renderer, "renderer");
if (renderer instanceof AbstractRenderer) {
applyToAbstractRenderer((AbstractRenderer) renderer);
}
renderer.setBaseItemLabelFont(this.regularFont);
renderer.setBaseItemLabelPaint(this.itemLabelPaint);
// now we handle some special cases - yes, UGLY code alert!
// BarRenderer
if (renderer instanceof BarRenderer) {
BarRenderer br = (BarRenderer) renderer;
br.setBarPainter(this.barPainter);
br.setShadowVisible(this.shadowVisible);
br.setShadowPaint(this.shadowPaint);
}
// BarRenderer3D
if (renderer instanceof BarRenderer3D) {
BarRenderer3D br3d = (BarRenderer3D) renderer;
br3d.setWallPaint(this.wallPaint);
}
// LineRenderer3D
if (renderer instanceof LineRenderer3D) {
LineRenderer3D lr3d = (LineRenderer3D) renderer;
lr3d.setWallPaint(this.wallPaint);
}
// StatisticalBarRenderer
if (renderer instanceof StatisticalBarRenderer) {
StatisticalBarRenderer sbr = (StatisticalBarRenderer) renderer;
sbr.setErrorIndicatorPaint(this.errorIndicatorPaint);
}
// MinMaxCategoryRenderer
if (renderer instanceof MinMaxCategoryRenderer) {
MinMaxCategoryRenderer mmcr = (MinMaxCategoryRenderer) renderer;
mmcr.setGroupPaint(this.errorIndicatorPaint);
}
}
示例10: applyToCategoryItemRenderer
import org.jfree.chart.renderer.category.MinMaxCategoryRenderer; //导入依赖的package包/类
/**
* Applies the settings of this theme to the specified renderer.
*
* @param renderer the renderer (<code>null</code> not permitted).
*/
protected void applyToCategoryItemRenderer(CategoryItemRenderer renderer) {
if (renderer == null) {
throw new IllegalArgumentException("Null 'renderer' argument.");
}
if (renderer instanceof AbstractRenderer) {
applyToAbstractRenderer((AbstractRenderer) renderer);
}
renderer.setBaseItemLabelFont(this.regularFont);
renderer.setBaseItemLabelPaint(this.itemLabelPaint);
// now we handle some special cases - yes, UGLY code alert!
// BarRenderer
if (renderer instanceof BarRenderer) {
BarRenderer br = (BarRenderer) renderer;
br.setBarPainter(this.barPainter);
br.setShadowVisible(this.shadowVisible);
br.setShadowPaint(this.shadowPaint);
}
// BarRenderer3D
if (renderer instanceof BarRenderer3D) {
BarRenderer3D br3d = (BarRenderer3D) renderer;
br3d.setWallPaint(this.wallPaint);
}
// LineRenderer3D
if (renderer instanceof LineRenderer3D) {
LineRenderer3D lr3d = (LineRenderer3D) renderer;
lr3d.setWallPaint(this.wallPaint);
}
// StatisticalBarRenderer
if (renderer instanceof StatisticalBarRenderer) {
StatisticalBarRenderer sbr = (StatisticalBarRenderer) renderer;
sbr.setErrorIndicatorPaint(this.errorIndicatorPaint);
}
// MinMaxCategoryRenderer
if (renderer instanceof MinMaxCategoryRenderer) {
MinMaxCategoryRenderer mmcr = (MinMaxCategoryRenderer) renderer;
mmcr.setGroupPaint(this.errorIndicatorPaint);
}
}
示例11: testPublicCloneable
import org.jfree.chart.renderer.category.MinMaxCategoryRenderer; //导入依赖的package包/类
/**
* Check that this class implements PublicCloneable.
*/
public void testPublicCloneable() {
MinMaxCategoryRenderer r1 = new MinMaxCategoryRenderer();
assertTrue(r1 instanceof PublicCloneable);
}