private Snake getSimpleSnake() { final Snake snake = new Snake(color, Arrows.asToDown()); snake.setLabel(textBlock); snake.addPoint(p1); snake.addPoint(p2); return snake; }
public void drawTranslate(UGraphic ug, UTranslate translate1, UTranslate translate2) { final Snake snake = new Snake(color, true); final Point2D mp1a = translate1.getTranslated(p1); final Point2D mp2b = translate2.getTranslated(p2); final double middle = (mp1a.getY() + mp2b.getY()) / 2.0; snake.addPoint(mp1a); snake.addPoint(mp1a.getX(), middle); snake.addPoint(mp2b.getX(), middle); // snake.addPoint(mp2b); ug.draw(snake); final Snake small = new Snake(color, Arrows.asToDown()); small.addPoint(mp2b.getX(), middle); small.addPoint(mp2b); ug.draw(small); }