View-Control Architecture

2014. 06. 20.

I have created a DocumentList class for managing multiple documents with selection change listener and other operations, and the corresponding DocumentListView class. It builds a simple layout to put the buttons in. There is also the DoucmentButton. When the List creates the View then it calls the contained Document instances button building methods. These methods also assign the proper methods in the List to the events.

Also a main class was created to put the basic layout and these document classes together. It is a simple three column layout. One for the documents and a splitter for the editor and preview. This main class assigns the proper methods to the selection changed event and also a text changed listener to the editor view. This listener updates the current documents content and uses the documents processor to convert the text and put it into the WebView instance. It also creates the menu, but the menu items are not working yet.