= Analysis = == Overview == The Main Window is one of the basic GUI elements. == Task requirements == To create the APP_MAIN_WINDOW, application must provide extension points for: * Layout Components * Flaps * Left Flap * Right Flap * Bottom Flap * Book Desktop * Menu Bar * Status Bar == Requirements to the task result == The result of this task must be code. == Related == [wiki:APP_MAIN_WINDOW Main Window] [wiki:APP_BASIC_GUI_ELEMENTS App Elements] == How to demo == Start the application show the layout, change the layout, stop the application, and then start it again. The new configuration must be preserved. = Design = * For general information of the design see the specification pages => [wiki:SoftwareRequirementsSpecification Specification] * Status bar is not defined yet and is not clear what it will contain and how it will work. We will leave it for later revisions. * Here is simple explanation of the main window of sophie2. We will briefly show how the window is constructed and what are its parts. * Implementation details are provided by the following diagrams. * The main window of sophie2 is represented by the !AppView class. UML Diagram: [[Image(source:/trunk/sophie2-platform/doc/uml-design-diagrams/app-main-window/AppView.png@127)]] * It consists of left, right and bottom flaps, a books' desktop and a menu bar. * Here is a hierarchy of the flaps in sophie2: [[Image(source:/trunk/sophie2-platform/doc/uml-design-diagrams/app-main-window/FlapsDiagram.png@127)]] * Every flap is attachable and detachable. One can obtain this functionality by using the attach(...) and detach(...) methods. * Every flap in sophie2 should extend the base flap class. * One should override the attach and detach methods to have e flap of his own. * One should also provide a method to add tabs to the flap. Typically the addChildren() method. * Here is a diagram of the Book's desktop classes. These are the classes that combined construct the desktop. * The JDesktopPane and JScrollPane are Swing classes we extend to add functionalities to serve out needs. * The !DockableDesktopScroll is a JScrollPane and a Dockable. This gives us the opportunity to add the !BookDesktop to the main window. * The !DesktopPane is added to the !DockableDesktopScroll and books are added in it. * One can add visual representations of books ( JInternalFrame ). * Books can be tiled and cascaded using the tileFrames() and cascadeFrames() methods. * Size of the !BookDesktop is settable. * !DesktopManager class is a helper class for the !DesktopPane to handle its desktop-like actions. [[Image(source:/trunk/sophie2-platform/doc/uml-design-diagrams/app-main-window/BooksDesktop.png@127)]] [[Image(source:/trunk/sophie2-platform/doc/uml-design-diagrams/app-main-window/MenuBar.png@127)]] = Implementation = = Testing = = Log = [[Include(wiki:APP_MAIN_WINDOW_R0_LOG)]]