Fluency MP3 Sorter - Team 2
We set our main goal around the user interface shown below. The target is to implement all the visual and non visual widgets (more details below) in Fluency and then build the UI using Fluency.

The Design Requirements
We identified three main supports that we need to add in-order for Fluency to build the required MP3 Sorter.
Database Support:
We are planning to use Apache Derby (Link) as the embedded database for the sorter. Apache Derby is free (under apache license) and also has a very low memory footprint (only 2MB). In-order for Fluency to use a database an implementation of generic database access widget is required. This can either be a derby specific for the initial version or be a generic non-visual widget so that the data base can be a pluggable component.
File Access Support
File system browsing, reading and writing support needs to be implemented as a non visual widget. This widget should support all the file access requirements of the visual widgets that are used to implement the interface of the sorter. As an improvement a generic file access widget can be implemented so that it can retrieve files from a network location as well.
MP3 Meta-Data Support
To retrieve meta-data regarding the MP3s to be sorted we use JID3 library which again requires wrapping using a non visual widget in Fluency.
Visual Widgets
FluencyTree
This is a widget that is similar to the swing component JTree which will be used to show the directory listing under a given folder. A generic implementation of this widget will support many other usages as well.
FluecnyTable
This is again a fluency widget that needs to be implemented to replace the JTable swing component.
FluencyMenu
This is to support the menus in Fluency although not a mandatory requirement for the MP3 sorter.
All these widgets are composite widgets and the containment support is a mandatory requirement to support these widgets.
Top Level Components

Action - Event Diagram
Following action diagram outlines an abstract Event-Action flow in the proposed MP3 Sorter. Action event relations in the Data base widget, File Browser Widget, Fluency Table Widget and the Fluency Tree Widget are not yet complete. However we believe that each of these widgets should be implemented as generic widgets and once completed they can easily be used to compose the MP3 Sorter interface.

The Workflow:
After setting the Source folder and the Destination folder the MP3Sorter widget(non-visual) will be initialized The sort button will initialize the FORLOOP widget(we can make it visual or non-visual).The processFileAction() of the MP3Sorter widget will be responsible for setting the Database Widget(non-visual), the Fluency Tree widget(visual) and the Fluency Table widget(visual) with the help of the JID3 Wrapper widget(non-visual wiget specific to MP3 Sorter) and the FileReader wiget(non-visual generic).
So there is a requirement of a FORLOOP widget for the MP3 Sorter whcih needs to be implemented in the Fluency.
What do we need?
PopupMenu and/or multi-frame
Can we have a PopupMenu delegate (not clear)
Containment.
Hard part is to implement Fluency enough to do it.
In fact, one can change FrameDelagate and PanelDelegate to have layout manager other than null, it will work, but we need to let Fluency handle it as well.
Propose: Each swing container widget (FrameDelegate and PanelDelegate) is associated with one Fluency layout holder, which is in charge of handling and relaying layout events. Layout holder wraps up visual container widgets:

Not sure about how size negotiation would go, since in case of contained Swing widget has size negotiation request, those are probably not captured.
Note, interaction with Keyboard focus manager?
multiple frames? Use null layout manager to avoid
Swing widget interaction![]()
Comments (3)
Sep 26, 2006
Micah Linnemeier says:
We're not sure how events and actions fit into your design. Everything looks lik...We're not sure how events and actions fit into your design. Everything looks like a method call.
Many of your widgets have arrows coming in, but no arrows coming out, and nothing listed that look like out events. How do those widgets, like the database widget, communicate with other widgets? For instance, the database will at some point presumably send results from some query.
Sep 27, 2006
Jaliya Ekanayake says:
Yes, we agree that we have not explored the database and the JID3 wrapper widget...Yes, we agree that we have not explored the database and the JID3 wrapper widgets. The basic concept we use is in Fluency we can always emit an event after a action so that the event flow is maintained.
This approach is shown in the FileReader widget.
Team 2
Sep 27, 2006
Russell Duhon says:
I'm unclear about what you expect your FileReader widget to do on a detailed lev...I'm unclear about what you expect your FileReader widget to do on a detailed level. You do not specify what the inputs to the actions or the output events will be like. You seem to be treating the FileReader widget as an object instead of as a high level abstraction (ie, first you set the folder, then you get the count to know how many times you need to loop, then you ask to read each file, then you process the outputted events). Assuming I'm reading right, this is wasteful and bundles some things together that are best kept separately.
Just have a widget that, given a directory, outputs a list of files. Let widgets receiving that list of files do whatever they want with it (for instance, if they only want a subset, they can just look at a subset). That removes all need for a loop, among other things.
Have another widget for reading files. It gets a filename, it sends out the contents of the file. Let it receive a list of file paths and then output a list of file contents, too, to make it really easy to plug in anywhere. Again, no need for a loop. No need to have a widget where a directory needs to be set before a file can be read. Easy and low in state.
I would be interested in seeing a detailed overview of an event flow through one of your widgets.