Explorar o código

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

Teh-Hai Julian Zheng %!s(int64=8) %!d(string=hai) anos
pai
achega
adcf2cd533

+ 7 - 5
src/classes/HolonBody.java

@@ -9,10 +9,12 @@ public class HolonBody implements Comparable<HolonBody> {
 	public Vector2d position;
 	private float mass;
 	private float radius;
-	private float angularVel;
-	private float orientation = 45f;
 	private Color color;
 
+	public Color getColor() {
+		return color;
+	}
+
 	public HolonBody(float x, float y, float radius, float mass, Color color) {
 		this.velocity = new Vector2d(0, 0);
 		this.position = new Vector2d(x, y);
@@ -22,8 +24,8 @@ public class HolonBody implements Comparable<HolonBody> {
 	}
 
 	
-	public void draw(Graphics2D g2) {
-
+	public void draw(Graphics2D g2, int holonBodyScale) {
+		
 		g2.setColor(color);
 		g2.fillOval((int) (position.getX() - getRadius()), (int) (position.getY() - getRadius()),
 				(int) (2 * getRadius()), (int) (2 * getRadius()));
@@ -108,7 +110,7 @@ public class HolonBody implements Comparable<HolonBody> {
 
 	}
 
-	private void setMass(float mass) {
+	public void setMass(float mass) {
 		this.mass = mass;
 	}
 

+ 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;

+ 20 - 0
src/ui/controller/Control.java

@@ -796,4 +796,24 @@ public class Control {
 	public int getNumberStateObjects(ArrayList<AbstractCpsObject> list, int state) {
 		return objectController.getNumberStateObjects(list, state);
 	}
+
+	/**
+	 * Changes the value of HolonBodySCALE 
+	 * 
+	 * @param s
+	 *            HolonBodyScale
+	 */
+	public void setHolonBodyScale(int s) {
+		globalController.setHolonBodyScale(s);
+	}
+	
+	/**
+	 * Returns HolonBodySCALE.
+	 * 
+	 * @return SCALE
+	 */
+	public int getHolonBodyScale() {
+		return globalController.getHolonBodyScale();
+	}
+
 }

+ 19 - 0
src/ui/controller/GlobalController.java

@@ -129,8 +129,27 @@ public class GlobalController {
 		model.addSubNetColor(c);
 	}
 	
+	
 	public void setMaxCapacity(float cap) {
 		model.setMaxCapacity(cap);
 	}
 
+	/**
+	 * Changes the value of HolonBodySCALE 
+	 * 
+	 * @param s
+	 *            HolonBodyScale
+	 */
+	public void setHolonBodyScale(int s) {
+		model.setHolonBodyScale(s);
+	}
+
+	/**
+	 * Returns HolonBodySCALE.
+	 * 
+	 * @return HolonBodySCALE
+	 */
+	public int getHolonBodyScale() {
+		return model.getHolonBodyScale();
+	}
 }

+ 21 - 4
src/ui/controller/SimulationManager.java

@@ -450,10 +450,12 @@ public class SimulationManager {
 					sN = buildSubNet(b, visited, sN);
 				}
 				if(a instanceof CpsUpperNode && a.getID() != cps.getID()){
-					checkForConnectedSates(b, (CpsUpperNode)a);
+					edge.setConnected(false);
+					checkForConnectedStates(b, (CpsUpperNode)a, edge);
 				}
 				if(b instanceof CpsUpperNode && b.getID() != cps.getID()){
-					checkForConnectedSates(a, (CpsUpperNode)b);
+					edge.setConnected(false);
+					checkForConnectedStates(a, (CpsUpperNode)b, edge);
 				}
 			}
 		}
@@ -570,8 +572,23 @@ public class SimulationManager {
 	 * @param cps
 	 * @param cUNode
 	 */
-	public void checkForConnectedSates(AbstractCpsObject cps, CpsUpperNode cUNode){
-		for(CpsEdge edge: cps.getConnections());
+	public void checkForConnectedStates(AbstractCpsObject cps, CpsUpperNode cUNode, CpsEdge theEdge){
+		AbstractCpsObject tmp;
+		for(CpsEdge edge: cps.getConnections()){
+			if(edge.getA().getID() == cps.getID()){
+				tmp = edge.getB();
+			} else{
+				tmp = edge.getA();
+			}
+			if(cUNode.getNodes().contains(tmp)){
+				if(tmp instanceof CpsUpperNode){
+					checkForConnectedStates(cps, (CpsUpperNode)tmp, theEdge);
+				}else{
+					theEdge.setConnected(true);
+					break;
+				}
+			}
+		}
 	}
 
 }

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

@@ -37,6 +37,7 @@ public class Model {
 	private int canvasY = 1000;
 	private static int sCALE = 50; // Picture Scale
 	private static int sCALEdIV2 = sCALE / 2;
+	private static int holonBodysCALE = 100; // Picture Scale
 	private static final int ITERATIONS = 100;
 	private int curIteration = 0;
 	private LinkedList<Color> subNetColors = new LinkedList<>();
@@ -727,5 +728,24 @@ public class Model {
 	public void setTableHolonElement(JTable tableHolonElement) {
 		this.tableHolonElement = tableHolonElement;
 	}
+	
+	/**
+	 * Sets the HolonBody Scale.
+	 * 
+	 * @param scale
+	 *            for the HolonBody
+	 */
+	public void setHolonBodyScale(int scale) {
+		holonBodysCALE = scale;
+	}
+
+	/**
+	 * Returns the sCale (Scale for the Images).
+	 * 
+	 * @return sCALE
+	 */
+	public int getHolonBodyScale() {
+		return holonBodysCALE;
+	}
 
 }

+ 22 - 0
src/ui/view/GUI.java

@@ -83,6 +83,7 @@ import interfaces.CategoryListener;
 import ui.controller.Control;
 import ui.controller.UpdateController;
 import ui.model.Model;
+import java.awt.Label;
 
 /**
  * Graphical User Interface.
@@ -266,6 +267,9 @@ public class GUI<E> implements CategoryListener {
 	private String selectObjBeforeErase = "Please select a Category or an Object in order to delete something.";
 
 	private UpdateController updCon;
+	private final JSplitPane splitPane_1 = new JSplitPane();
+	private final JSlider holonBodySizeSlider = new JSlider();
+	private final JLabel lblHolonBodySize = new JLabel("HolonBody SIze");
 
 	/**
 	 * Create the application.
@@ -660,6 +664,24 @@ public class GUI<E> implements CategoryListener {
 		splitPane3.setRightComponent(sizeSlider);
 
 		splitPane3.setLeftComponent(lblImageSize);
+		
+		mnNewMenuView.add(splitPane_1);
+		holonBodySizeSlider.setValue(100);
+		holonBodySizeSlider.setMinimum(1);
+		
+		holonBodySizeSlider.addChangeListener(new ChangeListener() {
+			
+			@Override
+			public void stateChanged(ChangeEvent e) {
+				controller.setHolonBodyScale(holonBodySizeSlider.getValue());
+				tree.setRowHeight(50);
+				canvas.repaint();				
+			}
+		});
+		
+		splitPane_1.setRightComponent(holonBodySizeSlider);
+		
+		splitPane_1.setLeftComponent(lblHolonBodySize);
 
 		menuBar.add(mnHelp);
 

+ 47 - 19
src/ui/view/HolonCanvas.java

@@ -27,7 +27,6 @@ public class HolonCanvas extends JPanel {
 
 	// Ball objects
 	private ArrayList<HolonBody> bodies = new ArrayList<>();
-	private HolonBody currentBall;
 	private int subCount;
 
 	// Frames
@@ -64,8 +63,14 @@ public class HolonCanvas extends JPanel {
 		if (!controller.getSimManager().getSubNets().equals(subnets)) {
 			subnets = controller.getSimManager().getSubNets();
 			subCount = subnets.size();
-			bodies = new ArrayList<>();
-			createBodies(subCount);
+			// bodies = new ArrayList<>();
+			// createBodies(subCount);
+			calcCenter();
+			if (bodies.isEmpty()) {
+				createBodies(subCount);
+			} else {
+				addNewBodies(subCount);
+			}
 		}
 
 		currentTime = System.currentTimeMillis();
@@ -93,12 +98,37 @@ public class HolonCanvas extends JPanel {
 		repaint();
 	}
 
-	
-	private void createBodies(int subCount) {
-		calcCenter();
+	// updates the bodies according to the changes of subnets
+	private void addNewBodies(int subCount) {
 		
-		for(int i = 0; i<subCount; i++){
-			HolonBody temp = new HolonBody(center.width+i, center.height+i, subnets.get(i).getObjects().size()*5+10, subnets.get(i).getObjects().size()*5+10, model.getSubNetColors().get(i));
+		ArrayList<HolonBody> newBodies = new ArrayList<>();
+		for (int i = 0; i < bodies.size(); i++) {
+			for (int j = 0; j < subCount; j++) {
+				if (model.getSubNetColors().get(j) == bodies.get(i).getColor()) {
+					bodies.get(i).setRadius(subnets.get(j).getObjects().size() * 5 + 10);
+					bodies.get(i).setMass(subnets.get(j).getObjects().size() * 5 + 10);
+					newBodies.add(bodies.get(i));
+					break;
+				}
+			}
+		}
+
+		bodies = newBodies;
+		for (int i = bodies.size(); i < subCount; i++) {
+			HolonBody temp = new HolonBody((center.width + 1) + (-1 * i), (center.height + 1) + (-1 * i),
+					subnets.get(i).getObjects().size() * 5 + 10, subnets.get(i).getObjects().size() * 5 + 10,
+					model.getSubNetColors().get(i));
+			bodies.add(temp);
+		}
+
+	}
+
+	// creates the first round of bodies
+	private void createBodies(int subCount) {
+		for (int i = 0; i < subCount; i++) {
+			HolonBody temp = new HolonBody((center.width + 1) + (-1 * i), (center.height + 1) + (-1 * i),
+					subnets.get(i).getObjects().size() * 5 + 10, subnets.get(i).getObjects().size() * 5 + 10,
+					model.getSubNetColors().get(i));
 			bodies.add(temp);
 		}
 	}
@@ -118,13 +148,9 @@ public class HolonCanvas extends JPanel {
 
 		// Render Game Objects
 		for (int i = 0; i < subCount; i++) {
-			bodies.get(i).draw(this.g2);
+			bodies.get(i).setRadius((subnets.get(i).getObjects().size() * 5 + 10)*controller.getHolonBodyScale()/100);
+			bodies.get(i).draw(this.g2, controller.getHolonBodyScale());
 		}
-
-		HolonBody tempBall = currentBall;
-		if (tempBall != null)
-			tempBall.draw(this.g2);
-
 	}
 
 	public void updateGame(float elapsedSeconds) {
@@ -133,10 +159,12 @@ public class HolonCanvas extends JPanel {
 		// and elapsedTime
 		calcCenter();
 		for (int i = 0; i < subCount; i++) {
-			bodies.get(i).position.setX((float) (bodies.get(i).position.getX() + (bodies.get(i).velocity.getX() * (elapsedSeconds))
-					- ((bodies.get(i).position.getX() - center.getWidth()) / 50)));
-			bodies.get(i).position.setY((float) (bodies.get(i).position.getY() + (bodies.get(i).velocity.getY() * (elapsedSeconds))
-					- ((bodies.get(i).position.getY() - center.getHeight()) / 50)));
+			bodies.get(i).position
+					.setX((float) (bodies.get(i).position.getX() + (bodies.get(i).velocity.getX() * (elapsedSeconds))
+							- ((bodies.get(i).position.getX() - center.getWidth()) / 100)));
+			bodies.get(i).position
+					.setY((float) (bodies.get(i).position.getY() + (bodies.get(i).velocity.getY() * (elapsedSeconds))
+							- ((bodies.get(i).position.getY() - center.getHeight()) / 100)));
 
 			if (Math.abs(bodies.get(i).velocity.getX()) < Constants.epsilon)
 				bodies.get(i).velocity.setX(0);
@@ -165,7 +193,7 @@ public class HolonCanvas extends JPanel {
 	public void checkCollisions() {
 		insertionSort(bodies);
 
-		for (int i = 0; i < subCount; i++) {		
+		for (int i = 0; i < subCount; i++) {
 			// Ball to Ball collision
 			for (int j = i + 1; j < subCount; j++) {
 				if ((bodies.get(i).position.getX() + bodies.get(i).getRadius()) < (bodies.get(j).position.getX()

+ 33 - 14
src/ui/view/MyCanvas.java

@@ -415,13 +415,18 @@ public class MyCanvas extends JPanel implements MouseListener, MouseMotionListen
 		for (CpsEdge con : model.getEdgesOnCanvas()) {
 			if (con.getA().getID() != model.getSelectedObjectID() && con.getB().getID() != model.getSelectedObjectID()
 					&& con != edgeHighlight) {
-				if (con.getState()) {
-					g2.setColor(Color.GREEN);
-					if (con.getCapacity() != -1) {
-						g2.setStroke(new BasicStroke(Math.min((con.getFlow() / con.getCapacity() * 4), 4)));
+				if(con.getConnected()){
+					if (con.getState()) {
+						g2.setColor(Color.GREEN);
+						if (con.getCapacity() != -1) {
+							g2.setStroke(new BasicStroke(Math.min((con.getFlow() / con.getCapacity() * 4), 4)));
+						}
+					} else {
+						g2.setColor(Color.RED);
+						g2.setStroke(new BasicStroke(2));
 					}
-				} else {
-					g2.setColor(Color.RED);
+				}else{
+					g2.setColor(Color.DARK_GRAY);
 					g2.setStroke(new BasicStroke(2));
 				}
 				g2.drawLine(con.getA().getPosition().x + controller.getScaleDiv2(),
@@ -435,9 +440,15 @@ public class MyCanvas extends JPanel implements MouseListener, MouseMotionListen
 					maxCap = String.valueOf(con.getCapacity());
 				}
 				if (showedInformation[0]) {
-					g2.drawString(con.getFlow() + "/" + maxCap,
-							(con.getA().getPosition().x + con.getB().getPosition().x) / 2 + controller.getScaleDiv2(),
-							(con.getA().getPosition().y + con.getB().getPosition().y) / 2 + controller.getScaleDiv2());
+					if(con.getConnected()){
+						g2.drawString(con.getFlow() + "/" + maxCap,
+								(con.getA().getPosition().x + con.getB().getPosition().x) / 2 + controller.getScaleDiv2(),
+								(con.getA().getPosition().y + con.getB().getPosition().y) / 2 + controller.getScaleDiv2());
+					}else{
+						g2.drawString("not connected", 
+								(con.getA().getPosition().x + con.getB().getPosition().x) / 2 + controller.getScaleDiv2(),
+								(con.getA().getPosition().y + con.getB().getPosition().y) / 2 + controller.getScaleDiv2());
+					}
 				}
 			}
 		}
@@ -467,11 +478,19 @@ public class MyCanvas extends JPanel implements MouseListener, MouseMotionListen
 						maxCap = String.valueOf(con.getCapacity());
 					}
 					if (showedInformation[0]) {
-						g2.drawString(con.getFlow() + "/" + maxCap,
-								(con.getA().getPosition().x + con.getB().getPosition().x) / 2
-										+ controller.getScaleDiv2(),
-								(con.getA().getPosition().y + con.getB().getPosition().y) / 2
-										+ controller.getScaleDiv2());
+						if(con.getConnected()){
+							g2.drawString(con.getFlow() + "/" + maxCap,
+									(con.getA().getPosition().x + con.getB().getPosition().x) / 2
+											+ controller.getScaleDiv2(),
+											(con.getA().getPosition().y + con.getB().getPosition().y) / 2
+											+ controller.getScaleDiv2());
+						}else{
+							g2.drawString("not connected",
+									(con.getA().getPosition().x + con.getB().getPosition().x) / 2
+											+ controller.getScaleDiv2(),
+											(con.getA().getPosition().y + con.getB().getPosition().y) / 2
+											+ controller.getScaleDiv2());
+						}
 					}
 				}
 			}

+ 34 - 14
src/ui/view/UpperNodeCanvas.java

@@ -121,7 +121,7 @@ public class UpperNodeCanvas extends JPanel implements MouseListener, MouseMotio
 	 *            the Controller
 	 */
 	public UpperNodeCanvas(Model mod, Control control, CpsUpperNode UpperNode, String parentPath) {
-		this.add(objectTT);
+		//this.add(objectTT);
 		this.controller = control;
 		this.model = mod;
 		this.upperNode = UpperNode;
@@ -160,7 +160,7 @@ public class UpperNodeCanvas extends JPanel implements MouseListener, MouseMotio
 		itemTrack.setEnabled(false);
 		itemUntrack.setEnabled(false);
 		updCon = new UpdateController(model, controller);
-
+		
 		itemGroup.addActionListener(new ActionListener() {
 			@Override
 			public void actionPerformed(ActionEvent e) {
@@ -462,13 +462,18 @@ public class UpperNodeCanvas extends JPanel implements MouseListener, MouseMotio
 		for (CpsEdge con : upperNode.getNodeEdges()) {
 			if (con.getA().getID() != model.getSelectedObjectID() && con.getB().getID() != model.getSelectedObjectID()
 					&& con != edgeHighlight) {
-				if (con.getState()) {
-					g2.setColor(Color.GREEN);
-					if (con.getCapacity() != -1) {
-						g2.setStroke(new BasicStroke(Math.min((con.getFlow() / con.getCapacity() * 4), 4)));
+				if(con.getConnected()){
+					if (con.getState()) {
+						g2.setColor(Color.GREEN);
+						if (con.getCapacity() != -1) {
+							g2.setStroke(new BasicStroke(Math.min((con.getFlow() / con.getCapacity() * 4), 4)));
+						}
+					} else {
+						g2.setColor(Color.RED);
+						g2.setStroke(new BasicStroke(2));
 					}
-				} else {
-					g2.setColor(Color.RED);
+				}else{
+					g2.setColor(Color.DARK_GRAY);
 					g2.setStroke(new BasicStroke(2));
 				}
 				g2.drawLine(con.getA().getPosition().x + controller.getScaleDiv2(),
@@ -482,9 +487,15 @@ public class UpperNodeCanvas extends JPanel implements MouseListener, MouseMotio
 					maxCap = String.valueOf(con.getCapacity());
 				}
 				if (showedInformation[0]) {
-					g2.drawString(con.getFlow() + "/" + maxCap,
-							(con.getA().getPosition().x + con.getB().getPosition().x) / 2 + controller.getScaleDiv2(),
-							(con.getA().getPosition().y + con.getB().getPosition().y) / 2 + controller.getScaleDiv2());
+					if(con.getConnected()){
+						g2.drawString(con.getFlow() + "/" + maxCap,
+								(con.getA().getPosition().x + con.getB().getPosition().x) / 2 + controller.getScaleDiv2(),
+								(con.getA().getPosition().y + con.getB().getPosition().y) / 2 + controller.getScaleDiv2());
+					}else{
+						g2.drawString("not connected", 
+								(con.getA().getPosition().x + con.getB().getPosition().x) / 2 + controller.getScaleDiv2(),
+								(con.getA().getPosition().y + con.getB().getPosition().y) / 2 + controller.getScaleDiv2());
+					}
 				}
 			}
 		}
@@ -514,11 +525,19 @@ public class UpperNodeCanvas extends JPanel implements MouseListener, MouseMotio
 						maxCap = String.valueOf(con.getCapacity());
 					}
 					if (showedInformation[0]) {
-						g2.drawString(con.getFlow() + "/" + maxCap,
-								(con.getA().getPosition().x + con.getB().getPosition().x) / 2
+						if(con.getConnected()){
+							g2.drawString(con.getFlow() + "/" + maxCap,
+									(con.getA().getPosition().x + con.getB().getPosition().x) / 2
 										+ controller.getScaleDiv2(),
-								(con.getA().getPosition().y + con.getB().getPosition().y) / 2
+									(con.getA().getPosition().y + con.getB().getPosition().y) / 2
 										+ controller.getScaleDiv2());
+						}else{
+							g2.drawString("not connected",
+									(con.getA().getPosition().x + con.getB().getPosition().x) / 2
+										+ controller.getScaleDiv2(),
+									(con.getA().getPosition().y + con.getB().getPosition().y) / 2
+										+ controller.getScaleDiv2());
+						}
 					}
 				}
 			}
@@ -639,6 +658,7 @@ public class UpperNodeCanvas extends JPanel implements MouseListener, MouseMotio
 
 			// Border Highlighting
 			if(showedInformation[3]){
+				System.out.println("here");
 				g2.setColor(cps.getBorderColor());
 				if (g2.getColor() != Color.WHITE) {
 					g2.fillRect((int) ((borderPos >> 1) - model.getScaleDiv2() - scalediv20) - 3,

+ 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);