public abstract class AbstractCpsObject
extends java.lang.Object
Constructor and Description |
---|
AbstractCpsObject(AbstractCpsObject obj)
Constructor for a new CpsObject with an unique ID (This constructor
correspond to the interaction between the Categories and Canvas)-->
actually the "new" Object is a copy.
|
AbstractCpsObject(java.lang.String objName)
Constructor for a CpsObejct with an unique ID.
|
Modifier and Type | Method and Description |
---|---|
void |
addConnection(CpsEdge toConnect)
Add a new connection to the selected Object.
|
java.util.ArrayList<java.lang.Integer> |
addPseudoTag()
add a pseudo tag.
|
void |
addTag(int tag)
For internal purpose (energy flow).
|
java.awt.Color |
getBorderColor()
Get the color of the border.
|
java.util.ArrayList<CpsEdge> |
getConnectedTo()
List of all existing connections.
|
java.util.ArrayList<CpsEdge> |
getConnections()
List of all existing connections.
|
int |
getID()
Getter of the unique ID.
|
java.lang.String |
getImage()
Get the path of the image for the selected Object.
|
java.lang.String |
getName()
Getter for the user-defined name (no unique).
|
java.lang.String |
getObjName()
Getter for the type of the Object.
|
Position |
getPosition()
Get the actual position of the Object.
|
java.util.ArrayList<java.lang.Integer> |
getPseudoTags()
Get the pseudo tags.
|
java.lang.String |
getSav()
For save purpose.
|
java.util.ArrayList<java.lang.Integer> |
getTag()
Get the actual tags.
|
void |
resetTags()
Rest the tags to Null.
|
void |
setBorderColor(java.awt.Color c)
Set the Border Color of this CpsObject.
|
void |
setConnections(java.util.ArrayList<CpsEdge> arrayList)
Set a new ArrayList of connections (Update).
|
void |
setID(int id)
Set the ID to a new one.
|
void |
setImage(java.lang.String image)
Set the path of the image.
|
void |
setName(java.lang.String name)
Set the name.
|
void |
setObjName(java.lang.String objName)
Set the type of Object.
|
void |
setPosition(int x,
int y)
Set the position of the Object in the canvas.
|
void |
setPosition(Position pos)
Set the position of the Object in the canvas.
|
void |
setPseudoTags(java.util.ArrayList<java.lang.Integer> tags)
For internal purpose (energy flow).
|
void |
setSav(java.lang.String sav)
For save purpose.
|
void |
setTags(java.util.ArrayList<java.lang.Integer> tags)
For internal purpose (energy flow).
|
public AbstractCpsObject(java.lang.String objName)
objName
- of the Objectpublic AbstractCpsObject(AbstractCpsObject obj)
obj
- Object to be copiedpublic java.lang.String getObjName()
public void setObjName(java.lang.String objName)
objName
- Stringpublic java.lang.String getName()
public void setName(java.lang.String name)
name
- Stringpublic int getID()
public void setID(int id)
id
- the iD to setpublic java.lang.String getImage()
public void setImage(java.lang.String image)
image
- the Image to setpublic java.util.ArrayList<CpsEdge> getConnections()
public void setConnections(java.util.ArrayList<CpsEdge> arrayList)
arrayList
- the connections to setpublic java.util.ArrayList<CpsEdge> getConnectedTo()
public void addConnection(CpsEdge toConnect)
toConnect
- Edgepublic void setPosition(Position pos)
pos
- Coordinatespublic void setPosition(int x, int y)
x
- X-Coordy
- Y-Coordpublic Position getPosition()
public java.lang.String getSav()
public void setSav(java.lang.String sav)
sav
- the stored to setpublic java.awt.Color getBorderColor()
public void setBorderColor(java.awt.Color c)
c
- the BorderColorpublic void addTag(int tag)
tag
- for internal purposepublic java.util.ArrayList<java.lang.Integer> getTag()
public void resetTags()
public void setTags(java.util.ArrayList<java.lang.Integer> tags)
tags
- for internal purposepublic void setPseudoTags(java.util.ArrayList<java.lang.Integer> tags)
tags
- for internal purposepublic java.util.ArrayList<java.lang.Integer> getPseudoTags()
public java.util.ArrayList<java.lang.Integer> addPseudoTag()