Package plotter

Examples of plotter.LineChecker.require()


    line.setValue(.5);
    CountingGraphics g = paint();
    assertEquals(2, g.getPointCount());

    LineChecker c = new LineChecker();
    c.require(99, 0, 99, 200);
    c.check(g.getLines());
  }


  public void testPaintSimpleY() throws InterruptedException, InvocationTargetException {
View Full Code Here


    line.setValue(.5);
    CountingGraphics g = paint();
    assertEquals(2, g.getPointCount());

    LineChecker c = new LineChecker();
    c.require(0, 100, 200, 100);
    c.check(g.getLines());
  }


  public void testPaintClip() throws InterruptedException, InvocationTargetException {
View Full Code Here

  public void testPaintClipPartial() throws InterruptedException, InvocationTargetException {
    setupX();
    line.setValue(.5);
    CountingGraphics g = paint(new Rectangle(0, 49, 200, 100));
    LineChecker c = new LineChecker();
    c.require(99, 48, 99, 149);
    c.check(g.getLines());
  }


  public void testPaintClipPartialY() throws InterruptedException, InvocationTargetException {
View Full Code Here

  public void testPaintClipPartialY() throws InterruptedException, InvocationTargetException {
    setupY();
    line.setValue(.5);
    CountingGraphics g = paint(new Rectangle(49, 0, 100, 200));
    LineChecker c = new LineChecker();
    c.require(48, 100, 149, 100);
    c.check(g.getLines());
  }


  public void testPaintClipPartialCustomStroke() throws InterruptedException, InvocationTargetException {
View Full Code Here

    setupX();
    line.setStroke(new BasicStroke(1, 0, 0, 1, new float[] { 5, 5 }, 0));
    line.setValue(.5);
    CountingGraphics g = paint(new Rectangle(0, 49, 200, 100));
    LineChecker c = new LineChecker();
    c.require(99, 40, 99, 149);
    c.check(g.getLines());
  }


  public void testPaintClipPartialCustomStrokeY() throws InterruptedException, InvocationTargetException {
View Full Code Here

    setupY();
    line.setStroke(new BasicStroke(1, 0, 0, 1, new float[] { 5, 5 }, 0));
    line.setValue(.5);
    CountingGraphics g = paint(new Rectangle(49, 0, 100, 200));
    LineChecker c = new LineChecker();
    c.require(40, 100, 149, 100);
    c.check(g.getLines());
  }


  public void testPaintClipPartialNonBasicStroke() throws InterruptedException, InvocationTargetException {
View Full Code Here

      }
    });
    line.setValue(.5);
    CountingGraphics g = paint(new Rectangle(0, 49, 200, 100));
    LineChecker c = new LineChecker();
    c.require(99, 0, 99, 200);
    c.check(g.getLines());
  }


  public void testPaintClipPartialNonBasicStrokeY() throws InterruptedException, InvocationTargetException {
View Full Code Here

      }
    });
    line.setValue(.5);
    CountingGraphics g = paint(new Rectangle(49, 0, 100, 200));
    LineChecker c = new LineChecker();
    c.require(0, 100, 200, 100);
    c.check(g.getLines());
  }


  public void testRepaintTinyChange() {
View Full Code Here

    CountingGraphics g = new CountingGraphics(new BufferedImage(1000, 1000, BufferedImage.TYPE_3BYTE_BGR)
        .createGraphics());
    slopeLine.paintComponent(g);
    LineChecker lines = new LineChecker();
    lines.require(0, 50, 1000, 550);
    lines.check(g.getLines());

    MouseEvent release = new MouseEvent(contents, MouseEvent.MOUSE_RELEASED, System.currentTimeMillis(), 0, x3, y3,
        xAbs3, yAbs3, 1, false, MouseEvent.BUTTON1);
    slopeLine.mouseReleased(release);
View Full Code Here

    line.add(.1, .1);
    CountingGraphics g = paint(new Rectangle(44, 156, 10, 10));

    LineChecker c = new LineChecker();
    c.allow(19, 180, 39, 160);
    c.require(39, 160, 59, 140);
    c.allow(59, 140, 79, 120);
    c.check(g.getLines());
    assertEquals(g.getLines().size() + 1, g.getPointCount());
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.