Quellcode durchsuchen

Controller and Model for statistics-tab

Edgardo Palza vor 8 Jahren
Ursprung
Commit
ee9d5c4478

+ 0 - 1
src/ui/controller/NodeController.java

@@ -31,5 +31,4 @@ public class NodeController {
 		addNode(node);
 	}
 	
-	private void getAdja
 }

+ 13 - 0
src/ui/controller/StatsController.java

@@ -0,0 +1,13 @@
+package ui.controller;
+
+import ui.model.Model;
+
+public class StatsController {
+
+	private Model model;
+
+	public StatsController(Model mod) {
+		this.model = mod;
+	}
+
+}

+ 16 - 0
src/ui/model/Model.java

@@ -11,6 +11,7 @@ import classes.Category;
 import classes.CpsEdge;
 import classes.AbstractCpsObject;
 import classes.HolonElement;
+import classes.HolonObject;
 import interfaces.CategoryListener;
 import interfaces.ObjectListener;
 import ui.view.Console;
@@ -57,6 +58,12 @@ public class Model {
 	 */
 	private ArrayList<Category> categories;
 
+	/*
+	 * Array of all HolonObj, that should be tracked through out the statistics
+	 * tab
+	 */
+	private ArrayList<HolonObject> trackingObj;
+
 	/*
 	 * Array of all CpsObjects in our canvas. It is set by default as an empty
 	 * list.
@@ -97,6 +104,7 @@ public class Model {
 		setCgIdx(new HashMap<String, Integer>());
 		setCvsObjIdx(new HashMap<Integer, Integer>());
 		setClipboradObjects(new ArrayList<AbstractCpsObject>());
+		setTrackingObj(new ArrayList<HolonObject>());
 	}
 
 	/**
@@ -605,4 +613,12 @@ public class Model {
 		return this.subNetColors;
 	}
 
+	public void setTrackingObj(ArrayList<HolonObject> toTrack) {
+		trackingObj = toTrack;
+	}
+
+	public ArrayList<HolonObject> getTrackingObj() {
+		return trackingObj;
+	}
+
 }