本文整理汇总了Java中org.jfree.chart.renderer.GrayPaintScale类的典型用法代码示例。如果您正苦于以下问题:Java GrayPaintScale类的具体用法?Java GrayPaintScale怎么用?Java GrayPaintScale使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GrayPaintScale类属于org.jfree.chart.renderer包,在下文中一共展示了GrayPaintScale类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: testHashcode
import org.jfree.chart.renderer.GrayPaintScale; //导入依赖的package包/类
/**
* Two objects that are equal are required to return the same hashCode.
*/
public void testHashcode() {
PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
new NumberAxis("X"));
PaintScaleLegend l2 = new PaintScaleLegend(new GrayPaintScale(),
new NumberAxis("X"));
assertTrue(l1.equals(l2));
int h1 = l1.hashCode();
int h2 = l2.hashCode();
assertEquals(h1, h2);
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:14,代码来源:PaintScaleLegendTests.java
示例2: testEquals
import org.jfree.chart.renderer.GrayPaintScale; //导入依赖的package包/类
/**
* Test that the equals() method distinguishes all fields.
*/
public void testEquals() {
// default instances
XYBlockRenderer r1 = new XYBlockRenderer();
XYBlockRenderer r2 = new XYBlockRenderer();
assertTrue(r1.equals(r2));
assertTrue(r2.equals(r1));
// blockHeight
r1.setBlockHeight(2.0);
assertFalse(r1.equals(r2));
r2.setBlockHeight(2.0);
assertTrue(r1.equals(r2));
// blockWidth
r1.setBlockWidth(2.0);
assertFalse(r1.equals(r2));
r2.setBlockWidth(2.0);
assertTrue(r1.equals(r2));
// paintScale
r1.setPaintScale(new GrayPaintScale(0.0, 1.0));
assertFalse(r1.equals(r2));
r2.setPaintScale(new GrayPaintScale(0.0, 1.0));
assertTrue(r1.equals(r2));
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:31,代码来源:XYBlockRendererTests.java
示例3: testHashcode
import org.jfree.chart.renderer.GrayPaintScale; //导入依赖的package包/类
/**
* Two objects that are equal are required to return the same hashCode.
*/
@Test
public void testHashcode() {
PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
new NumberAxis("X"));
PaintScaleLegend l2 = new PaintScaleLegend(new GrayPaintScale(),
new NumberAxis("X"));
assertTrue(l1.equals(l2));
int h1 = l1.hashCode();
int h2 = l2.hashCode();
assertEquals(h1, h2);
}
开发者ID:mdzio,项目名称:ccu-historian,代码行数:15,代码来源:PaintScaleLegendTest.java
示例4: testCloning
import org.jfree.chart.renderer.GrayPaintScale; //导入依赖的package包/类
/**
* Confirm that cloning works.
*/
@Test
public void testCloning() throws CloneNotSupportedException {
PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
new NumberAxis("X"));
PaintScaleLegend l2 = (PaintScaleLegend) l1.clone();
assertTrue(l1 != l2);
assertTrue(l1.getClass() == l2.getClass());
assertTrue(l1.equals(l2));
}
开发者ID:mdzio,项目名称:ccu-historian,代码行数:13,代码来源:PaintScaleLegendTest.java
示例5: testSerialization
import org.jfree.chart.renderer.GrayPaintScale; //导入依赖的package包/类
/**
* Serialize an instance, restore it, and check for equality.
*/
@Test
public void testSerialization() {
PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
new NumberAxis("X"));
PaintScaleLegend l2 = (PaintScaleLegend) TestUtilities.serialised(l1);
assertEquals(l1, l2);
}
开发者ID:mdzio,项目名称:ccu-historian,代码行数:11,代码来源:PaintScaleLegendTest.java
示例6: testEquals
import org.jfree.chart.renderer.GrayPaintScale; //导入依赖的package包/类
/**
* Test that the equals() method distinguishes all fields.
*/
@Test
public void testEquals() {
// default instances
XYBlockRenderer r1 = new XYBlockRenderer();
XYBlockRenderer r2 = new XYBlockRenderer();
assertTrue(r1.equals(r2));
assertTrue(r2.equals(r1));
// blockHeight
r1.setBlockHeight(2.0);
assertFalse(r1.equals(r2));
r2.setBlockHeight(2.0);
assertTrue(r1.equals(r2));
// blockWidth
r1.setBlockWidth(2.0);
assertFalse(r1.equals(r2));
r2.setBlockWidth(2.0);
assertTrue(r1.equals(r2));
// paintScale
r1.setPaintScale(new GrayPaintScale(0.0, 1.0));
assertFalse(r1.equals(r2));
r2.setPaintScale(new GrayPaintScale(0.0, 1.0));
assertTrue(r1.equals(r2));
}
开发者ID:mdzio,项目名称:ccu-historian,代码行数:32,代码来源:XYBlockRendererTest.java
示例7: testSerialization
import org.jfree.chart.renderer.GrayPaintScale; //导入依赖的package包/类
/**
* Serialize an instance, restore it, and check for equality.
*/
@Test
public void testSerialization() {
PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
new NumberAxis("X"));
PaintScaleLegend l2 = (PaintScaleLegend) TestUtils.serialised(l1);
assertEquals(l1, l2);
}
开发者ID:jfree,项目名称:jfreechart,代码行数:11,代码来源:PaintScaleLegendTest.java
示例8: testHashcode
import org.jfree.chart.renderer.GrayPaintScale; //导入依赖的package包/类
/**
* Two objects that are equal are required to return the same hashCode.
*/
public void testHashcode() {
PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
new NumberAxis("X"));
PaintScaleLegend l2 = new PaintScaleLegend(new GrayPaintScale(),
new NumberAxis("X"));
assertTrue(l1.equals(l2));
int h1 = l1.hashCode();
int h2 = l2.hashCode();
assertEquals(h1, h2);
}
开发者ID:SpoonLabs,项目名称:astor,代码行数:14,代码来源:PaintScaleLegendTests.java
示例9: testConstructor
import org.jfree.chart.renderer.GrayPaintScale; //导入依赖的package包/类
/**
* Simple check for the default constructor.
*/
public void testConstructor() {
GrayPaintScale gps = new GrayPaintScale();
assertEquals(0.0, gps.getLowerBound(), EPSILON);
assertEquals(1.0, gps.getUpperBound(), EPSILON);
assertEquals(255, gps.getAlpha());
}
开发者ID:SpoonLabs,项目名称:astor,代码行数:10,代码来源:GrayPaintScaleTests.java
示例10: testGetPaint
import org.jfree.chart.renderer.GrayPaintScale; //导入依赖的package包/类
/**
* Some checks for the getPaint() method.
*/
public void testGetPaint() {
GrayPaintScale gps = new GrayPaintScale();
Color c = (Color) gps.getPaint(0.0);
assertTrue(c.equals(Color.black));
c = (Color) gps.getPaint(1.0);
assertTrue(c.equals(Color.white));
// check lookup values that are outside the bounds - see bug report
// 1767315
c = (Color) gps.getPaint(-0.5);
assertTrue(c.equals(Color.black));
c = (Color) gps.getPaint(1.5);
assertTrue(c.equals(Color.white));
}
开发者ID:SpoonLabs,项目名称:astor,代码行数:18,代码来源:GrayPaintScaleTests.java
示例11: testEquals
import org.jfree.chart.renderer.GrayPaintScale; //导入依赖的package包/类
/**
* Test that the equals() method distinguishes all fields.
*/
public void testEquals() {
// default instances
XYBlockRenderer r1 = new XYBlockRenderer();
XYBlockRenderer r2 = new XYBlockRenderer();
assertTrue(r1.equals(r2));
assertTrue(r2.equals(r1));
// blockHeight
r1.setBlockHeight(2.0);
assertFalse(r1.equals(r2));
r2.setBlockHeight(2.0);
assertTrue(r1.equals(r2));
// blockWidth
r1.setBlockWidth(2.0);
assertFalse(r1.equals(r2));
r2.setBlockWidth(2.0);
assertTrue(r1.equals(r2));
// paintScale
r1.setPaintScale(new GrayPaintScale(0.0, 1.0));
assertFalse(r1.equals(r2));
r2.setPaintScale(new GrayPaintScale(0.0, 1.0));
assertTrue(r1.equals(r2));
}
开发者ID:SpoonLabs,项目名称:astor,代码行数:31,代码来源:XYBlockRendererTests.java
注:本文中的org.jfree.chart.renderer.GrayPaintScale类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论