本文整理汇总了Java中org.jfree.chart.axis.CyclicNumberAxis类的典型用法代码示例。如果您正苦于以下问题:Java CyclicNumberAxis类的具体用法?Java CyclicNumberAxis怎么用?Java CyclicNumberAxis使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CyclicNumberAxis类属于org.jfree.chart.axis包,在下文中一共展示了CyclicNumberAxis类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testHashCode
import org.jfree.chart.axis.CyclicNumberAxis; //导入依赖的package包/类
/**
* Two objects that are equal are required to return the same hashCode.
*/
public void testHashCode() {
CyclicNumberAxis a1 = new CyclicNumberAxis(10, 0, "Test");
CyclicNumberAxis a2 = new CyclicNumberAxis(10, 0, "Test");
assertTrue(a1.equals(a2));
int h1 = a1.hashCode();
int h2 = a2.hashCode();
assertEquals(h1, h2);
}
示例2: testHashCode
import org.jfree.chart.axis.CyclicNumberAxis; //导入依赖的package包/类
/**
* Two objects that are equal are required to return the same hashCode.
*/
public void testHashCode() {
CyclicNumberAxis a1 = new CyclicNumberAxis(10, 0, "Test");
CyclicNumberAxis a2 = new CyclicNumberAxis(10, 0, "Test");
assertTrue(a1.equals(a2));
int h1 = a1.hashCode();
int h2 = a2.hashCode();
assertEquals(h1, h2);
}
示例3: testEquals
import org.jfree.chart.axis.CyclicNumberAxis; //导入依赖的package包/类
/**
* Confirm that the equals method can distinguish all the required fields.
*/
public void testEquals() {
// Test the overloading didn't mess with parent
super.testEquals();
CyclicNumberAxis a1 = new CyclicNumberAxis(10, 0, "Test");
CyclicNumberAxis a2 = new CyclicNumberAxis(10, 0, "Test");
assertTrue(a1.equals(a2));
// period
a1.setPeriod(5);
assertFalse(a1.equals(a2));
a2.setPeriod(5);
assertTrue(a1.equals(a2));
// offset
a1.setOffset(2.0);
assertFalse(a1.equals(a2));
a2.setOffset(2.0);
assertTrue(a1.equals(a2));
// advance line Paint
a1.setAdvanceLinePaint(Color.cyan);
assertFalse(a1.equals(a2));
a2.setAdvanceLinePaint(Color.cyan);
assertTrue(a1.equals(a2));
// advance line Stroke
Stroke stroke = new BasicStroke(0.2f);
a1.setAdvanceLineStroke(stroke);
assertFalse(a1.equals(a2));
a2.setAdvanceLineStroke(stroke);
assertTrue(a1.equals(a2));
// advance line Visible
a1.setAdvanceLineVisible(!a1.isAdvanceLineVisible());
assertFalse(a1.equals(a2));
a2.setAdvanceLineVisible(a1.isAdvanceLineVisible());
assertTrue(a1.equals(a2));
// cycle bound mapping
a1.setBoundMappedToLastCycle(!a1.isBoundMappedToLastCycle());
assertFalse(a1.equals(a2));
a2.setBoundMappedToLastCycle(a1.isBoundMappedToLastCycle());
assertTrue(a1.equals(a2));
}
示例4: testEquals
import org.jfree.chart.axis.CyclicNumberAxis; //导入依赖的package包/类
/**
* Confirm that the equals method can distinguish all the required fields.
*/
public void testEquals() {
CyclicNumberAxis a1 = new CyclicNumberAxis(10, 0, "Test");
CyclicNumberAxis a2 = new CyclicNumberAxis(10, 0, "Test");
assertTrue(a1.equals(a2));
// period
a1.setPeriod(5);
assertFalse(a1.equals(a2));
a2.setPeriod(5);
assertTrue(a1.equals(a2));
// offset
a1.setOffset(2.0);
assertFalse(a1.equals(a2));
a2.setOffset(2.0);
assertTrue(a1.equals(a2));
// advance line Paint
a1.setAdvanceLinePaint(new GradientPaint(1.0f, 2.0f, Color.red,
3.0f, 4.0f, Color.black));
assertFalse(a1.equals(a2));
a2.setAdvanceLinePaint(new GradientPaint(1.0f, 2.0f, Color.red,
3.0f, 4.0f, Color.black));
assertTrue(a1.equals(a2));
// advance line Stroke
Stroke stroke = new BasicStroke(0.2f);
a1.setAdvanceLineStroke(stroke);
assertFalse(a1.equals(a2));
a2.setAdvanceLineStroke(stroke);
assertTrue(a1.equals(a2));
// advance line Visible
a1.setAdvanceLineVisible(!a1.isAdvanceLineVisible());
assertFalse(a1.equals(a2));
a2.setAdvanceLineVisible(a1.isAdvanceLineVisible());
assertTrue(a1.equals(a2));
// cycle bound mapping
a1.setBoundMappedToLastCycle(!a1.isBoundMappedToLastCycle());
assertFalse(a1.equals(a2));
a2.setBoundMappedToLastCycle(a1.isBoundMappedToLastCycle());
assertTrue(a1.equals(a2));
}
示例5: testEquals
import org.jfree.chart.axis.CyclicNumberAxis; //导入依赖的package包/类
/**
* Confirm that the equals method can distinguish all the required fields.
*/
public void testEquals() {
CyclicNumberAxis a1 = new CyclicNumberAxis(10, 0, "Test");
CyclicNumberAxis a2 = new CyclicNumberAxis(10, 0, "Test");
assertTrue(a1.equals(a2));
// period
a1.setPeriod(5);
assertFalse(a1.equals(a2));
a2.setPeriod(5);
assertTrue(a1.equals(a2));
// offset
a1.setOffset(2.0);
assertFalse(a1.equals(a2));
a2.setOffset(2.0);
assertTrue(a1.equals(a2));
// advance line Paint
a1.setAdvanceLinePaint(new GradientPaint(1.0f, 2.0f, Color.red,
3.0f, 4.0f, Color.black));
assertFalse(a1.equals(a2));
a2.setAdvanceLinePaint(new GradientPaint(1.0f, 2.0f, Color.red,
3.0f, 4.0f, Color.black));
assertTrue(a1.equals(a2));
// advance line Stroke
Stroke stroke = new BasicStroke(0.2f);
a1.setAdvanceLineStroke(stroke);
assertFalse(a1.equals(a2));
a2.setAdvanceLineStroke(stroke);
assertTrue(a1.equals(a2));
// advance line Visible
a1.setAdvanceLineVisible(!a1.isAdvanceLineVisible());
assertFalse(a1.equals(a2));
a2.setAdvanceLineVisible(a1.isAdvanceLineVisible());
assertTrue(a1.equals(a2));
// cycle bound mapping
a1.setBoundMappedToLastCycle(!a1.isBoundMappedToLastCycle());
assertFalse(a1.equals(a2));
a2.setBoundMappedToLastCycle(a1.isBoundMappedToLastCycle());
assertTrue(a1.equals(a2));
}