本文整理汇总了Java中org.jfree.chart.plot.dial.StandardDialFrame.setForegroundPaint方法的典型用法代码示例。如果您正苦于以下问题:Java StandardDialFrame.setForegroundPaint方法的具体用法?Java StandardDialFrame.setForegroundPaint怎么用?Java StandardDialFrame.setForegroundPaint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.chart.plot.dial.StandardDialFrame
的用法示例。
在下文中一共展示了StandardDialFrame.setForegroundPaint方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testEquals
import org.jfree.chart.plot.dial.StandardDialFrame; //导入方法依赖的package包/类
/**
* Confirm that the equals method can distinguish all the required fields.
*/
public void testEquals() {
StandardDialFrame f1 = new StandardDialFrame();
StandardDialFrame f2 = new StandardDialFrame();
assertTrue(f1.equals(f2));
// radius
f1.setRadius(0.2);
assertFalse(f1.equals(f2));
f2.setRadius(0.2);
assertTrue(f1.equals(f2));
// backgroundPaint
f1.setBackgroundPaint(new GradientPaint(1.0f, 2.0f, Color.white, 3.0f,
4.0f, Color.yellow));
assertFalse(f1.equals(f2));
f2.setBackgroundPaint(new GradientPaint(1.0f, 2.0f, Color.white, 3.0f,
4.0f, Color.yellow));
assertTrue(f1.equals(f2));
// foregroundPaint
f1.setForegroundPaint(new GradientPaint(1.0f, 2.0f, Color.blue, 3.0f,
4.0f, Color.green));
assertFalse(f1.equals(f2));
f2.setForegroundPaint(new GradientPaint(1.0f, 2.0f, Color.blue, 3.0f,
4.0f, Color.green));
assertTrue(f1.equals(f2));
// stroke
f1.setStroke(new BasicStroke(2.4f));
assertFalse(f1.equals(f2));
f2.setStroke(new BasicStroke(2.4f));
assertTrue(f1.equals(f2));
// check an inherited attribute
f1.setVisible(false);
assertFalse(f1.equals(f2));
f2.setVisible(false);
assertTrue(f1.equals(f2));
}