wiki:FRAME_BORDERS_R0
Last modified 5 years ago Last modified on 02/03/09 15:21:05

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

Reported by Astea, 6 years ago.

Description

wiki page: FRAME_BORDERS_R0 - effort: 0.5d

Analysis_owners

mira

Analysis_reviewers

pav

Analysis_score

3.5

Design_owners

mira

Design_reviewers

tanya

Design_score

3.5

Imp._owners

mira

Imp._reviewers

jani

Imp._score

3.5

Test_owners

danvisel

Test_reviewers

deyan

Test_score

3

Analysis

Overview

The FrameBorder is the model for the outer field surrounding the frame content. It is placed between the margins and the content (see the picture). FrameBorders could differ for left, right, top or bottom border. The FrameBorder could have different width and color. It might be realized in different styles. (box, shadow, 3D, repetition of a certain picture, etc.)

Task requirements

  • Frame borders should have width. It should be number equal or greater than 0.
  • Frame borders should have color.

Task result

The result of this task is source code.

Implementation idea

  • Create class FrameBorder extending ProObject with required properties.
  • Add FrameBorder border property to the Frame
  • Create enums for different property options if needed.

How to demo

  • Create and show Frames with different borders.

Design

  • Move the SceneColor to org.sophie2.base.util and rename it to ImmColor. Add a constructor which takes java.awt.Color for argument.
  • Add two properties to the ShapeSceneElement
    • lineStyle() - the style to apply when drawing the shape`s outline. Also create LineStyle enum representing the different styles that can be drawn.
    • isFilled() - if it is true the shape should be filled with color.
  • Add drawShapeElement method to the SimpleSceneEngine for the shape elements drawing. It should draw them applying the outline and filling properties.
  • For the border scene element creation create BorderSceneElement class extending the DefaultSceneElement and implementing the ShapeSceneElement. This class is going to be used for representation of the frame border and computing the border to vertices. They will be represented like a filled polygon and without any outline. This class would override the color() property so that the shape element color is computed from the borderColor().
  • For the scene element representing the middle of the border create FrameMidBorderRectangle class extending the DefaultSceneElement and implementing the ShapeSceneElement. This class is going to compute 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 BorderSceneElement border property to the FrameViewToDo class.
  • Add FrameMidBorderRectangle midBorder property to the FrameViewToDo class.
  • Add the border and the midBorder to the composite frameSceneElement. The midBorder 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.

Implementation

[1302]
[1304]
[1307]
[1308]
[1309]

Testing

User documentation

ITERATION_04/Release/UserDocumentation/04_WorkingWithFrames/02_SettingBordersAndFills

Release documentation

In Release 2, the user can set borders on frames and change the width and color of the border.

Manual tests

Testlink test ids: 759

Main tests

Testlink test ids: 759

Related tests

(none so far)

Reported bugs

(none so far)

Comments

This test will need to be revised when there are border styles (not solid lines) available.