public class CpsAPI
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
consolePrint(java.lang.String text)
prints a given text on the console.
|
void |
consolePrint(java.lang.String text,
java.awt.Color color,
int p,
boolean bold,
boolean italic,
boolean nl)
prints a given text on the console with more details.
|
java.util.ArrayList<CpsEdge> |
getAllEdges()
Reutn all Edges on the Canvas in no specific order.
|
java.util.ArrayList<HolonObject> |
getAllHolonObjects()
Return all Holon Objects on the Canvas in no specific order.
|
java.util.ArrayList<AbstractCpsObject> |
getAllObjOnCanvas()
Return all Objects on the Canvas in no Specific order.
|
java.util.ArrayList<HolonSwitch> |
getAllSwitches()
Return all Swtiches on the Canvas in no specific order.
|
java.util.ArrayList<SubNet> |
getSubNets()
a SubNet contains all Components.
|
void |
resetBorderColor(AbstractCpsObject toReset)
resets the bordercolor of given object to default (white).
|
void |
resetBorderColorForAll()
resets the bordercolor for all objects on canvas.
|
void |
setBorderColorForMultObj(java.util.ArrayList<AbstractCpsObject> objects,
java.awt.Color color)
changes the borderColor for all objects in List to given color.
|
void |
setBorderColorForObj(AbstractCpsObject toChange,
java.awt.Color color)
changes the border color of given object to given color.
|
public CpsAPI(Control cont)
cont
- Controllerpublic java.util.ArrayList<SubNet> getSubNets()
public java.util.ArrayList<AbstractCpsObject> getAllObjOnCanvas()
public java.util.ArrayList<CpsEdge> getAllEdges()
public java.util.ArrayList<HolonSwitch> getAllSwitches()
public java.util.ArrayList<HolonObject> getAllHolonObjects()
public void consolePrint(java.lang.String text)
text
- Textpublic void consolePrint(java.lang.String text, java.awt.Color color, int p, boolean bold, boolean italic, boolean nl)
text
- the text that will be printedcolor
- the color the text will havep
- font sizebold
- true or falseitalic
- true or falsenl
- new line after textpublic void setBorderColorForObj(AbstractCpsObject toChange, java.awt.Color color)
toChange
- CpsObjectcolor
- Colorpublic void setBorderColorForMultObj(java.util.ArrayList<AbstractCpsObject> objects, java.awt.Color color)
objects
- AttayList of CpsObjectcolor
- Colorpublic void resetBorderColor(AbstractCpsObject toReset)
toReset
- CpsObjectpublic void resetBorderColorForAll()