wiki:FRAME_SIZE_R0
Last modified 6 years ago Last modified on 02/03/2009 03:27:59 PM

Ticket Summary Owner Status Type Component Priority Effort Importance
#752 FRAME_SIZE_R0 mira closed planned_task FRAME_PROPERTIES 3 1 10

Reported by Astea, 6 years ago.

Description

wiki page: FRAME_SIZE_R0 - effort: 1d

Analysis_owners

mira

Analysis_reviewers

boyan

Analysis_score

3

Design_owners

mira

Design_reviewers

-meddle, tanya, tanya

Design_score

3.5

Imp._owners

mira

Imp._reviewers

tanya, jani

Imp._score

4

Test_owners

danvisel

Test_reviewers

deyan

Test_score

3.5

Analysis

Overview

The frames size is the width and hight of the frame. In default mode they are the measurements of the frame content. The frame should be able to calculate its size in different modes (including paddings, border and/or margins). A frame could even be bigger than the page. In that case the frames parts which are outside the page`s range will be clipped out and wont be seen in reader mode. In author mode however all frames should be seen in whole.

Task requirements

  • The frame should have properties describing width and hight.
  • Those properties should be equal or grater than 0.
  • The frame should be able to set and get its size in all modes.

Task result

The result of this task is source code.

Implementation idea

  • Create width and hight value properties in the Frame.
  • Create enums for modes if needed.

How to demo

  • Create frame with concrete width and height and check if they are correct.

Design

In the Frame class:

  • Rename the size() property which is used for the size of the frames rectangle in default mode to contentSize() for more clearance.
  • Create the method ImmSize getSize(BoundMode mode). Using the BoundMode enum it should calculate the size of the frame rectangle in the given mode.

  • Create the method setSize(BoundMode mode, ImmSize size). It could use the BoundModes setSize() method to calculate the size to be set to content according to the mode in which the new size is given.
  • TestFrameSize demonstrates the use of those frame bounds functionalities in different modes.

trunk/sophie2-platform/modules/org.sophie2.base.model.book/src/test/java/org/sophie2/base/model/book/TestFrameSize.java?rev=1165

Implementation

trunk/sophie2-platform/modules//org.sophie2.base.model.book/src/main/java/org/sophie2/base/model/book/Frame.java?rev=1164

Testing

User documentation

ITERATION_04/Release/UserDocumentation/04_WorkingWithFrames/01_ChangingTheSizeAndPositionOfAFrame

Release documentation

In this release, the width and height of a frame can be changed (starting relative to the top left corner of the frame)using the frame size/position HUD.

Manual tests

Testlink test ids: 762

Main tests

Testlink test ids: 762

Related tests

(none so far)

Reported bugs

(none so far)

Comments

(Write comments for this or later revisions here.)