Browse Source

graphtable in model 2

dominik.rieder 7 years ago
parent
commit
6427383d55
2 changed files with 11 additions and 0 deletions
  1. 10 0
      src/ui/controller/Control.java
  2. 1 0
      src/ui/view/StatPanel2.java

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

@@ -6,6 +6,7 @@ import java.awt.datatransfer.UnsupportedFlavorException;
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.Hashtable;
 import java.util.zip.ZipException;
 
 import org.apache.commons.compress.archivers.ArchiveException;
@@ -24,6 +25,7 @@ import interfaces.CategoryListener;
 import ui.model.Model;
 import ui.view.FlexiblePane;
 import ui.view.MyCanvas;
+import ui.view.StatisticGraphPanel;
 
 /**
  * The Class represents the controller in the model, controller view Pattern.
@@ -929,5 +931,13 @@ public class Control {
 	public void setFlexiblePane(FlexiblePane fp){
 		simulationManager.setFlexiblePane(fp);
 	}
+	
+	public void setGraphTable(Hashtable<String, StatisticGraphPanel> gT){
+		model.setGraphTable(gT);
+	}
+	
+	public Hashtable<String, StatisticGraphPanel> getGraphTable(){
+		return model.getGraphTable();
+	}
 
 }

+ 1 - 0
src/ui/view/StatPanel2.java

@@ -110,6 +110,7 @@ public class StatPanel2 extends JSplitPane implements GraphListener {
 		this.controller = cont;
 		objectHashtable = new Hashtable<String, GraphDataSet>();
 		graphHashtable = new Hashtable<String, StatisticGraphPanel>();
+		controller.setGraphTable(graphHashtable);
 		
 		holonHashtable = new Hashtable<String, PropertyDataSet>();
 		holonHashtable.put(TOT_PROD_HOLON, new PropertyDataSet());