EasternEdgeRobotics / Software_2017

The control software for 2017
MIT License
3 stars 0 forks source link

Merge view launcher and loader classes #303

Closed cal-pratt closed 7 years ago

cal-pratt commented 7 years ago

I initially created the ViewLauncher as a means for the MainViewController to load View objects. In order for the ViewLauncher to open windows it had to have a reference to the ViewLoader, and in order for the MainViewController to be given the ViewLauncher, the ViewLoader had to have a reference to the ViewLauncher. This created a cyclic dependency between them, making the initialization process complicated.

To remedy this the ViewLoader has been modified to perform the actions of the ViewLauncher, and the ViewLauncher has been removed. The old ViewLoader methods have been made private and only expose the new launch methods. The ViewLoader also adds itself to the dependency map, such that the MainViewController can still open windows.

I also added some Javadocs to the ViewLoader class as it lacked any description.