|
@@ -4,6 +4,8 @@ import java.awt.Point;
|
|
import java.io.FileReader;
|
|
import java.io.FileReader;
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
|
+import java.util.Collection;
|
|
|
|
+import java.util.Collections;
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
import java.util.Iterator;
|
|
import java.util.Iterator;
|
|
|
|
|
|
@@ -78,6 +80,11 @@ public class LoadController {
|
|
else
|
|
else
|
|
idCounter.setCounter(Integer.parseInt(json.get(key.toString()).toString()));
|
|
idCounter.setCounter(Integer.parseInt(json.get(key.toString()).toString()));
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ Collections.sort(obj);
|
|
|
|
+ Collections.sort(ele);
|
|
|
|
+ Collections.sort(edge);
|
|
|
|
+ Collections.sort(gp);
|
|
|
|
|
|
dispatch(obj, json);
|
|
dispatch(obj, json);
|
|
dispatch(ele, json);
|
|
dispatch(ele, json);
|
|
@@ -105,7 +112,6 @@ public class LoadController {
|
|
} else if (str.contains("CVSO")) {
|
|
} else if (str.contains("CVSO")) {
|
|
readCanvasObject((JSONArray) json.get(str));
|
|
readCanvasObject((JSONArray) json.get(str));
|
|
} else if (str.contains("CGE") || str.contains("CVSE")) {
|
|
} else if (str.contains("CGE") || str.contains("CVSE")) {
|
|
- System.out.println(str.toString());
|
|
|
|
readElement((JSONArray) json.get(str));
|
|
readElement((JSONArray) json.get(str));
|
|
} else if (str.contains("EDGE")) {
|
|
} else if (str.contains("EDGE")) {
|
|
readEdge((JSONArray) json.get(str));
|
|
readEdge((JSONArray) json.get(str));
|
|
@@ -192,7 +198,7 @@ public class LoadController {
|
|
|
|
|
|
HolonElement ele = new HolonElement(next(i), Integer.parseInt(next(i)), Float.parseFloat(next(i)));
|
|
HolonElement ele = new HolonElement(next(i), Integer.parseInt(next(i)), Float.parseFloat(next(i)));
|
|
|
|
|
|
- if (sav.equals("Canvas")) {
|
|
|
|
|
|
+ if (sav.equals("CVS")) {
|
|
ele.setActive(compare(Integer.parseInt(next(i))));
|
|
ele.setActive(compare(Integer.parseInt(next(i))));
|
|
objC.addElementIntoCanvasObject((HolonObject) mpC.searchByID(Integer.parseInt(obj)), ele);
|
|
objC.addElementIntoCanvasObject((HolonObject) mpC.searchByID(Integer.parseInt(obj)), ele);
|
|
} else
|
|
} else
|
|
@@ -219,7 +225,7 @@ public class LoadController {
|
|
String sav = next(i);
|
|
String sav = next(i);
|
|
HolonElement ele;
|
|
HolonElement ele;
|
|
|
|
|
|
- if (sav.equals("Canvas")) {
|
|
|
|
|
|
+ if (sav.equals("CVS")) {
|
|
ele = mpC.searchHolonElement((HolonObject) mpC.searchByID(Integer.parseInt(next(i))), next(i));
|
|
ele = mpC.searchHolonElement((HolonObject) mpC.searchByID(Integer.parseInt(next(i))), next(i));
|
|
while (i.hasNext())
|
|
while (i.hasNext())
|
|
ele.getGraphPoints().add(new Point(Integer.parseInt(next(i)), Integer.parseInt(next(i))));
|
|
ele.getGraphPoints().add(new Point(Integer.parseInt(next(i)), Integer.parseInt(next(i))));
|