Revision 11805
branches/v10/extensions/extGraph_predes/src/com/iver/cit/gvsig/graph/gui/RouteControlPanel.java | ||
---|---|---|
43 | 43 |
* |
44 | 44 |
* $Id$ |
45 | 45 |
* $Log$ |
46 |
* Revision 1.25.2.2 2007-05-15 07:08:21 fjp |
|
46 |
* Revision 1.25.2.3 2007-05-24 11:33:36 fjp |
|
47 |
* Para que puedas a?adir los puntos que est?n cerca de la red. Los que no lo est?n, lanzan un error informando de qu? punto no est? cerca de la red. |
|
48 |
* |
|
49 |
* Revision 1.25.2.2 2007/05/15 07:08:21 fjp |
|
47 | 50 |
* Para calcular matrices de distancias |
48 | 51 |
* |
49 | 52 |
* Revision 1.25 2006/11/14 18:32:32 fjp |
... | ... | |
1059 | 1062 |
|
1060 | 1063 |
try { |
1061 | 1064 |
flag = net.addFlag(coords[j].x, coords[j].y, realTol); |
1062 |
|
|
1063 |
// TODO: Create use a IFlagListener to do this |
|
1064 |
// inside flagsChanged. The best solution is |
|
1065 |
// to put all the code in RouteControlPanel |
|
1066 |
NetworkUtils.addGraphicFlag(mapControl, flag); |
|
1065 |
if (flag == null) |
|
1066 |
{ |
|
1067 |
// segundo intento: |
|
1068 |
flag = net.addFlag(coords[j].x, coords[j].y, 4*realTol); |
|
1069 |
if (flag == null) |
|
1070 |
{ |
|
1071 |
NullPointerException e = new NullPointerException("Punto " + i + " fuera de la red. Tolerancia=" + realTol); |
|
1072 |
NotificationManager.addError("No se puedo situar el registro " + i + |
|
1073 |
"Por favor, compruebe que est? encima de la red o aumente la toleracina.", e); |
|
1074 |
} |
|
1075 |
} |
|
1076 |
if (flag != null) |
|
1077 |
{ |
|
1078 |
// TODO: Create use a IFlagListener to do this |
|
1079 |
// inside flagsChanged. The best solution is |
|
1080 |
// to put all the code in RouteControlPanel |
|
1081 |
NetworkUtils.addGraphicFlag(mapControl, flag); |
|
1082 |
} |
|
1067 | 1083 |
} catch (GraphException e) { |
1068 | 1084 |
e.printStackTrace(); |
1069 | 1085 |
NotificationManager.addError("No se puedo situar el registro " + i + |
Also available in: Unified diff