wiki:FRAME_PLACEMENT_BOUND_SELECT_R0
Last modified 16 years ago Last modified on 02/03/09 14:00:35

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

Error: Macro TicketQuery(summary=FRAME_PLACEMENT_BOUND_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 and size can be calculated in relation to 5 different rectangles - Margins, Out-Border, Mid-Border, Padding (which is the same as In-Border mode) and Content.

Task requirements

  • Those 5 rectangles should be listed in the frame hud so that the usser can choose one.

  • The default rectangle should be CONTENT. This means that it should be selected initialy in the list.
  • When the user changes the bound rectangle the coordinates and the size should be calculated observing the coosen rectangle.
  • When the user changes the frame coordinates or size in the hud, they are changed according to the choosen rectangle.

Task result

The result of this task is source code.

Implementation idea

List the 5 options in the hud and initialy select the content bounding rectangle.

Auto compute the frame`s coordinates and size observing the concrete bounding rectangle by the getLocation,getSize methods in the Frame. It takes the mode as argument. When the X and Y coordinates or the width and height are changed from the hud use the setLocation, setSize methods in Frame to set the new frame coordinates and size. It takes special point as argument.

How to demo

  • Open the frame hud and change its bound mode demonstrating the recalculation of the X and Y coordinates and also the widht and height according to the chosen rectangle.
  • Resize the frame giving the size of the margins rectangle.
  • Move the frame by its UPPER_LEFT Mid-Border 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.)