Last modified 16 years ago
Last modified on 05/07/09 16:34:31
Analysis
Overview
In this revision most of the work is to provide support for book extra elements. Annotation sets will be defined as book extras.
Sophie 2 should support three kinds of annotations:
- Stickies - electronic version of the well-known sticky notes that you can put anywhere on a page.
- Highlights - user can highlight parts of the text.
- Audio annotations - user can record his own voice to make annotations.
Task requirements
- Book Extras support
- A book extra is a resource.
- Book extras can be part of the book as any other resource, but they can also be just open along with the book.
- For example, you have a book and you open annotations, saved in another file. They are displayed with the book, but they are not part of it.
- A BookWindow should contain a book and a list of book extras (which can be empty). Some of the extras are displayed, the rest are hidden.
- User should be able to:
- Show/hide book extras
- Open extras from file (for this revision - only add dummy extra to the list)
- Add selected extra to the book resources or remove from there
- Close selected extra - remove from the book window
- The page work area should contain a list of extra PageElements.
- Create an extension point for page element view providers.
- Annotations
- User should be able to select current annotation set. When he creates a new sticky, it should be added to current annotation set.
- Stickies
- Should be displayed in the scene of the page. Be sure that they are positioned and zoomed correctly.
- In the upper right corner there should be a remove halo button.
- If the sticky contains some text, a confirmation message should appear ("Are you sure you want to delete this sticky?").
- The title bar of the sticky should display their creation date and time in users local short format.
- User should be able to create a new sticky.
- Audio annotations
- Should be displayed in the scene of the page with appropriate image and creation date and time.
Task result
Source code.
Implementation idea
- Create an abstract class BookExtra which extends Resource.
- Add abstract method which returns all PageElements that this extra provides for current page.
- Create two lists of BookExtras in BookWindow:
- all book extras that are open for viewing
- shown book extras - subset of the above. This list contains the extras that are actually displayed.
- Create an extension point in MainViewModule for PageElement view providers.
- Add a list of extra PageElements in PageWorkArea.
- Create a new module - org.sophie2.extra.func.annotations
Related
(Add links to related tasks that could be useful or helpful.)
How to demo
- Open Sophie 2.
- Open All Annotations tab.
- Create a new sticky.
- Go to Book Extras palette in Resources tab.
- Select "My Annotations" from the list.
- Click "Hide selected extra" button. The sticky should disappear.
- Click the button again (now it's named "Show selected extra". The sticky should appear again.
Design
- Book Extras
- Create an abstract class BookExtra which extends Resource.
- Add abstract method which returns all PageElements that this extra provides for current page.
- Create two lists of BookExtras in BookWindow:
- all book extras that are open for viewing
- shown book extras - subset of the above. This list contains the extras that are actually displayed.
- Create a Book Extras palette in Resource tab. It should display a list of:
- all extras in BookWindow and
- all resources in the book which are instances of BookExtra.
- Create an extension point in MainViewModule for PageElement view providers.
- Its interface PageElementViewProvider should contain methods getElementClass() and ScenePageElementView getSceneView(PageElement).
- Add a list of extra PageElements in PageWorkArea.
- Create an auto list in ScenePageWorkArea which contains the ScenePageElementViews of all extra PageElements.
- In AuthorPageWorkArea and ReaderPageWorkArea add the scene elements of the extra elements views.
- Create an abstract class BookExtra which extends Resource.
- Annotations
- Create a new module - org.sophie2.extra.func.annotations
- Create classes Sticky, Highlight and AudioAnnotation, which implement an interface AnnotationElement.
- Stickies have the following properties:
- text : String
- title : String
- page : Page
- date : Date - creation date and time
- color : ImmColor
- bounds : ImmRect (location and size; derived from PageElement)
- parent : AnnotationSet
- Stickies have the following properties:
- Create a class AnnotationSet, which extends BookExtra.
- Create instances of PageElementViewProvider for stickies and audio annotations.
- Create Scene views of stickies and audio annotations.
- Stickies should be rendered as yellow semi-transparent rectangles with title bar
- Create an Annotations tab in the right flap.
- Create an All Annotations palette. It should display a list of all annotation sets. User should be able to select current annotation set.
- Create a Stickies palette. Provide a button for creating a sticky.
- Create halo menu and remove button for stickies.
- The location of this menu is the upper right corner of the sticky.
Implementation
Testing
(Place the testing results here.)
Comments
(Write comments for this or later revisions here.)