ソースを参照

graphtable in model

dominik.rieder 7 年 前
コミット
7cdc93bf55
2 ファイル変更19 行追加1 行削除
  1. 2 1
      src/ui/controller/SaveController.java
  2. 17 0
      src/ui/model/Model.java

+ 2 - 1
src/ui/controller/SaveController.java

@@ -271,7 +271,7 @@ public class SaveController {
 	 */
 	private void storeData(ArchiveOutputStream stream) throws IOException {
 		// TODO Auto-generated method stub
-
+		System.out.println(System.getProperty("user.home"));
 		File images = new File(System.getProperty("user.home") + "/HolonGUI/Images");
 		File background = new File(System.getProperty("user.home") + "/HolonGUI/BackgroundImages");
 		addFilesToSave(images, stream);
@@ -428,6 +428,7 @@ public class SaveController {
 	 */
 	private void addFileToSave(File src, ArchiveOutputStream stream, boolean dir) throws IOException {
 		String entryName = (dir == true ? src.getCanonicalPath() : src.getName());
+		System.out.println();
 		entryName = entryName.replace(System.getProperty("user.home") + "/HolonGUI/", "");
 
 		ZipArchiveEntry entry = new ZipArchiveEntry(entryName);

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

@@ -3,6 +3,7 @@ package ui.model;
 import java.awt.Color;
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.Hashtable;
 import java.util.LinkedList;
 import java.util.List;
 
@@ -20,6 +21,7 @@ import interfaces.ObjectListener;
 import ui.view.Console;
 import ui.view.DefaulTable;
 import ui.view.PropertyTable;
+import ui.view.StatisticGraphPanel;
 
 /**
  * The Class Model is the class where everything is saved. All changes made to
@@ -111,6 +113,7 @@ public class Model {
 	private Object algorithm = null;
 	private int selectedHolonBody;
 
+	private Hashtable<String, StatisticGraphPanel> statisticGraphTable = new Hashtable<String, StatisticGraphPanel>();
 	/**
 	 * Constructor for the model. It initializes the categories and
 	 * objectsOnCanvas by default values. Listeners are also initialized by
@@ -860,4 +863,18 @@ public class Model {
 	public void setCanvasImageHeight(int height) {
 		backgroundHeight = height;
 	}
+	
+	/**
+	 * Set the graphtable for Statistic Graphs
+	 */
+	public void setGraphTable(Hashtable<String, StatisticGraphPanel> gT){
+		statisticGraphTable = gT;
+	}
+	
+	/**
+	 * Returns the graphtable for Statistic Graphs
+	 */
+	public Hashtable<String, StatisticGraphPanel> getGraphTable(){
+		return statisticGraphTable;
+	}
 }