Kaynağa Gözat

Merge branch 'master' of https://git.tk.informatik.tu-darmstadt.de/carlos.garcia/praktikum-holons

jess 8 yıl önce
ebeveyn
işleme
f1da54a43f

+ 3 - 2
src/classes/TrackedDataSet.java

@@ -14,8 +14,9 @@ public class TrackedDataSet {
 	public static final int PERCENT_SUPPLIED = 6;
 	public static final int PERCENT_NOT_SUPPLIED = 7;
 	public static final int PERCENT_PARTIAL_SUPPLIED = 8;
-	public static final int GRID_PRODUCTION = 9;
-	public static final int GRID_CONSUMPTION = 10;
+	public static final int GROUP_PRODUCTION = 9;
+	public static final int GROUP_CONSUMPTION = 10;
+	public static final int AMOUNT_SUBNETS = 11;
 	
 	//Variables of the Data Set
 	private AbstractCpsObject cps;

+ 12 - 3
src/ui/controller/NodeController.java

@@ -426,6 +426,11 @@ public class NodeController {
 		return pos;
 	}
 
+	/**
+	 * 
+	 * @param obj
+	 * @param upperNode
+	 */
 	private void removeForNodeOfNode(AbstractCpsObject obj, CpsUpperNode upperNode) {
 
 		mpC.decIdx(obj.getID(), (upperNode == null ? model.getCvsObjIdx() : upperNode.getNodesIdx()));
@@ -434,11 +439,15 @@ public class NodeController {
 	}
 
 	/**
-	 * Search Lost Nodes by Backtracking
+	 * Search Lost Nodes by Backtracking by looking for edges
 	 * 
-	 * @param lost
 	 * @param object
-	 * @return
+	 *            actual object which we are looking at
+	 * @param find
+	 *            one part of the Edge
+	 * @param lost
+	 *            other part of the Edge
+	 * @return boolean if found
 	 */
 	private boolean backtrackLostChild(AbstractCpsObject object, AbstractCpsObject find, AbstractCpsObject lost) {
 		if (!(object instanceof CpsUpperNode)) {

+ 5 - 0
src/ui/controller/TestNewLoadController.java

@@ -0,0 +1,5 @@
+package ui.controller;
+
+public class TestNewLoadController {
+
+}

+ 5 - 0
src/ui/controller/TestNewStoreController.java

@@ -0,0 +1,5 @@
+package ui.controller;
+
+public class TestNewStoreController {
+
+}

+ 12 - 25
src/ui/view/splitPane.java

@@ -56,19 +56,6 @@ import java.awt.FlowLayout;
 import java.awt.BorderLayout;
 
 public class splitPane extends JSplitPane implements GraphListener {
-	// Property Integers
-	public static final int CONS_OBJ_INT = 0;
-	public static final int PROD_OBJ_INT = 1;
-	public static final int ACTIVE_ELEMENTS_INT = 2;
-	public static final int SW_ACTIVE_INT = 3;
-	public static final int PROD_HOLON_INT = 4;
-	public static final int CONS_HOLON_INT = 5;
-	public static final int SUPPLIED_INT = 6;
-	public static final int NOT_SUPPLIED_INT = 7;
-	public static final int PART_SUPPLIED_INT = 8;
-	public static final int GRID_PROD_INT = 9;
-	public static final int GRID_CONS_INT = 10;
-	public static final int NR_SUBNETS_INT = 11;
 	
 	// Property Strings
 	public static final String TOT_PROD_HOLON = "total Holon Production";
@@ -131,18 +118,18 @@ public class splitPane extends JSplitPane implements GraphListener {
 		
 		//propValTable associates the Strings to the numbers
 		propValTable = new Hashtable<String, Integer>();
-		propValTable.put(TOT_PROD_OBJ, PROD_OBJ_INT);
-		propValTable.put(TOT_CONS_OBJ, CONS_OBJ_INT);
-		propValTable.put(NR_ACTIVE_ELEMENTS, ACTIVE_ELEMENTS_INT);
-		propValTable.put(SW_ACTIVE, SW_ACTIVE_INT);
-		propValTable.put(TOT_PROD_HOLON, PROD_HOLON_INT);
-		propValTable.put(TOT_CONS_HOLON, CONS_HOLON_INT);
-		propValTable.put(SUPPLIED_OBJ, SUPPLIED_INT);
-		propValTable.put(NOT_SUPPLIED_OBJ, NOT_SUPPLIED_INT);
-		propValTable.put(PART_SUPPLIED_OBJ, PART_SUPPLIED_INT);
-		propValTable.put(TOT_PROD_GRID, GRID_PROD_INT);
-		propValTable.put(TOT_CONS_GRID, GRID_CONS_INT);
-		propValTable.put(NR_SUBNETS, NR_SUBNETS_INT);
+		propValTable.put(TOT_PROD_OBJ, TrackedDataSet.PRODUCTION);
+		propValTable.put(TOT_CONS_OBJ, TrackedDataSet.CONSUMPTION);
+		propValTable.put(NR_ACTIVE_ELEMENTS, TrackedDataSet.ACTIVATED_ELEMENTS);
+		propValTable.put(SW_ACTIVE, TrackedDataSet.ON_OFF);
+		propValTable.put(TOT_PROD_HOLON, TrackedDataSet.TOTAL_PRODUCTION);
+		propValTable.put(TOT_CONS_HOLON, TrackedDataSet.TOTAL_CONSUMPTION);
+		propValTable.put(SUPPLIED_OBJ, TrackedDataSet.PERCENT_SUPPLIED);
+		propValTable.put(NOT_SUPPLIED_OBJ, TrackedDataSet.PERCENT_NOT_SUPPLIED);
+		propValTable.put(PART_SUPPLIED_OBJ, TrackedDataSet.PERCENT_PARTIAL_SUPPLIED);
+		propValTable.put(TOT_PROD_GRID, TrackedDataSet.GROUP_PRODUCTION);
+		propValTable.put(TOT_CONS_GRID, TrackedDataSet.GROUP_CONSUMPTION);
+		propValTable.put(NR_SUBNETS, TrackedDataSet.AMOUNT_SUBNETS);
 
 		JScrollPane dataPane = new JScrollPane();
 		setLeftComponent(dataPane);