|
@@ -0,0 +1,31 @@
|
|
|
+package ui.model;
|
|
|
+
|
|
|
+import java.util.ArrayList;
|
|
|
+
|
|
|
+import ui.controller.*;
|
|
|
+
|
|
|
+public class Model {
|
|
|
+ private ArrayList<Category> Categories;
|
|
|
+ private ArrayList<HolonObject> ObjectsOnCanvas;
|
|
|
+
|
|
|
+ public Model(){
|
|
|
+ Categories = new ArrayList<Category>();
|
|
|
+ ObjectsOnCanvas = new ArrayList<HolonObject>();
|
|
|
+ }
|
|
|
+
|
|
|
+ public void addCategory(Category toAdd){
|
|
|
+ Categories.add(toAdd);
|
|
|
+ }
|
|
|
+
|
|
|
+ public void deleteCategory(int idx){
|
|
|
+ Categories.remove(idx);
|
|
|
+ }
|
|
|
+
|
|
|
+ public void addObject(HolonObject toAdd){
|
|
|
+ ObjectsOnCanvas.add(toAdd);
|
|
|
+ }
|
|
|
+
|
|
|
+ public void deleteObject(int idx){
|
|
|
+ ObjectsOnCanvas.remove(idx);
|
|
|
+ }
|
|
|
+}
|