public class Model
extends java.lang.Object
Constructor and Description |
---|
Model()
Constructor for the model.
|
Modifier and Type | Method and Description |
---|---|
void |
addEdgeOnCanvas(CpsEdge edge)
Adds an Edge to The Canvas.
|
int |
getAutoSaveNr()
Returns the auto save Number.
|
java.util.ArrayList<Category> |
getCategories()
Returns all Categories.
|
java.util.List<CategoryListener> |
getCategoryListeners()
Returns the CategorieListener.
|
java.util.HashMap<java.lang.String,java.lang.Integer> |
getCgIdx()
Returns the Categorie Index.
|
java.util.ArrayList<AbstractCpsObject> |
getClipboradObjects()
Returns all Objects in the Clipboard.
|
Console |
getConsole()
Returns the Console.
|
int |
getCurIteration()
Returns cURiTERATION.
|
java.util.HashMap<java.lang.Integer,java.lang.Integer> |
getCvsObjIdx()
Returns the CanvasObject Index.
|
java.util.ArrayList<CpsEdge> |
getEdgesOnCanvas()
Get all Edges on the Canvas.
|
boolean |
getIsSimulation()
Returns the Simulation state (true = simulation, false = modeling).
|
int |
getIterations()
Returns ITERATIONS.
|
int |
getNumberOfSaves()
Returns the Number of Saves.
|
java.util.List<ObjectListener> |
getObjectListeners()
Returns the ObjectListener.
|
java.util.ArrayList<AbstractCpsObject> |
getObjectsOnCanvas()
Returns all Objects on the Canvas.
|
int |
getScale()
Returns the sCale (Scale for the Images).
|
int |
getScaleDiv2()
Returns sCALEdIV2 (The Scale divided by 2).
|
AbstractCpsObject |
getSelectedCpsObject()
Returns the Selected Cps Object.
|
java.util.ArrayList<AbstractCpsObject> |
getSelectedCpsObjects()
Returns all selected Objects on the Canvas.
|
CpsEdge |
getSelectedEdge()
Returns the selected Edge.
|
HolonElement |
getSelectedHolonElement()
Returns the Selected Holon Element.
|
int |
getSelectedObjectID()
Returns the ID of the selected Object 0 = no Object is selected.
|
int |
getTimerSpeed()
get the Interval in ms between each Iteration.
|
void |
removeEdgesOnCanvas(CpsEdge edge)
Remove an edge from the Canvas.
|
void |
setAutoSaveNr(int autoSaveNr)
Sets the auto save Number.
|
void |
setCategories(java.util.ArrayList<Category> categories)
Sets all Categories.
|
void |
setCategoryListeners(java.util.LinkedList<CategoryListener> linkedList)
Sets the CategorieListener.
|
void |
setCgIdx(java.util.HashMap<java.lang.String,java.lang.Integer> cgIdx)
Sets the Categorie Index.
|
void |
setClipboradObjects(java.util.ArrayList<AbstractCpsObject> c)
Sets the ClipboardObjects.
|
void |
setConsole(Console console)
Sets the console.
|
void |
setCurIteration(int curIT)
sets the current Iteration.
|
void |
setCvsObjIdx(java.util.HashMap<java.lang.Integer,java.lang.Integer> cvsObjIdx)
Sets the CanvasObject Index.
|
void |
setEdgesOnCanvas(java.util.ArrayList<CpsEdge> arrayList)
Sets the edges on the Canvas.
|
void |
setIsSimulation(boolean isSimulation)
Sets the Simulation state (true = simulation, false = modeling).
|
void |
setNumberOfSaves(int numberOfSaves)
Set the Number of Saves.
|
void |
setObjectListeners(java.util.LinkedList<ObjectListener> linkedList)
Sets the ObjectListener.
|
void |
setObjectsOnCanvas(java.util.ArrayList<AbstractCpsObject> objectsOnCanvas)
Sets all Objects on the Canvas.
|
void |
setScale(int scale)
Sets the Image Scale.
|
void |
setSelectedCpsObject(AbstractCpsObject selectedCpsObject)
Set the Selected Objecs.
|
void |
setSelectedEdge(CpsEdge edge)
Set the selected Edge.
|
void |
setSelectedHolonElement(HolonElement selectedHolonElement)
Sets the Selecte HolonElement.
|
void |
setSelectedObjectID(int id)
Set the ID of the selected Object 0 = no Object is selected.
|
void |
setTimerSpeed(int t)
Sets the Interval in ms between each Iteration.
|
java.lang.String |
toStringCat()
Transform the Arraylist of categories into a string of all objectName
with a separation (',') between each name.
|
public Model()
public java.util.ArrayList<Category> getCategories()
public void setCategories(java.util.ArrayList<Category> categories)
categories
- the categories to setpublic java.lang.String toStringCat()
public java.util.ArrayList<AbstractCpsObject> getObjectsOnCanvas()
public void setObjectsOnCanvas(java.util.ArrayList<AbstractCpsObject> objectsOnCanvas)
objectsOnCanvas
- the objectsOnCanvas to setpublic java.util.ArrayList<CpsEdge> getEdgesOnCanvas()
public void addEdgeOnCanvas(CpsEdge edge)
edge
- the edgesOnCanvas to addpublic void removeEdgesOnCanvas(CpsEdge edge)
edge
- the edge to removepublic void setEdgesOnCanvas(java.util.ArrayList<CpsEdge> arrayList)
arrayList
- the edgesOnCanvas to setpublic java.util.List<ObjectListener> getObjectListeners()
public void setObjectListeners(java.util.LinkedList<ObjectListener> linkedList)
linkedList
- the objectListeners to setpublic java.util.List<CategoryListener> getCategoryListeners()
public void setCategoryListeners(java.util.LinkedList<CategoryListener> linkedList)
linkedList
- the categoryListeners to setpublic void setSelectedObjectID(int id)
id
- the IDpublic int getSelectedObjectID()
public AbstractCpsObject getSelectedCpsObject()
public void setSelectedCpsObject(AbstractCpsObject selectedCpsObject)
selectedCpsObject
- Objects that are selectedpublic java.util.ArrayList<AbstractCpsObject> getSelectedCpsObjects()
public HolonElement getSelectedHolonElement()
public void setSelectedHolonElement(HolonElement selectedHolonElement)
selectedHolonElement
- that is Selectedpublic int getScale()
public int getScaleDiv2()
public void setScale(int scale)
scale
- for the imagepublic int getIterations()
public void setCurIteration(int curIT)
curIT
- the current Iterationpublic int getCurIteration()
public void setSelectedEdge(CpsEdge edge)
edge
- that is selectedpublic CpsEdge getSelectedEdge()
public java.util.HashMap<java.lang.String,java.lang.Integer> getCgIdx()
public void setCgIdx(java.util.HashMap<java.lang.String,java.lang.Integer> cgIdx)
cgIdx
- the cgIdx to setpublic java.util.HashMap<java.lang.Integer,java.lang.Integer> getCvsObjIdx()
public void setCvsObjIdx(java.util.HashMap<java.lang.Integer,java.lang.Integer> cvsObjIdx)
cvsObjIdx
- the cvsObjIdx to setpublic void setAutoSaveNr(int autoSaveNr)
autoSaveNr
- the auto save numberpublic int getAutoSaveNr()
public int getNumberOfSaves()
public void setNumberOfSaves(int numberOfSaves)
numberOfSaves
- the numberOfSaves to setpublic void setClipboradObjects(java.util.ArrayList<AbstractCpsObject> c)
c
- Array of Objectspublic java.util.ArrayList<AbstractCpsObject> getClipboradObjects()
public void setConsole(Console console)
console
- the consolepublic Console getConsole()
public void setTimerSpeed(int t)
t
- speed for the Iterationspublic int getTimerSpeed()
public void setIsSimulation(boolean isSimulation)
isSimulation
- boolean for for isSimulationpublic boolean getIsSimulation()