ui.controller

## Class CanvasController

- java.lang.Object
- - ui.controller.CanvasController

-     public class CanvasController
      extends java.lang.Object

  Controller for the Canvas.
  Author:
    Gruppe14

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CanvasController(Model model, MultiPurposeController mp)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CanvasController

          public CanvasController(Model model,
                                  MultiPurposeController mp)

      Constructor.
      Parameters:
        `model` - the Model
        `mp` - the MultipurposeController

  - ### Method Detail

    - #### addObject

          public void addObject(AbstractCpsObject object)

      Add an CpsObject to the model and notify the ObjectListener for update.
      Parameters:
        `object` - CpsObject to be added.

    - #### addNewObject

          public void addNewObject(AbstractCpsObject object)

      Add a new Object.
      Parameters:
        `object` - the Object

    - #### addObjectListener

          public void addObjectListener(ObjectListener objLis)

      adds the ObjectListener.
      Parameters:
        `objLis` - ObjectListener

    - #### notifyObjListeners

          public void notifyObjListeners()

      notifies all listeners about changes in the Canvas.

    - #### deleteObjectOnCanvas

          public void deleteObjectOnCanvas(AbstractCpsObject obj)

      Deletes an CpsObject on the Canvas and its connections.
      Parameters:
        `obj` - AbstractCpsObject

    - #### addEdgeOnCanvas

          public void addEdgeOnCanvas(CpsEdge edge)

      Add an edge to the Canvas.
      Parameters:
        `edge` - the edge

    - #### removeEdgesOnCanvas

          public void removeEdgesOnCanvas(CpsEdge edge)

      Removes an Edge from the Canvas.
      Parameters:
        `edge` - the edge to remove

    - #### copyObjects

          public void copyObjects()

      Copy all Selected Objects.

    - #### pasteObjects

          public void pasteObjects(java.awt.Point p)

      Paste all Selected Objects.
      Parameters:
        `p` - the mouse Position

    - #### cutObjects

          public void cutObjects()

      Cut all Selected Objects.