//получение координаты точки public Node getCoordinateDot(int numberDot) { Node coordinates=null; for (int y = 0; y < this.getSizeDecartGrafMatrixY(); y++) { for (int x = 0; x < this.getSizeDecartGrafMatrixX(); x++) { if (getElementDecartGraf(x, y) > 0) { if (getElementDecartGraf(x, y) == numberDot) { coordinates = new Node(x,y); break; } } } if (coordinates!=null) {break;} } return coordinates; }
public void setStartCoordinate(Node startCoordinate) { this.startCoordinate = startCoordinate; }
public void setEndCoordinate(Node endCoordinate) { this.endCoordinate = endCoordinate; }
public Coordinates(Boolean edge, Node startCoordinate, Node endCoordinate) { this.setEdge(edge); this.setStartCoordinate(startCoordinate); this.setEndCoordinate(endCoordinate); }