public class CategoryController
extends java.lang.Object
| Constructor and Description |
|---|
CategoryController(Model model,
MultiPurposeController mp)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCategory(Category category)
Adds Category into Model if a Category with the same name already exists
Add Category_+1.
|
void |
addCategoryListener(CategoryListener catLis)
Init the CategoryListener.
|
void |
addNewCategory(java.lang.String name)
Adds New Category into Model.
|
void |
addNewHolonObject(Category category,
java.lang.String object,
java.util.ArrayList<HolonElement> elements,
java.lang.String image)
Add new Holon Object to a Category.
|
void |
addNewHolonSwitch(Category cat,
java.lang.String objName,
java.lang.String image)
Add new Holon Switch.
|
void |
addNewHolonTransformer(Category cat,
java.lang.String objName,
java.lang.String image)
Add new Holon Transformer.
|
void |
addObject(Category category,
AbstractCpsObject object)
Add Object into a Category.
|
void |
deleteCategory(java.lang.String category)
delete a given Category.
|
void |
deleteObject(java.lang.String category,
java.lang.String obj)
Delete an Object from a Category.
|
void |
initCategories()
init default category and objects.
|
void |
notifyCatListeners()
notifies all listeners about changes in the Categories.
|
void |
removeCategory(Category c)
remove a Category from Model.
|
void |
removeObject(Category category,
AbstractCpsObject cps)
Removes an Object from a Category.
|
public CategoryController(Model model, MultiPurposeController mp)
model - the Modelmp - the MultiPurposeControllerpublic void initCategories()
public void addCategory(Category category)
category - the new Categorypublic void addNewCategory(java.lang.String name)
name - Bezeichnung der neuen Kategoriepublic void removeCategory(Category c)
c - Categorypublic void deleteCategory(java.lang.String category)
category - the Categorypublic void addObject(Category category, AbstractCpsObject object)
category - Categoryobject - Objectpublic void addNewHolonObject(Category category, java.lang.String object, java.util.ArrayList<HolonElement> elements, java.lang.String image)
category - Categoryobject - New Object Nameelements - Array of Elementsimage - the image Pathpublic void addNewHolonTransformer(Category cat, java.lang.String objName, java.lang.String image)
cat - CategoryobjName - New Object Nameimage - the image Pathpublic void addNewHolonSwitch(Category cat, java.lang.String objName, java.lang.String image)
cat - CategoryobjName - New Object Nameimage - the Image Pathpublic void removeObject(Category category, AbstractCpsObject cps)
category - Categorycps - the Objectpublic void deleteObject(java.lang.String category,
java.lang.String obj)
category - the Categoryobj - the Objectpublic void addCategoryListener(CategoryListener catLis)
catLis - the CategoryListenerpublic void notifyCatListeners()