public class ObjectController
extends java.lang.Object
Constructor and Description |
---|
ObjectController(Model model,
MultiPurposeController mp)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addElement(HolonObject object,
HolonElement element)
Adds Element into a Object.
|
void |
addElementIntoCanvasObject(HolonObject object,
HolonElement element)
Adds Element into a Object on the Canvas.
|
void |
addElementIntoCategoryObject(java.lang.String category,
java.lang.String object,
HolonElement element)
Add Element into a Object in Category.
|
void |
addNewElementIntoCanvasObject(int id,
java.lang.String element,
int amount,
float energy)
Add a new Element into a Object on the Canvas.
|
void |
addNewElementIntoCategoryObject(java.lang.String category,
java.lang.String object,
java.lang.String element,
int amount,
float energy)
Add a new Element into a Object in Category.
|
void |
addSelectedObject(AbstractCpsObject obj)
add an Object to selectedObject.
|
void |
deleteElement(HolonObject obj,
HolonElement ele)
deletes a Element from a given Object.
|
void |
deleteElementInCanvas(int id,
int eleid)
deletes a Element from a given Canvas Object.
|
void |
deleteElementInCategory(java.lang.String cat,
java.lang.String obj,
java.lang.String ele)
deletes a Element from a given Category Object.
|
void |
deleteSelectedObject(AbstractCpsObject obj)
deletes a selectedObject.
|
void |
initHolonElements()
init default Power supply of the Power Plant.
|
void |
setClipboardObjects(java.util.ArrayList<AbstractCpsObject> list)
sets clipBoardObjects.
|
void |
setSelectedObjectID(int id)
Returns the ID of the selected Object 0 = no Object is selected.
|
public ObjectController(Model model, MultiPurposeController mp)
model
- Modelmp
- MultiPurposeControllerpublic void initHolonElements()
public void addElement(HolonObject object, HolonElement element)
object
- the Objectelement
- the Elementpublic void addElementIntoCanvasObject(HolonObject object, HolonElement element)
object
- the Objectelement
- the Elementpublic void addNewElementIntoCanvasObject(int id, java.lang.String element, int amount, float energy)
id
- the Object IDelement
- the Name of the Elementamount
- the Amountenergy
- the Energypublic void addElementIntoCategoryObject(java.lang.String category, java.lang.String object, HolonElement element)
category
- the Categoryobject
- the Objectelement
- the Elementpublic void addNewElementIntoCategoryObject(java.lang.String category, java.lang.String object, java.lang.String element, int amount, float energy)
category
- the Categoryobject
- the Objectelement
- the Element Nameenergy
- the Energyamount
- the amountpublic void deleteElement(HolonObject obj, HolonElement ele)
obj
- the Ojectele
- the Elementpublic void deleteSelectedObject(AbstractCpsObject obj)
obj
- Cpsobjectpublic void addSelectedObject(AbstractCpsObject obj)
obj
- AbstractCpsobjectpublic void deleteElementInCanvas(int id, int eleid)
id
- the IDeleid
- the Element IDpublic void deleteElementInCategory(java.lang.String cat, java.lang.String obj, java.lang.String ele)
cat
- the Categoryobj
- the Objectele
- the Elementpublic void setSelectedObjectID(int id)
id
- the ID of the selected Objectpublic void setClipboardObjects(java.util.ArrayList<AbstractCpsObject> list)
list
- of CpsObjects