wiki:FRAME_PLACEMENT_POINT_SELECT_R0
Last modified 16 years ago Last modified on 02/03/09 13:41:06

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

Error: Macro TicketQuery(summary=FRAME_PLACEMENT_POINT_SELECT_R0, 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

Frame`s location can be calculated relation to 9 different points of the frame - TOP_LEFT, TOP_MIDDLE, TOP_RIGHT, MIDDLE_LEFT, MIDDLE, MIDDLE_RIGHT, BOTTOM_LEFT, BOTTOM_MIDDLE, BOTTOM_RIGHT.

Task requirements

  • Those 9 points should be represented by 9 radio buttons arranged in a square 3x3 in the frame properties hud.

  • The default value should be TOP_LEFT. This means that the upper leftmost of the dots should be selected.
  • When the user changes the special point from the hud the values for X and Y are recalculated as the coordinates of the new point.
  • When the user changes the X and/or Y values in the hud, the frame is moved so that the chosen special point is placed to the designated coordinates.

Task result

The result of this task is source code.

Implementation idea

Create 9 radio buttons in the frame hud arranged accordingly. Auto compute the X and Y coordinates of the special point by the getLocation method in the Frame. It takes special point as argument. When the value of the X and Y boxes changes in the hud use the setLocation method in Frame to set the new frame coordinates. It takes special point as argument.

How to demo

  • Open the frame hud and move its special point demonstrating the recalculation of the X and Y observing the location of the chosen point.
  • Move the frame by its bottom right most corner.

Design

Implementation

(Implementation results should be described and linked here (from the wiki or the repository))

Testing

Comments

(Write comments for this or later revisions here.)