@@ -17,4 +17,42 @@ The class of the view serves as the glue between the layout of the view and the
...
@@ -17,4 +17,42 @@ The class of the view serves as the glue between the layout of the view and the
<imgsrc="/uploads/fc1264bd0d522f662f053e1a2c0ec76e/MVC-ATHEN_Views.PNG"alt="MVC of the editor and the views"style="width: 640px;"style="height: 480px;"/>
<imgsrc="/uploads/e1c2b25570dacc1a479eb06dc84b6960/MVC-ATHEN_Views.PNG"alt="MVC of the editor and the views"style="width: 640px;"style="height: 480px;"/>
\ No newline at end of file
So the controller (our view class) serves as the glue between the actual UI and the editor. Let us see how this is done correctly.
# Creating the View (The corresponding UI Element)
Inside the method
```java
initLayout(Compositeparent)
```
you should initialize this UI element. The following snippet shows the current state of the CorefView
All the code does, is to create a new widget (the corefViewComposite), and set its input. It is fine to assume that the ui element can hold a reference to the current object of the controller. This is done in this line:
```java
corefViewComposite.setInput(this);
```
So the view can store this reference of the controller and communicate with it.