Last modified 16 years ago
Last modified on 06/03/09 16:11:51
Analysis
Overview
Resources are displayed via a tab and palettes in the right flap. There should be a preview palette in the resources tab that will preview the target of the resource. For example if the resource is with an image target, the image should be displayed in the preview palette when the resource is selected. Even if the target is URL to an image, the image should be previewed in the preview palette.
Task requirements
These are the global task requirements:
- Add a preview inside of detail resource info palette. Resource should be visible inside the preview area when selected from the resource palette.
- For images the preview must be a thumbnail.
- For video and audio there must be a possibility to play the resource this includes a navigation bar and buttons (play, pause, stop)(OPTIONAL - SHOULD BE INCLUDED IN NEXT REVISIONS)
- .pdf preview should include navigation through all pages in the document. Ability to type the exact page and 'next page' and 'previous page' buttons.
- For frames and pages the preview also should be a thumbnail that looks like e zoomed out actual page or frame.(OPTIONAL - SHOULD BE INCLUDED IN NEXT REVISIONS)
- Same goes for .rtf and .html files. This issue should be discussed in the next revision.(OPTIONAL - SHOULD BE INCLUDED IN NEXT REVISIONS)
- The books which are used as resources in other books should be previewed as well. There should be a way to navigation through all pages of the book.(OPTIONAL - SHOULD BE INCLUDED IN NEXT REVISIONS)
- Use already defined UI from GROUP_APP_RESOURCE_R0 or GROUP_APP_RESOURCE_MANIPULATION_R0
(However for this revision of the task only the image resource preview is required.)
Task result
- The result of the task should be source code.
Implementation idea
- When the thumbnail (preview) of the resource is clicked, this resource should be selected as active. For example when a frame preview is clicked this frame is selected on the book and could be directly edited.
- Detail view palette must include the resource preview and its metadata below.
Related
- BASE_RESOURCE_COMMONS_R0
- APP_RESOURCE_LIST_DISPLAY_R0
- APP_RESOURCE_PREVIEW_POINT_R0
- GROUP_APP_RESOURCE_R0
- GROUP_APP_RESOURCE_MANIPULATION_R0
How to demo
- Run Sophie 2.0.
- Select from the list with resources an image resource.
- The image should be previewed in the palette provided.
Design
- Remove dependency from org.sophie2.main.func.resources to org.sophie2.main.func.image and to org.sophie2.main.func.media.
- Add dependency from org.sophie2.main.func.image to org.sophie2.main.func.resources.
- Module org.sophie2.main.func.resources should provide extension point where different resources will provide how they will be previewed. Different extensions should give a button for each different kind of resource. This will be the way how resources will be filtered.
- Create interface ResourcePreviewProvider in org.sophie2.main.func.resources (module and package). (This is the interface of the extension point.)
- Create class ResourcePreviewFactory in org.sophie2.main.func.resources (module) and org.sophie2.main.func.resources.view (package) with one static method SwingVisualElement createResourcePreview(Resource res) which will create SwingVisualElement from given Resource.
- In org.sophie2.main.func.image create class ImageResourcePreviewProvider that extends ResourcePreviewProvider.This class will define how images will be previewed in the preview palette.
- Create filteringButtons list property which will constructs a list of toggle buttons. Each toggle button will correspond to a different module that has provided an extension for the extension point of the org.sophie2.main.func.resources module.
- 2923 - The new hierarchy.
- 2925 - The package of ImageResourcePreviewProvider changed.
- 3077 - Unit test added.
- 3078
- Merged into trunk [3142]
Implementation
Merged to the trunk in [3147].
Testing
Comments
(Write comments for this or later revisions here.)