Version 25 (modified by mira, 16 years ago) (diff) |
---|
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.
Related
- trunk/sophie2-platform/doc/spec-diagrams/FrameBounds.png
- FRAME_BOUNDS_R0
- FRAME_SIZE_R0
- FRAME_PADDING_R0
- FRAME_MARGINS_R0
How to demo
- Create and show Frames with different borders.
Design
- Create org.sophie2.base.model.book.ColorProps class
The new class should extend BaseProObject class and have needed properties for color definition:
- Color color() - the color of the border
- Float transparency() - the transparency of the border (an float between 0 and 1)
- Create org.sophie2.base.model.book.Insets class
The new class should extend BaseProObject class and have four properties for the left, right, bottom and top widths:
- Float left()
- Float right()
- Float bottom()
- Float top()
- Add ColorProps color and !Insets !borderInsets properties to the Frame
- The demo test org.sophie2.base.model.book.BordersTets.java tests creation and changing of frames with different borders.
Implementation
(Implementation results should be described and linked here (from the wiki or the repository))
Testing
Comments
(Write comments for this or later revisions here.)