wiki:BOOK_WINDOW_R1

Version 22 (modified by deyan, 16 years ago) (diff)

--

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

Error: Macro TicketQuery(summary=BOOK_WINDOW_R1, 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

Overview

Book window is responsible for displaying the book. Book window is present in Author app and not in Reader.
Book window has

  • Title bar - title bar contains the name of the book and buttons for minimize, restore and close.
  • Bottom bar - has zoom, page selector and other controls

Task requirements

  • Remove the thick black border of the book window (see if it is reasonable)
  • Add a simple title bar with book title (see BOOK_WINDOW_R0)
  • Currently, when part of the book window is behind the right flap ot the bottom of the workspace, it disappears on maximize. See what causes that issue and fix it.
  • Minimize button should minimize book to the Opened book tabbar. Currently a new button is created at the bottom of the work area.
  • The default position of the page should be at the center of the book window.
  • When all elements are inside the page and the whole page can be displayed in the book window, it should be at the center of it. Recomputing should be done on mouse drop (if possible)
    • On change of the size of the book
    • On change of the size of the window
  • Make the background of the window changable by the skin (optional)
  • Define minimum size of the book window, so that scroll bars for the controls (bottom book panel) do not appear.

Task result

Code.

Implementation idea

  • JInternalFrame supports the drawing of a title bar in a new java project, but it is not displaying in Sophie.
    • computeTitle on BookDocumentWindow
  • The border with is currently hard-coded, with a comment from mitex to add this to the skin definition "later" Consider doing this now
  • Minimum size of the book should be calculated based on the size of the bottom book panel, so that if the panel is changed, the window reacts properly
  • It appears that resizing the book window does not resize the background, and thus the page does not re-center
  • Ask if we want a Sophie looking title or the host OS title bar for these windows
  • Regarding the centering of the page, the PageWorkArea is a set size based on the size of the page and the JScrollArea on the BookDocument window scrolls that. The page is centered on the PageWorkArea. The PageWorkArea is aligned topLeft. So maybe the PageWorkArea needs to be resized as the window is resized, maximize=infinity, minimize=page size

How to demo

  • Demo the new title bar
  • Demo the default position of the window on the desktop
  • Demo the book restricting re-sizing the book window to the minimal size

Design

Title Bar

Implementation

(Implementation results should be described and linked here (from the wiki or the repository))

Testing

Comments

The page should be at the center of the book window. (when bigger than it, in other cases scrollbars are responsible for positioning of the page.)

2009-05-11

  • "Remove the thick black border of the book window (see if it is reasonable)" There is a comment in the code that should be defined in the skin, however, if I make the border any smaller now, the window is not draggable at all. So until we add some sort of title bar, I think this has to remain for now

2009-05-12

  • The default position of the page should be at the center of the book window. -Isn't it already at the center of the book window? It doesn't re-center as you resize the window, but I think it is centered by default at least on my system.
  • I need to know if you want the page work area to expand to the size of the window, and then have the page stay centered on the page work area? That would mean a large change to how things work now, which is ok, I just need to know that this is what you want.

Attachments