12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- package ui.controller;
- import java.util.ArrayList;
- import com.sun.glass.ui.View;
- import ui.model.*;
- import ui.view.*;
- public class CategoryControl{
- private IdCounter id;
- private Model model;
- private GUI view;
-
-
- public CategoryControl(Model model, GUI view, IdCounter id){
- this.id = id;
- this.model = model;
- this.view = view;
- initCategories();
- }
-
-
-
- /**
- * initialisiert alle Standart Kategorien und Objekte
- */
- public void initCategories(){
- Category energy = new Category("Energy");
- Category building = new Category("Building");
- Category component = new Category("Component");
-
- HolonObject powerp = new HolonObject("Power Plant");
- HolonObject house = new HolonObject("House");
- HolonObject transformer = new HolonObject("Transformer");
- HolonObject sw = new HolonObject("Switch");
-
- energy.addObject(powerp);
- building.addObject(house);
- component.addObject(transformer);
- component.addObject(sw);
-
- model.addCategory(energy);
- model.addCategory(building);
- model.addCategory(component);
-
-
- }
-
-
- /**
- * läd die Kategorien und Objekte in die View
- */
- public void loadCategories(){
- //ArrayList<Category> category = m.getCategories();
-
- // for (Category c : category) {
- //
- // }
- }
-
-
-
-
- }
|