本文整理汇总了Java中org.jfree.util.PaintList.setPaint方法的典型用法代码示例。如果您正苦于以下问题:Java PaintList.setPaint方法的具体用法?Java PaintList.setPaint怎么用?Java PaintList.setPaint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.util.PaintList
的用法示例。
在下文中一共展示了PaintList.setPaint方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testEquals
import org.jfree.util.PaintList; //导入方法依赖的package包/类
/**
* Tests the equals() method.
*/
public void testEquals() {
final PaintList l1 = new PaintList();
l1.setPaint(0, Color.red);
l1.setPaint(1, Color.blue);
l1.setPaint(2, null);
final PaintList l2 = new PaintList();
l2.setPaint(0, Color.red);
l2.setPaint(1, Color.blue);
l2.setPaint(2, null);
assertTrue(l1.equals(l2));
assertTrue(l2.equals(l2));
assertFalse(l1.equals("XYZ"));
}
示例2: testEquals2
import org.jfree.util.PaintList; //导入方法依赖的package包/类
/**
* Tests the equals method.
*/
public void testEquals2() {
// check two separate (but equal) colors
final PaintList l1 = new PaintList();
final Color color1 = new Color(200, 200, 200);
l1.setPaint(0, color1);
final PaintList l2 = new PaintList();
final Color color2 = new Color(200, 200, 200);
l2.setPaint(0, color2);
assertEquals(l1, l2);
}
示例3: testEquals3
import org.jfree.util.PaintList; //导入方法依赖的package包/类
/**
* Tests the equals() method when the list contains a GradientPaint
* instance.
*/
public void testEquals3() {
// check two separate (but equal) colors
PaintList l1 = new PaintList();
Paint p1 = new GradientPaint(1.0f, 2.0f, Color.red,
3.0f, 4.0f, Color.blue);
l1.setPaint(0, p1);
PaintList l2 = new PaintList();
Paint p2 = new GradientPaint(1.0f, 2.0f, Color.red,
3.0f, 4.0f, Color.blue);
l2.setPaint(0, p2);
assertEquals(l1, l2);
}
示例4: testEquals
import org.jfree.util.PaintList; //导入方法依赖的package包/类
/**
* Tests the equals() method.
*/
public void testEquals() {
final PaintList l1 = new PaintList();
l1.setPaint(0, Color.red);
l1.setPaint(1, Color.blue);
l1.setPaint(2, null);
final PaintList l2 = new PaintList();
l2.setPaint(0, Color.red);
l2.setPaint(1, Color.blue);
l2.setPaint(2, null);
assertTrue(l1.equals(l2));
assertTrue(l2.equals(l2));
}