Browse Source

delete element

Teh-Hai Julian Zheng 8 years ago
parent
commit
18ae961826

BIN
bin/ui/controller/Control$command.class


BIN
bin/ui/controller/Control.class


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

@@ -87,6 +87,8 @@ public class Control {
 			float energy) {
 		objectController.addNewElementIntoCategoryObject(catName, objName, eleName, amount, energy);
 	}
+	
+	public void deleteElement()
 
 	////////// etc
 	/**

+ 15 - 0
src/ui/controller/ObjectController.java

@@ -98,6 +98,21 @@ public class ObjectController {
 			float energy) {
 		addElementIntoCategoryObject(category, object, new HolonElement(eleName, energy, amount));
 	}
+	
+	/**
+	 * deletes a Element from a given Object
+	 * @param obj
+	 * @param ele
+	 */
+	public void deleteElement(HolonObject obj, HolonElement ele){
+		obj.getElements().remove(ele);
+	}
+	
+	public void deleteElementInCategory(Category cat, HolonObject obj, HolonElement ele){
+		
+	}
+	
+	
 
 	/**
 	 * Search for Object

+ 1 - 0
src/ui/model/iDCounter.java

@@ -5,5 +5,6 @@ public class iDCounter {
 
 	public static synchronized int nextId() {
 		return ++counter;
+		
 	}
 }