예제 #1
0
 //получение координаты точки
 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;
 }
예제 #2
0
 public void setStartCoordinate(Node startCoordinate)
 {
     this.startCoordinate = startCoordinate;
 }
예제 #3
0
 public void setEndCoordinate(Node endCoordinate)
 {
     this.endCoordinate = endCoordinate;
 }
예제 #4
0
 public Coordinates(Boolean edge, Node startCoordinate, Node endCoordinate)
 {
     this.setEdge(edge);
     this.setStartCoordinate(startCoordinate);
     this.setEndCoordinate(endCoordinate);
 }