wiki page: FRAME_BORDERS_R0 - effort: 0.5d
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.)
- Frame borders should have width. It should be number equal or greater than 0.
- Frame borders should have color.
The result of this task is source code.
- 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.
- 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.
In Release 2, the user can set borders on frames and change the width and color of the border.
(none so far)
(none so far)
This test will need to be revised when there are border styles (not solid lines) available.