org.jfree.chart.urls.TimeSeriesURLGenerator Java Examples

The following examples show how to use org.jfree.chart.urls.TimeSeriesURLGenerator. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XYLineAndShapeRendererTest.java    From openstock with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Test that the equals() method works for a TimeSeriesURLGenerator.
 */
@Test
public void testEquals2() {
    XYLineAndShapeRenderer r1 = new XYLineAndShapeRenderer();
    XYLineAndShapeRenderer r2 = new XYLineAndShapeRenderer();
    assertEquals(r1, r2);
    assertEquals(r2, r1);

    r1.setURLGenerator(new TimeSeriesURLGenerator());
    assertFalse(r1.equals(r2));
    r2.setURLGenerator(new TimeSeriesURLGenerator());
    assertTrue(r1.equals(r2));
}
 
Example #2
Source File: XYLineAndShapeRendererTest.java    From ccu-historian with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Test that the equals() method works for a TimeSeriesURLGenerator.
 */
@Test
public void testEquals2() {
    XYLineAndShapeRenderer r1 = new XYLineAndShapeRenderer();
    XYLineAndShapeRenderer r2 = new XYLineAndShapeRenderer();
    assertEquals(r1, r2);
    assertEquals(r2, r1);

    r1.setURLGenerator(new TimeSeriesURLGenerator());
    assertFalse(r1.equals(r2));
    r2.setURLGenerator(new TimeSeriesURLGenerator());
    assertTrue(r1.equals(r2));
}
 
Example #3
Source File: XYLineAndShapeRendererTest.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
/**
 * Test that the equals() method works for a TimeSeriesURLGenerator.
 */
@Test
public void testEquals2() {
    XYLineAndShapeRenderer r1 = new XYLineAndShapeRenderer();
    XYLineAndShapeRenderer r2 = new XYLineAndShapeRenderer();
    assertEquals(r1, r2);
    assertEquals(r2, r1);

    r1.setURLGenerator(new TimeSeriesURLGenerator());
    assertFalse(r1.equals(r2));
    r2.setURLGenerator(new TimeSeriesURLGenerator());
    assertTrue(r1.equals(r2));
}
 
Example #4
Source File: XYLineAndShapeRendererTest.java    From ECG-Viewer with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Test that the equals() method works for a TimeSeriesURLGenerator.
 */
@Test
public void testEquals2() {
    XYLineAndShapeRenderer r1 = new XYLineAndShapeRenderer();
    XYLineAndShapeRenderer r2 = new XYLineAndShapeRenderer();
    assertEquals(r1, r2);
    assertEquals(r2, r1);

    r1.setURLGenerator(new TimeSeriesURLGenerator());
    assertFalse(r1.equals(r2));
    r2.setURLGenerator(new TimeSeriesURLGenerator());
    assertTrue(r1.equals(r2));
}
 
Example #5
Source File: XYLineAndShapeRendererTests.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Test that the equals() method works for a TimeSeriesURLGenerator.
 */
public void testEquals2() {
    XYLineAndShapeRenderer r1 = new XYLineAndShapeRenderer();
    XYLineAndShapeRenderer r2 = new XYLineAndShapeRenderer();
    assertEquals(r1, r2);
    assertEquals(r2, r1);

    r1.setBaseURLGenerator(new TimeSeriesURLGenerator());
    assertFalse(r1.equals(r2));
    r2.setBaseURLGenerator(new TimeSeriesURLGenerator());
    assertTrue(r1.equals(r2));
}
 
Example #6
Source File: TimeSeriesURLGeneratorTests.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * A basic check for the generateURL() method.
 */
public void testGenerateURL() {
    TimeSeriesURLGenerator g = new TimeSeriesURLGenerator();
    DefaultXYDataset dataset = new DefaultXYDataset();
    dataset.addSeries("Series '1'", new double[][] {{1.0, 2.0},
            {3.0, 4.0}});
    String s = g.generateURL(dataset, 0, 0);
    assertTrue(s.startsWith("index.html?series=Series+%271%27&item="));
}
 
Example #7
Source File: XYLineAndShapeRendererTests.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Test that the equals() method works for a TimeSeriesURLGenerator.
 */
public void testEquals2() {
    XYLineAndShapeRenderer r1 = new XYLineAndShapeRenderer();
    XYLineAndShapeRenderer r2 = new XYLineAndShapeRenderer();
    assertEquals(r1, r2);
    assertEquals(r2, r1);

    r1.setBaseURLGenerator(new TimeSeriesURLGenerator());
    assertFalse(r1.equals(r2));
    r2.setBaseURLGenerator(new TimeSeriesURLGenerator());
    assertTrue(r1.equals(r2));
}
 
Example #8
Source File: TimeSeriesURLGeneratorTests.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * A basic check for the generateURL() method.
 */
public void testGenerateURL() {
    TimeSeriesURLGenerator g = new TimeSeriesURLGenerator();
    DefaultXYDataset dataset = new DefaultXYDataset();
    dataset.addSeries("Series '1'", new double[][] { {1.0, 2.0}, 
            {3.0, 4.0}});
    String s = g.generateURL(dataset, 0, 0);
    assertTrue(s.startsWith("index.html?series=Series+%271%27&item="));
}
 
Example #9
Source File: XYLineAndShapeRendererTest.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Test that the equals() method works for a TimeSeriesURLGenerator.
 */
@Test
public void testEquals2() {
    XYLineAndShapeRenderer r1 = new XYLineAndShapeRenderer();
    XYLineAndShapeRenderer r2 = new XYLineAndShapeRenderer();
    assertEquals(r1, r2);
    assertEquals(r2, r1);

    r1.setURLGenerator(new TimeSeriesURLGenerator());
    assertFalse(r1.equals(r2));
    r2.setURLGenerator(new TimeSeriesURLGenerator());
    assertTrue(r1.equals(r2));
}
 
Example #10
Source File: TimeSeriesURLGeneratorTests.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Checks that the class does not implement PublicCloneable (the generator
 * is immutable).
 */
public void testPublicCloneable() {
    TimeSeriesURLGenerator g1 = new TimeSeriesURLGenerator();
    assertFalse(g1 instanceof PublicCloneable);
}