wiki:APP_LAYOUT_MYDOGGY_R1
Last modified 11 years ago Last modified on 07/26/09 16:39:26

Error: Macro BackLinksMenu(None) failed
compressed data is corrupt

Error: Macro TicketQuery(summary=APP_LAYOUT_MYDOGGY_R1, format=table, col=summary|owner|status|type|component|priority|effort|importance, rows=description|analysis_owners|analysis_reviewers|analysis_score|design_owners|design_reviewers|design_score|implementation_owners|implementation_reviewers|implementation_score|test_owners|test_reviewers|test_score|) failed
current transaction is aborted, commands ignored until end of transaction block

Analysis

Overview

  • The goal is to improve the "org.sophie2.main.layout.mydoggy" module. This is also connected with the library mydoggy itself.

Task requirements

  • Currently mydoggy libary does not support changing of the look and feel with a third party ones that use the SynthLookAndFeel. (This is connected with setting a font somewhere in the code of mysoggy library.)
    • Fix this by providing implementation of the needed classes that fix these classes.
  • Myddogy uses a customization ".properties" files that can change its UI. Provide a mechanism for changing the UI of mydoggy along with a skin changing.
  • Rewrite some classes of the "org.sophie2.main.layout.mydoggy" module of the whole module if needed. The goal is to remove all irregularities and improve the code. Other than that adding new flaps, tabs and palettes should not break Sophie2.
    • Provide a main window that uses an applet. This is useful to set some things up for the applet.

Task result

  • source code
  • demo with the new implementation

Implementation idea

  • review source code of the library and provide the fixed stated above.
  • review "org.sophie2.main.layout.mydoggy" and improve it as stated in the requirements section.

BASE_LAYOUT_R0
APP_LAYOUT_MYDOGGY_R0

How to demo

  • Run sophie2.
  • Explain what has been improved.

Design

  • MyDoggy - the whole "org.sophie2.main.layout.mydoggy" module should be rewritten (Flaps, tabs and palettes part).
    • Fixing mydoggy library:
      • There is a bug in the mydoggy built in "DockedContainer" that doesn't allow look and feel setting because of improper getting of the default font from a SynthLookAndFeel. This means that setting a system LookAndFeel is OK, while setting a synth one breaks mydoggy.
      • A package that fixes mydoggy will be created inside the "org.sophie2.main.layout.mydoggy" module. It will be named "fixes" and will contain:
        • An implementation of "DockedContainer" in a class called SophieDockedContainer. It will provide a default font and set in the places where mydoggy breaks.
        • In order to have a consistently working mydoggy we should also provide an implementation of "ToolWindowDescriptor" in a class called SophieToolWindowDescriptor. It is needed for another class described later so that it return a "SophieDockedContainer". The "getToolWindowContainer" will be overridden to provide it.
        • The SophieToolWindowDescriptor is needed in MyDoggyToolWindowManager. In order for the whole fix to work we should provide a SophieToolWindowManager that overrides the "createDescriptor" method.
    • Refactoring our implementation for layouting:
      • UML diagram:
        source:branches/private/peko/sophie2-mydoggy-refactoring/doc/uml-design-diagrams/mydoggy-module-uml.png
      • As described in the diagram we have two base classes for layout elements and these are the simple MDLayoutElement and a MDCompoundLayoutElement. The only difference is that the compound elements has a list property of subElements and a ToolWindowManager. Before that the "subElements" were defined in every implementor of the MDCompoundLayoutElement. The MDManageable interface is to point out that some layout component has a tool window manager. The ToolWindowManager is something that actually lays out the elements and is a class of mydoggy library.
      • MDMainWindow is now divided into two implementations with common things extracted in a super class. Two two implementations will provide different types of components:
        • MDMainWindow - common things like flaps, documents windows etc.
          • MDFrameWindow - providing a JFrame as a global container. The former MDMainWindow.
          • MDAppletWindow - providing a JApplet as a global container. The implementation of this class will be done in the implementation phase. It is mentioned here as an outline.
      • The MDDocumentWindow is a class that lays out the opened documents. Its model is the DocumentWindow and its anchor is null, since "no one" needs an anchor for it.
  • Changesets:
    • 4471 - a bugfix of the core logging module (provided by deni). It will be nice if it is included along with this task.
    • 4472 - fixes of mydoggy library to support synth look and feel.
    • 4475 - A unit test modified and a look and feel jar with a LGPL license added in the POM.
    • 4482 - fix of the MDDocumentWindow class.

Implementation

  • Implementation is done according to design.
  • Changesets:
    • 4507
    • 4513
    • 4551 - final fixes. MDFlap, MDTab and MDPalette made final. Models of these are now final properties. Updating flaps and palettes through the model is now not possible.
    • 4552 - MDDocument fix.

Testing

Comments

  • MyDoggy library does not support moving of palettes. Actually the implementation as it is provides only moving of flaps.

Log