Changes between Version 68 and Version 69 of BOOK_WINDOW_R1


Ignore:
Timestamp:
06/09/09 04:05:52 (16 years ago)
Author:
sriggins
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BOOK_WINDOW_R1

    v68 v69  
    9494  * SimpleSceneVisual 
    9595  * DummySceneImplementation in SceneDemo 
    96   * BookLogic 
     96  * MDDocumentWindow 
     97   
    9798 
    9899= Implementation = 
     
    110111      The design was wrong.  SimpleSceneVisual adjusts the actual view rect into negative coordinates, which are then offset by SceneToSwing.  So in order to properly center everything in the page work area, changed actualViewRect to determine an x and y offset based on the deltas between the actual view rect and the minimal view rect.  This offset is then subtracted from the origin, much like the padding is, and causes the page, frames, halos, etc to be centered on the page work area. 
    111112 
    112   4. Change the page work area to consider the size of the book window as well as the page 
     113  4. Change BookDocumentWindow to track changes to it's content pane and update the sceneVisual minimalViewRect 
    113114 
    114      Added minimalViewRect to SceneVisual which is set by the page work area.  Added an component listener to MDDocumentWindow and  windowSize property to DefaultDocumentWindow.  When the event listener is notified that the window was resized, set the windowSize property. 
    115  
    116     Added a resourceProperty syncWindowSize to PageWorkArea which relies on its BookView windowSize property, if the parent is indeed a BookDocumentWindow.  Set the page work area's scene's minimalVIewRect to the content area of the scroll area, which causes the page work area to size properly as well as center on the window. 
     115     Added minimalViewRect to SceneVisual which is set by the page work area which determines what size we'd like the scene to be.  Added miniamalSceneRect property to SceneVisual which returns the smallest rectangle that encompasses the scene (not including background).   Added an component listener to BookDocumentWindow which listens for resize changes on the JPanel.  When the event listener is notified that the window was resized, determine if we still need scroll bars or not and also set the minimalViewRect on the scene. 
    117116 
    118117   Added actualViewRectCache to SceneVisual which is a property that is set to the actualViewRect whenever the actualViewRect changes.  This allows a class interested in this to watch for changes and repaint.  PageWorkArea currently utilizes this in actualViewRectCacheSync(). This is necessary (for now) to ensure the scene paints properly because the scene uses the swing coordinate system to actually lay out the objects (vs. a discreet offset type of property)  so if you change the actualViewRect value during an event (and this happens every time you resize a page or frame) then the repaint code only draws the newly offset pixels and not the older bits that it doesn't know changed.  See suggestions for future tasks in comments about this issue.