wiki:FRAME_MARGINS_R0
Last modified 16 years ago Last modified on 01/10/09 23:42:29

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

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

The frames margins are the blank fields with specific width surrounding the frame. Margins could be left, right, top or bottom. They are used to separate components from one another. Margins determine on what distance should the halo menu stand from its referring frame. They could also be used to arrange the text frames with lower Z order.(The text goes around the frames margin so it is easier to read)

Task requirements

  • The frame should have properties defining its margins width.
  • The Halo should stand on distance equal to margins width from the frame border.
  • The margins should be visualized.

Task result

The result of this task is source code.

Implementation idea

  • Add InsetsProp marginsInsets property to the Frame.
  • draw scene elments for the margins visualization.

How to demo

  • Create and show a frame with concrete margins
  • See see that the Halos position is adjusting to margins width.

Design

  • Add !Insets marginInsets() property for representing margin insets into the Frame. They are used by the set/get Location and Size methods in the Frame.
  • For the scene element creation create FrameMarginRectangle class extending the DefaultSceneElement and implementing the ShapeSceneElement. This class is going to be used for representation of the frame margin rectangle and computing the rectangle to vertices so that it could be added to the frameSceneElement and drawn. It should be drawn with a dashed black outline, non filling.
  • Add FrameMarginRectangle marginRectangle property to the FrameViewToDo class.
  • The margin rectangle will be added to the frame scene element to be drawn only if the option showFrameBorders() in the PageViewToDo is true. In R0 it is always true.
  • All the functionality in this task is achieved by adding and compiling properties and there are no new methods or logic to be tested.

Implementation

[1305]
[1308]
[1309]

Testing

Comments

  • For the scene visualization are created BookViewTodo, PageViewTodo and FrameViewTodo classes. Their names end in "todo" because for now the BookView, PageView and FrameView classes are working with JComponents. In future the views are only going to be used to create scene objects. Then the "todo" classes will replace the old ones and the "todo" in the end of their names should be removed.