public class CanvasController
extends java.lang.Object
Constructor and Description |
---|
CanvasController(Model model,
MultiPurposeController mp)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addEdgeOnCanvas(CpsEdge edge)
Add an edge to the Canvas.
|
void |
addNewObject(AbstractCpsObject object)
Add a new Object.
|
void |
addObject(AbstractCpsObject object)
Add an CpsObject to the model and notify the ObjectListener for update.
|
void |
addObjectListener(ObjectListener objLis)
adds the ObjectListener.
|
void |
copyObjects()
Copy all Selected Objects.
|
void |
cutObjects()
Cut all Selected Objects.
|
void |
deleteObjectOnCanvas(AbstractCpsObject obj)
Deletes an CpsObject on the Canvas and its connections.
|
void |
notifyObjListeners()
notifies all listeners about changes in the Canvas.
|
void |
pasteObjects(java.awt.Point p)
Paste all Selected Objects.
|
void |
removeEdgesOnCanvas(CpsEdge edge)
Removes an Edge from the Canvas.
|
public CanvasController(Model model, MultiPurposeController mp)
model
- the Modelmp
- the MultipurposeControllerpublic void addObject(AbstractCpsObject object)
object
- CpsObject to be added.public void addNewObject(AbstractCpsObject object)
object
- the Objectpublic void addObjectListener(ObjectListener objLis)
objLis
- ObjectListenerpublic void notifyObjListeners()
public void deleteObjectOnCanvas(AbstractCpsObject obj)
obj
- AbstractCpsObjectpublic void addEdgeOnCanvas(CpsEdge edge)
edge
- the edgepublic void removeEdgesOnCanvas(CpsEdge edge)
edge
- the edge to removepublic void copyObjects()
public void pasteObjects(java.awt.Point p)
p
- the mouse Positionpublic void cutObjects()