Пример #1
0
 /** converts all points from MPoint to Point2D */
 public List<Point2D> getPoints() {
   List<Point2D> pts = new ArrayList<Point2D>();
   for (MPoint p : getMPoints()) {
     pts.add(p.toPoint2D());
   }
   return pts;
 }
Пример #2
0
 public void adjustWayPointPreferences(WayPoint[] waypoints) {
   List<MPoint> mpoints = getMPoints();
   for (int i = 0; i < waypoints.length; i++) {
     WayPoint wp = waypoints[i];
     MPoint mp = mpoints.get(i + 1);
     if (mp.getX() != wp.getX() || mp.getY() != wp.getY()) {
       dontFireEvents(1);
       mp.moveTo(wp.getX(), wp.getY());
     }
   }
 }