Application Views Refactor

 The New View For Fluency Apps

The class has decided that it would be in the best interest of Fluency to allow for multiple views of an application. Views will have their own properties: a view may show pipes or not, may show visual widgets or not, and may show non-visual widgets or not. This can easily be expanded to other view related properties. There must be one default view- it shows visual widgets where they will appear in the final finished GUI that is built by Fluency.

A Picture - And A Description

 

This shows 2 possible ApplicationViews in the AppTabbedPane (the class that contains the Tabbed GUI). Every app is contained this Frame, and the author can switch between them by selecting a new tab. Inside the tab, there should be a toggle pane to turn on and off the different views independently. This allows for a larger work area when needed. The Layout View shows the author's layout of the GUI being built. No non-visual widgets will need to be here, because no pipes show up. When a widget is selected in any view, it is highlighted in all view in which it appears, as shown in red. Visual widgets may or may not look exactly the same in both views, we'll need to decide what makes sense. Adding user defined views would be a great improvement.             

Application MVC

Applications have a model (called the ApplicationModel), a series of views (called ApplicationViews), and a controller (called the ApplicationController). Inside every ApplicationModel is a Map of WidgetID's to WidgetControllers. Every ApplicationView will have a set of WidgetViews, one for every WidgetController in the corresponding ApplicationModel.
 

Steps To Take

 This refactor should not break the build. It will be done in small steps, and the Logic view will be derived directly from the currently Application view.

Done is marked in italics, not done in bold

  1. Come up with tests (this could be difficult because this is mostly GUI work)
  2. Rename the Application view to be the Logic View
  3. Change the widget location property to be logic location property
  4. Create the tabbed pane and it's window.
  5. Add the Logic view to it.
  6. Set up new applications to be created in new tabs, rather than new windows.
  7. Remove the side dock and move its widgets to the logic view at start-up
  8. Add the AppTabbedView to saved preferences list
  9. Convert the tabs to Java 6 (instead of using legacy code).
  10. Make a single class for all views, ApplicationView (this is underway).
    1. Make ApplicationView contain a JPanel instead of extend EditorInternalFrame
      1. This is going to be difficult, but the current setup is not good. The AppTabbedView is an EditorInternalFrame, and it contains tabs, which contain EditorInternalFrames (ApplicationViews)
      2. This is bad, because Widgets are added directly to EditorInternalFrames right now. They need to be setup to be dragged to the AppTabbedView, and thereby added to all ApplicationViews on the top open tab.
      3. ApplicationPanel should therefore contain a JPanel, so the AppTabbedView can tell the top level ApplicationController to add a widget, which will then add the appropriate widgetView to all it's ApplicationViews.
    2. Give ApplicationView its own settings
    3. These include if it show visual widgets, nonvisual widgets, pipes, etc
  11. Create the two default views (layoutview and logicview, instances of ApplicationView, not classes)
  12. Create the view toggle panel or menu, and attach the views to it.
  13. Make every widget have a separate widgetview for every application view it is in.
  14. Make every widgetview have it's own location property for whatever view it's in.
  15. Make the only WidgetProperty dealing with location the LayoutLocation, since this is all the widget cares about (where it is in the final product).
  16. Make custom settings for every view (set defaults for logicView and layoutView).
    1. LogicView should contain all widgets and pipes
    2. LayoutView should not contain pipes or non-visual widgets
  17. Make sure all widgetviews for the same widget get selected simultaneously
  18. Make sure widgets appear in all views that they should belong to when added to any view
  19. Change the way applications are created, so that when run, they show widgets in LayoutViewLocations, not LogicViewLocations

As this project is underway, I'm sure this list will grow.

Completed Work and Notes:

this has been cleared since it's done.

  1.  

New Tab/Application Interface:

In this new design of the Application the Application Frame will encompass all the new applications as tabs. Whenever an application is created a new tab is formed inside the application frame showing both the Layout & Logic View - currently it only shows the logic view inside the tab. When many applications are added a scroll appears on the right hand side of the application frame to go to other tabs/applications. We did this because otherwise newly created applications which did not fit on one line overflowed to the next row. Also Initially we had made the tab area contain both a label & a close button to exit the application.

SEE ALSO [http://fluency.knownspace.org/confluence/display/fdoc/Applications, Widgets, and Their Views] FOR WIDGET MVC


 

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.