当前位置: 首页>>代码示例>>Java>>正文


Java CyclicNumberAxis类代码示例

本文整理汇总了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);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:12,代码来源:CyclicNumberAxisTests.java

示例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);
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:12,代码来源:CyclicNumberAxisTests.java

示例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));
    
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:51,代码来源:CyclicNumberAxisTests.java

示例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));
    
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:50,代码来源:CyclicNumberAxisTests.java

示例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));

}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:50,代码来源:CyclicNumberAxisTests.java


注:本文中的org.jfree.chart.axis.CyclicNumberAxis类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。