wiki:BROWSER_CONTENT_BASIC_R0
Last modified 16 years ago Last modified on 06/26/09 21:13:42

Error: Macro BackLinksMenu(None) failed
compressed data is corrupt

Error: Macro TicketQuery(summary=BROWSER_CONTENT_BASIC_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|) failed
current transaction is aborted, commands ignored until end of transaction block

Analysis

(Give as much as possible of the needed information for designing and implementing the task in the following sections.)

Overview

The purpose of this task is to give the user possibility to add frames with embedded browser content, that gives the opportunity to embed certain website in frame of the book.

Task requirements

  • Because the browser frame is actually a new kind of frame new entry in the insert menu must be created for it.
  • The browser content must appear inside the created frame
    • most of the frames are going to be smaller than the browser content, so a scrollbars must appear when this is necessary.
    • a status bar for the page must be displayed in the bottom of the frame
    • (optional) a possibility to turn on/off the status bar is a good idea
  • When the browser frame is active it must behave just like a browser
    • the scroll of the mouse must be recognizable, and result in navigation through the browser content
    • on right click same options as on the system browser must be provided (e.g. refresh, encoding, print, etc.)

Task result

The result of this task must be a source code.

Implementation idea

  • This is a sample picture of how should browser frame must look like (the 3rd frame with google in it).

FLASH_CONTENT_BASIC_R0?

How to demo

Create a browser frame, navigate through it, and try doing other things, that are possible when opening this page with your browser.

Design

  • Create new module - org.sophie2.extra.func.browser.
  • Create class BrowserModule in org.sophie2.extra.func.browser package.
  • In org.sophie2.extra.func.browser.model package
    • Create class BrowserContentProvider that implements FrameContentProvider and will create a frame with browser content by given browser resource.
    • Create class BrowserFrameContent that extends FrameContent.
  • In org.sophie2.extra.func.browser.view package
    • Create class InsertBrowserItem that extends AppMenuItem and after clicked a frame with browser content will be inserted to the current book.
    • Create class BrowserContentView that extends FrameContentView.
    • Create class BrowserContentViewProvider that implements FrameContentViewProvider.
    • Create class BrowserResourcePreview that implements ResourcePreviewProvider.
  • In org.sophie2.extra.func.browser.view.logic
    • Create class BrowserLogic that implements OperationDef

source:trunk/sophie2-platform/doc/uml-design-diagrams/browser_frame_design.png

For this implementation we will use NativeSwing library from DJ Library (http://djproject.sourceforge.net/ns/index.html). This means that we will be SWT (http://www.eclipse.org/swt/) dependant (NaiveSwing depends on SWT). SWT is a widget library that gives access to native widgets of the platform for which is implemented. Depending on SWT means that either we should have Sophie build for every platform we support or we will include all SWT implementations in one Sophie2 build and hope that NativeClassLoader will instantinate the one that is needed. Another thing is that for Linux systems it is implemented with GTK (http://www.gtk.org) and Motif (http://www.opengroup.org/motif). I guess we will choose GTK implementation but what about other GUI users (like Qt for example). What I mean is that it is unclear what is "native" graphical widget in Linux...

Also when the browser frame is active it won't behave like a browser. It can open web pages and that's all...

Implementation

Testing

(Place the testing results here.)

Comments

Current pom.xml file supports this functionality only on 32 bit linuxes

Attachments