Java 类org.jfree.chart.title.ImageTitle 实例源码

项目:astor    文件:ImageTitleTests.java   
/**
 * Some checks for the arrange method.
 */
public void testArrangeNN() {
    BufferedImage image = new BufferedImage(100, 100,
            BufferedImage.TYPE_INT_RGB);
    Graphics2D g2 = image.createGraphics();
    ImageTitle t = new ImageTitle(JFreeChart.INFO.getLogo());
    Size2D s = t.arrange(g2);
    assertEquals(102.0, s.getWidth(), EPSILON);
    assertEquals(102.0, s.getHeight(), EPSILON);

    t.setPadding(1.0, 2.0, 3.0, 4.0);
    s = t.arrange(g2);
    assertEquals(106.0, s.getWidth(), EPSILON);
    assertEquals(104.0, s.getHeight(), EPSILON);

    t.setMargin(5.0, 6.0, 7.0, 8.0);
    s = t.arrange(g2);
    assertEquals(120.0, s.getWidth(), EPSILON);
    assertEquals(116.0, s.getHeight(), EPSILON);
}
项目:parabuild-ci    文件:ImageTitleTests.java   
/**
 * Two objects that are equal are required to return the same hashCode. 
 */
public void testHashcode() {
    ImageTitle t1 = new ImageTitle(JFreeChart.INFO.getLogo());
    ImageTitle t2 = new ImageTitle(JFreeChart.INFO.getLogo());
    assertTrue(t1.equals(t2));
    int h1 = t1.hashCode();
    int h2 = t2.hashCode();
    assertEquals(h1, h2);
}
项目:parabuild-ci    文件:ImageTitleTests.java   
/**
 * Two objects that are equal are required to return the same hashCode. 
 */
public void testHashcode() {
    ImageTitle t1 = new ImageTitle(JFreeChart.INFO.getLogo());
    ImageTitle t2 = new ImageTitle(JFreeChart.INFO.getLogo());
    assertTrue(t1.equals(t2));
    int h1 = t1.hashCode();
    int h2 = t2.hashCode();
    assertEquals(h1, h2);
}
项目:nabs    文件:ImageTitleTests.java   
/**
 * Two objects that are equal are required to return the same hashCode. 
 */
public void testHashcode() {
    ImageTitle t1 = new ImageTitle(JFreeChart.INFO.getLogo());
    ImageTitle t2 = new ImageTitle(JFreeChart.INFO.getLogo());
    assertTrue(t1.equals(t2));
    int h1 = t1.hashCode();
    int h2 = t2.hashCode();
    assertEquals(h1, h2);
}
项目:astor    文件:ImageTitleTests.java   
/**
 * Two objects that are equal are required to return the same hashCode.
 */
public void testHashcode() {
    ImageTitle t1 = new ImageTitle(JFreeChart.INFO.getLogo());
    ImageTitle t2 = new ImageTitle(JFreeChart.INFO.getLogo());
    assertTrue(t1.equals(t2));
    int h1 = t1.hashCode();
    int h2 = t2.hashCode();
    assertEquals(h1, h2);
}
项目:parabuild-ci    文件:ImageTitleTests.java   
/**
 * Problem that the equals(...) method distinguishes all fields.
 */
public void testEquals() {
    ImageTitle t1 = new ImageTitle(JFreeChart.INFO.getLogo());
    ImageTitle t2 = new ImageTitle(JFreeChart.INFO.getLogo());
    assertEquals(t1, t2);        
}
项目:parabuild-ci    文件:ImageTitleTests.java   
/**
 * Check that the equals() method distinguishes all fields.
 */
public void testEquals() {
    ImageTitle t1 = new ImageTitle(JFreeChart.INFO.getLogo());
    ImageTitle t2 = new ImageTitle(JFreeChart.INFO.getLogo());
    assertEquals(t1, t2);        
}
项目:parabuild-ci    文件:ImageTitleTests.java   
/**
 * Check the width and height.
 */
public void testWidthAndHeight() {
    ImageTitle t1 = new ImageTitle(JFreeChart.INFO.getLogo());
    assertEquals(100, t1.getWidth(), EPSILON);
    assertEquals(100, t1.getHeight(), EPSILON);
}
项目:nabs    文件:ImageTitleTests.java   
/**
 * Check that the equals() method distinguishes all fields.
 */
public void testEquals() {
    ImageTitle t1 = new ImageTitle(JFreeChart.INFO.getLogo());
    ImageTitle t2 = new ImageTitle(JFreeChart.INFO.getLogo());
    assertEquals(t1, t2);        
}
项目:nabs    文件:ImageTitleTests.java   
/**
 * Check the width and height.
 */
public void testWidthAndHeight() {
    ImageTitle t1 = new ImageTitle(JFreeChart.INFO.getLogo());
    assertEquals(100, t1.getWidth(), EPSILON);
    assertEquals(100, t1.getHeight(), EPSILON);
}
项目:astor    文件:ImageTitleTests.java   
/**
 * Check that the equals() method distinguishes all fields.
 */
public void testEquals() {
    ImageTitle t1 = new ImageTitle(JFreeChart.INFO.getLogo());
    ImageTitle t2 = new ImageTitle(JFreeChart.INFO.getLogo());
    assertEquals(t1, t2);
}
项目:astor    文件:ImageTitleTests.java   
/**
 * Check the width and height.
 */
public void testWidthAndHeight() {
    ImageTitle t1 = new ImageTitle(JFreeChart.INFO.getLogo());
    assertEquals(100, t1.getWidth(), EPSILON);
    assertEquals(100, t1.getHeight(), EPSILON);
}