Example #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;
 }
Example #2
0
 public void setStartCoordinate(Node startCoordinate)
 {
     this.startCoordinate = startCoordinate;
 }
Example #3
0
 public void setEndCoordinate(Node endCoordinate)
 {
     this.endCoordinate = endCoordinate;
 }
Example #4
0
 public Coordinates(Boolean edge, Node startCoordinate, Node endCoordinate)
 {
     this.setEdge(edge);
     this.setStartCoordinate(startCoordinate);
     this.setEndCoordinate(endCoordinate);
 }