use of org.malai.ex.draw.model.MyDrawing in project Malai by arnobl.
the class EditorFrame method initialisePresentations.
@Override
public void initialisePresentations() {
/*
* A UI is composed of presentations.
* Each presentation is a couple abstract presentation
* and concrete presentation.
* In this example, the abstract presentation is the drawing
* and its concrete presentation the Swing canvas representing it.
*/
// Creating the model.
MyDrawing drawing = new MyDrawing();
// Creating the view.
MyViewDrawing canvas = new MyViewDrawing();
/*
* Creating a presentation composed of these two elements.
* Adding this presentation to the set of presentations of the UI.
*/
presentations.add(new Presentation<>(drawing, canvas));
}
Aggregations