Notes on Implementing Brick Cad with the MVC Framework

MVC Framework

The MVC GUI

We are using Java Foundation Classes (Swing) to create the MVC GUI.

Here are my lecture notes on Java Foundation Classes

Basically, a Swing GUI is a tree. The root of the tree is the frame of the desktop window (JFrame). In our case this is the MVCApp.

Each node in the tree is either a container (JPanel, JDesktop, JMenuBar, etc.) or a control (JButton, JMenuItem, etc.) The containers are parent nodes and the controls are leaf nodes.

JInternalFrames are special containers that are contained in a JDesktop. In MVC these are called ViewFrames.

A view frame contains a JPanel, which in our case will be the views of the MVC framework.

Event Delegation

Controls are publishers. Usually the controls parent is the subscriber.

Here are my lectures on Event Delegation as Publisher-Subscriber.