wiki:FRAME_PADDING_R0
Last modified 6 years ago Last modified on 01/11/09 15:36:12

Ticket Summary Owner Status Type Component Priority Effort Importance
#744 FRAME_PADDING_R0 mira closed planned_task FRAME_PROPERTIES 3 0.5 10

Reported by Astea, 6 years ago.

Description

wiki page: FRAME_PADDING_R0 - effort: 0.5d

Analysis_owners

mira

Analysis_reviewers

boyan

Analysis_score

3

Design_owners

mira

Design_reviewers

tanya

Design_score

3.5

Imp._reviewers

jani

Imp._score

3.5

Test_score

0

Analysis

Overview

The frame paddings are the blank outer fields inside the frame which separate the frame`s content from the frame border. Paddings could have different width. They could be left, right, top or bottom. It should be possible for the user to define the paddings using HUD menu.

Task requirements

  • The frame should have properties defining its padding width.
  • There should be HUD menu for paddings (could be communal with margins`s HUD)
  • The frame content should adjust its position to the paddings width.

Task result

The result of this task is source code.

Implementation idea

  • Add Insets paddingInsets property to the Frame.
  • Use the HUD to change the padding and show how the frame content is adjusting to the new padding.

How to demo

  • Create frame with concrete paddings and check if the content adjusts to it.
  • Use the HUD to change the padding and show how the frame content is adjusting to the new padding.

Design

  • Add Insets paddingInsets() property for representing padding insets into the Frame. They are used by the set/get Location and Size methods in the Frame.
  • For the scene element creation create FramePaddingRectangle class extending the DefaultSceneElement and implementing the ShapeSceneElement. This class is going to be used for representation of the frame padding 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 FramePaddingRectangle paddingRectangle property to the FrameViewToDo class.
  • The padding rectangle will be added to the frame scene element to be drown 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

[1306]
[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 revisions 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 will be removed.