[[BackLinksMenu]] [[TicketQuery(summary=GROUP_ANNOTATIONS_R0, format=table, col=summary|owner|status|type|component|priority|effort|importance, rows=description|analysis_owners|analysis_reviewers|analysis_score|design_owners|design_reviewers|design_score|implementation_owners|implementation_reviewers|implementation_score|test_owners|test_reviewers|test_score|)]] = Analysis = == Overview == In this revision most of the work is to provide support for book extra elements. Annotations 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. Some of the extras are displayed, the rest are hidden. * User should be able to show/hide book extras, open extras from file, etc. * 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 == See the Design section. == 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 a list of BookExtras in BookWindow. * 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. * Annotations * Create a new module - org.sophie2.extra.annotations * Create classes Sticky, Highlight and AudioAnnotation, which implement an interface AnnotationElement. * Create a class AnnotationSet, which extends BookExtra. * Create instances of PageElementViewProvider for stickies and audio annotations. * Create Scene views of stickies and audio annotations. * 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. = Implementation = ^(Describe and link the implementation results here (from the wiki or the repository).)^ = Testing = ^(Place the testing results here.)^ = Comments = ^(Write comments for this or later revisions here.)