瀏覽代碼

small changes

Teh-Hai Julian Zheng 7 年之前
父節點
當前提交
b614380326
共有 2 個文件被更改,包括 17 次插入8 次删除
  1. 2 2
      src/ui/controller/LoadController.java
  2. 15 6
      src/ui/controller/SaveController.java

+ 2 - 2
src/ui/controller/LoadController.java

@@ -510,10 +510,10 @@ public class LoadController {
 			ret = partition + ret;
 		}
 		if (os.contains("mac")) {
-
+			//dosmth
 		}
 		if (os.contains("linux")) {
-
+			//dosmth
 		}
 		return ret;
 	}

+ 15 - 6
src/ui/controller/SaveController.java

@@ -60,7 +60,7 @@ public class SaveController {
 	}
 
 	public enum NUMTYPE {
-		CATEGORY, OBJECT, ELEMENT, EDGE, CONNECTION, NODEEDGE, OLDEDGE, UNITGRAPH, IMAGE
+		CATEGORY, OBJECT, ELEMENT, EDGE, CONNECTION, NODEEDGE, OLDEDGE, UNITGRAPH, STATSGRAPH
 	}
 
 	public enum GRAPHTYPE {
@@ -69,7 +69,7 @@ public class SaveController {
 
 	private Model model;
 	private Gson gson;
-	private int nCat, nObj, nEle, nEdge, nConn, nNodeEdge, nOldEdge, nUnitGraph, nImg;
+	private int nCat, nObj, nEle, nEdge, nConn, nNodeEdge, nOldEdge, nUnitGraph, nStatsGraph;
 
 	/**
 	 * Constructor.
@@ -262,7 +262,7 @@ public class SaveController {
 
 	private void storeStatistics(JsonObject file) {
 		trackedToJson(file);
-
+		statisticgraphToJson(file);
 	}
 
 	/**
@@ -408,6 +408,14 @@ public class SaveController {
 		file.add(key, gson.toJsonTree(temp));
 	}
 
+	private void statisticgraphToJson(JsonObject file) {
+		// TODO Auto-generated method stub
+		JsonObject temp = new JsonObject();
+		String key = null;
+		
+		
+	}
+
 	/**
 	 * Differs Between Single file or whole Directory to Store
 	 * 
@@ -490,7 +498,7 @@ public class SaveController {
 	 * Just initialize the Numerators for the Json Keys. Maybe bad Style..
 	 */
 	public void initNumeration() {
-		this.nCat = this.nObj = this.nEle = this.nEdge = this.nConn = this.nNodeEdge = this.nOldEdge = this.nImg = 0;
+		this.nCat = this.nObj = this.nEle = this.nEdge = this.nConn = this.nNodeEdge = this.nOldEdge = this.nStatsGraph = 0;
 	}
 
 	/**
@@ -518,8 +526,9 @@ public class SaveController {
 			return nOldEdge++;
 		case UNITGRAPH:
 			return nUnitGraph++;
-		case IMAGE:
-			return nImg++;
+		case STATSGRAPH:
+			return nStatsGraph++;
+		
 		default:
 			break;
 		}