Last modified 16 years ago
Last modified on 07/31/09 13:12:07
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
GROUP_FILLING_R0
APP_COLOR_PICKER_R0
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 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
Implementation
Merged in the trunk in [4763].
Testing
(Place the testing results here.)
Comments
(Write comments for this or later revisions here.)