Last modified 16 years ago
Last modified on 01/10/09 21:25:36
Analysis
Overview
This task should provide a model for page elements (currently only frames). In this revision only a basic prototype is required.
Task requirements
- Revise the code for pages and frames and clean it up.
- Modularize some things in the main.view if necessary.
- Provide a class diagram(s) for the page elements and their components (styles, bounding rectangles, etc.).
- Consider future design ideas and add them to the diagram - these include stickies and connectors and will be implemented in the next revision.
- Review the existing unit tests and fix them if needed.
Task result
The result of this task should be:
- source code
- class diagram(s)
- working unit tests
Implementation idea
- Review the existing source code.
- Create the class diagram(s).
- Refactor and clean up according to the diagram.
- Run unit tests and fix problems if any.
Related
How to demo
- Show the class diagrams and explain them.
- Show the source code related to page elements.
- Run unit tests to demonstrate the model.
Design
- Revising
- remove org.sophie2.base.model.book.Frame.getPageNumber() - it is not used anywhere and could be helpful only if it's used a lot.
- remove org.sophie2.base.model.book.Frame.borderColor() - it is in org.sophie2.base.model.book.Frame.border()
- org.sophie2.base.model.book.Frame.getResource() can be renamed or documented better to make it clear that it is only a "shortcut" to something in the content.
- move org.sophie2.base.model.book.Frame.borderInsets() into org.sophie2.base.model.book.Frame.border()
- rename org.sophie2.base.model.book.Frame.contentLocation() to org.sophie2.base.model.book.Frame.contentModeLocation()
- rename org.sophie2.base.model.book.Frame.contentSize() to org.sophie2.base.model.book.Frame.contentModeSize()
- rename org.sophie2.base.model.book.Frame.bounds() to org.sophie2.base.model.book.Frame.contentModeBounds()
- Diagram
- Page
- Frame
- FrameContent
- Styles for background, border, etc.
- Future design ideas
- stickies:
Stickies will extend frames with the new ability to be glued to a frame.
- A page will have a list with frames that are not stickies and a list with stickies.
- There should be a property that points to the frame that the sticky is glued to. The StickyFrame position should have the ability to recalculate its position automatically if the frame it is glued to is moved. Stickies may probably not glued to a frame, just put on the page like ordinary frames.
- connectors: Only frames that have specific types of content connect to other frames. That's why a connector should be a property of a content that points to another frame.
- stickies:
Stickies will extend frames with the new ability to be glued to a frame.
- Tests
Implementation
Testing
Comments
(Write comments for this or later revisions here.)