Browse Source

added new classes for graph panel

dominik.rieder 7 years ago
parent
commit
c02d6f75e3

+ 36 - 0
src/classes/PropertyDataSet.java

@@ -0,0 +1,36 @@
+package classes;
+
+import java.awt.Color;
+
+public class PropertyDataSet {
+	//contains the Name of the Graph in which the information is shown//
+	private String assignedGraph;
+	//the color in which the Graph is drawn//
+	private Color color;
+	
+	public PropertyDataSet(){
+		assignedGraph = "";
+		color = new Color(0,0,0);
+	}
+	
+	public PropertyDataSet(String graph, Color color){
+		assignedGraph = graph;
+		this.color = color;
+	}
+	
+	public void setColor(Color color){
+		this.color = color;
+	}
+	
+	public void setGraph(String graph){
+		assignedGraph = graph;
+	}
+	
+	public Color getColor(){
+		return this.color;
+	}
+	
+	public String getAssignedGraph(){
+		return assignedGraph;
+	}
+}

+ 9 - 0
src/classes/graphDataSet.java

@@ -0,0 +1,9 @@
+package classes;
+
+import java.awt.Color;
+import java.util.Hashtable;
+
+public class graphDataSet {
+	Hashtable<String, PropertyDataSet> propertyTable;
+	
+}

+ 1 - 1
src/ui/view/UpperNodeCanvas.java

@@ -215,7 +215,7 @@ public class UpperNodeCanvas extends JPanel implements MouseListener, MouseMotio
 			public void actionPerformed(ActionEvent e) {
 				// Remove the selected Object objects
 				for (AbstractCpsObject cps : model.getSelectedCpsObjects()) {
-					controller.delObjUpperNode(cps, UpperNode);
+					controller.delObjUpperNode(cps, upperNode);
 					// Remove UpperNodeTab if UpperNode deleted
 					if(cps instanceof CpsUpperNode){
 						JTabbedPane tabbedPane = (JTabbedPane) getParent().getParent().getParent();