Applications
The purpose of Fluency is to allow authors to create applications. The model for every application created is contained in a FluencyApplicationModel. This model keeps a list of current views of itself, each of which is an ApplicationView. Every application also has a list of its widgets. Finally, every ApplicationView has a list of its WidgetViews. The diagram below shows this visually:
WidgetView
This is the part of the widget that can be displayed. It contains both the icons (for the toolbar and WidgetFinder) and the WidgetViewPanel(which is a JPanel that contains the way the widget looks when building the GUI or running it (for visualWidgets). WidgetView used to also keep track of its own harbors, names, and a few other things that were unrelated. Those have now been merged with the equivalent versions in Widget itself, but a few methods still exist in WidgetView for setting and accessing these items (using the Widget's stored information). Every Widget has at least one WidgetView and every WidgetView has a Widget.
WidgetController
A WidgetView and a WidgetModel are attached to every WidgetController when it is created. It talks to the outside world (at the moment, unless we change this soon).
WidgetModel
WidgetModel contains all of the state information for a widget. This includes the name, properties, harbors, etc.
WidgetPrototype
This class contains the information for creating widgets, particularly from XML. I will keep the class updated as I learn more.
Note about old class names
Before I started working on this refactor, there were other names for the above classes. The current names reflect the actual uses of the classes, but I haven't necessarily found all of the instance variables. If you find odd code like WidgetPrototype data = new WidgetPrototype(), the reason is that the old class was called WidgetData. Feel free to refactor statements like this to WidgetPrototype widgetPrototype = new WidgetPrototype(). Other examples may be present for WidgetView as well.
