[[BackLinksMenu]] [[TicketQuery(summary=GROUP_FILLING_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|)]] = Analysis = == Overview == The gradient chooser should follow the behaviour of all sophie dialogs - it should be in a HUD with no submit and cancel buttons. The model should be automatically updated when a change is made. == Task requirements == * The gradient chooser should be shown in a HUD. * When selecting a color from the gradient HUD, the Sophie 2 Color Picker should be used, rather than the JColorChooser. == Task result == The result of the task is source code. == Implementation idea == * Take the current gradient chooser's source code and make the necessary changes. * Attach events listeners to it, so the model is updated. * Remove the submit/cancel buttons. == Related == [wiki:GROUP_FILLING_R0][[BR]] [wiki:APP_COLOR_PICKER_R0][[BR]] == How to demo == * Show that the gradient chooser is shown in a HUD and the model is automatically updated when a change is made. = Design = === Gradient picker === * The source of JXGradientChooser should be reworked to comply with our convention of using properties and bound controls. * The Gradient picker should be a BaseSwingVisualElement. * Note that not everything in the picker can be tracked, since rewriting each control that is used by JXGradientChooser is not the scope of this task. * A GradientPickerHud should be added, which contains the picker itself. === BoundGradientFiled === * It should be similar to BoundColorField, that works with ImmGradient. === BackgroundGradientField === * The old one should be removed and a new one should be introduced that extends BoundGradientField. === Halo Menu === * Since the picker should use the Sophie 2 [wiki:APP_COLOR_PICKER_R0 Color Picker], it should be displayed as a sub-hud. The following changes should be made to the HaloMenu class, so it displays all chained sub-huds. {{{ HudDialog subHud = hud.subHud().get(); while (subHud != null && subHud.visible().get()) { res.add(subHud.swingComponent().get()); subHud = subHud.subHud().get(); } }}} * The idea is that when a HUD is visible, it's sub-HUD (if any and visible) should also be displayed, also the sub-HUD's sub-HUD and so on. With the code snippet above, we traverse down the tree, finding all sub-HUDs of the main one. * The same applies for the PageWorkArea. === Other === Remove GradientDialog. === Demo === * [source:/branches/private/jani/GROUP_FILLING_R1/sophie2-platform/modules/org.sophie2.main.app.halos/src/test/java/org/sophie2/main/app/halos/huds/gradient/GradientPickerDemo.java GradientPickerDemo] = Implementation = Changesets: [4723] = Testing = ^(Place the testing results here.)^ = Comments = ^(Write comments for this or later revisions here.)