44 | | * Make MainHaloMenu a parent of FrameRemoveHaloButton |
45 | | * FrameMoveHaloButton and |
| 44 | * Make MainHaloMenu a parent of FrameRemoveHaloButton. |
| 45 | * FrameMoveHaloButton is replaced by a new class MainTitleBar extending AbstractHalo having the following functionalities. |
| 46 | * Mouse click and movement handling from FrameMoveHaloButton. |
| 47 | * Override parent(), computeTitle(), computeSize() and computeVisible() methods. |
| 48 | * The MainHaloMenu is the parent |
| 49 | * The size of the title bar is calculated as specified |
| 50 | * The height is equal to the biggest height of all halo buttons + padding |
| 51 | * The width is the maximal value between the width of the frame and the cumulative width of the halos + side padding + halo spacing + frame (group) name length calculated with default font. |
| 52 | * HaloMenu class is changed. |
| 53 | * locationSync() method modified to consider right alignment of buttons on the menu (needed for FrameRemoveHaloButton). |
| 54 | * HaloMenu.computeSize() protected method added. |
| 55 | * HaloButton.alignPos() added to specify the needed alignment of the halo button on its parent. |
| 56 | * Modify FrameRotateHaloMenu.computeLocation() to move rotate halo menu to the bottom right point of the frame. |
| 57 | * Testing |
| 58 | * Existing unit tests in [http://www.sophie2.org/trac/browser/branches/private/vlado/draggable-halo-menu/sophie2-platform/modules/org.sophie2.base.halos/src/test/java/org/sophie2/base/halos org.sophie2.base.halos]. |
| 59 | * Demo test |
| 60 | * Start [http://www.sophie2.org/trac/browser/branches/private/vlado/draggable-halo-menu/sophie2-platform/modules/org.sophie2.base.halos/src/test/java/org/sophie2/base/halos/HalosDemo.java HalosDemo]. |
| 61 | * Select a frame |
| 62 | * There should be no frame move menu. |
| 63 | * There should be no move frame halo button. |
| 64 | * The remove frame halo button should be right aligned. |
| 65 | * Frame movement should be possible when dragging the title bar. |