wiki:BASE_MODEL_PAGE_ELEMENTS_R0
Last modified 3 years ago Last modified on 01/10/09 21:25:36

Pages linking to BASE_MODEL_PAGE_ELEMENTS_R0:
TASK_INDEX
BASE_BOOK_COMMONS_R0

Ticket Summary Owner Status Type Component Priority Effort Importance
#282 BASE_MODEL_PAGE_ELEMENTS_R0 orliin closed planned_task BASE_BOOK_MODEL 3 1 35

Reported by Astea, 4 years ago.

Description

wiki page: BASE_MODEL_PAGE_ELEMENTS_R0 - effort: 1d

Analysis_owners

boyan

Analysis_reviewers

peko

Analysis_score

3.5

Design_owners

orliin, orliin

Design_reviewers

-peko

Design_score

2

Imp._owners

orliin

Imp._reviewers

boyan

Imp._score

2

Test_score

0

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.

BASE_BOOK_COMMONS_R0

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.
  • Tests

Implementation

Testing

Comments

(Write comments for this or later revisions here.)