@Override public boolean addNode(INode newNode, Point2D p) { INode foundNode = findNode(p); if (foundNode == null && (newNode.getClass().isAssignableFrom(ActivationBarNode.class) || newNode.getClass().isAssignableFrom(EndLifeNode.class))) { return false; } return super.addNode(newNode, p); }
@Override public Direction getDirection(INode node) { if (getStart() == getEnd()) { angle = 60; if (node.equals(getStart())) return Direction.EAST.turn(-30); if (node.equals(getEnd())) return Direction.EAST.turn(30); } angle = 10; return super.getDirection(node); }