[[BackLinksMenu]] [[TicketQuery(summary=APP_LAYOUT_MYDOGGY_R2, 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|)]] = Analysis = == Overview == The goal of this revision of the task is to create a more beautiful mydoggy interface for every skin of Sophie2. == Task requirements == * Provide a way to define skin parts for mydoggy. Currently there is no such mechanism. The skinning of the layout is provided by the base layout library with titles and tool-tips. The visual part that is mydoggy, should also be skinnable. This means that every layout component that provides a tool window manager should become a BaseVisualElement and define a skin part. * Mydoggy skin parts for every skin should be themselves included in the skin. * For some parts of mydoggy a custom UI should be provided. This is needed because mydoggy overrides the look and feel UIs that are provided by default. * Provide icons for the title bar of every tool window. Icons for flaps are slightly different from icons for inner tool window managers. * Provide colors for other parts of mydoggy. * Create a mechanism for auto updating of all mydoggy skin things. == Task result == * Source code. == Implementation idea == * See the already added updateUI() method of [source:branches/private/peko/sophie2-mydoggy/modules/org.sophie2.main.layout.mydoggy/src/main/java/org/sophie2/main/layout/mydoggy/MDManageable.java MDManageable] where the UI is updated upon skin changing. * Change the super class of some of the layout components to BaseVisualElement and provide a method: {{{ @SkinPartDef private static void defineSkin(ElementSkinPart part) { //fill in skin part. } }}} * Add an ID for the skin called "mydoggy-properties" that contains mydoggy customizations. * For UI classes no idea yet. == Related == [wiki:BASE_LAYOUT_R0][[BR]] [wiki:APP_LAYOUT_MYDOGGY_R0][[BR]] [wiki:APP_LAYOUT_MYDOGGY_R1][[BR]] [wiki:GROUP_BASE_SKINS_R0][[BR]] == How to demo == * Run sophie and change the skin from the skin menu. * Mydoggy should change its appearance depending on the skin chosen. = Design = * In order to define skinning for mydoggy, every MD component that has a tool window manager should become a BaseVisualElement and fill in skin parts using: {{{ @SkinPartDef private static void defineSkin(ElementSkinPart part) { //fill in skin part. } }}} * These components are the components that implement [source:branches/private/peko/sophie2-mydoggy/modules/org.sophie2.main.layout.mydoggy/src/main/java/org/sophie2/main/layout/mydoggy/MDManageable.java MDManageable]. * A class that sets up mydoggy skinning and updates mydoggy upon skin changing will be created. It will be named [source:branches/private/peko/sophie2-mydoggy/modules/org.sophie2.main.layout.mydoggy/src/main/java/org/sophie2/main/layout/mydoggy/MDSkinUpdater.java MDSkinUpdater]. * For current revision we should change the icons, title bars and tabs of mydoggy. * Icons will be setted up inside the [source:branches/private/peko/sophie2-mydoggy/modules/org.sophie2.main.layout.mydoggy/src/main/java/org/sophie2/main/layout/mydoggy/MDSkinUpdater.java MDSkinUpdater] by putting a new icon (replacing the old one) in the resource manager of every tool window manager. * For title bars and tabs we should define custom UI classes. After a serious research it turned out that the classes we need to extend are: * ToolWindowTitleBarUI - for every title bar of a tool window in mydoggy. * ToolWindowRepresentativeAnchorUI - for the tab button of a tool window in mydoggy. * The new classes will be [source:branches/private/peko/sophie2-mydoggy/modules/org.sophie2.main.layout.mydoggy/src/main/java/org/sophie2/main/layout/mydoggy/mdcustomization/SophieTitleBarUI.java SophieTitleBarUI] for the title bars and [source:data/work/sophie2/branches/private/peko/sophie2-mydoggy/modules/org.sophie2.main.layout.mydoggy/src/main/java/org/sophie2/main/layout/mydoggy/mdcustomization/SophieTabButtonUI.java SophieTabButtonUI] for the tabs. These two will provide same functionality as their super classes and will extend it by providing the opportunity to draw images for title bars and tabs. * We need to specify a way to map mydoggy resources for its customizing to string ids for the skin - colors and images for icons, tab buttons and title bars. In order to do so there will be e package named "constants" place - "org.sophie2.main.layout.mydoggy" = Implementation = = Testing = = Comments = = Log =