Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 471031

Summary: Improve the default resize mechanism so that child visuals can be resized, too.
Product: [Tools] GEF Reporter: Matthias Wienand <matthias.wienand>
Component: GEF MVCAssignee: Matthias Wienand <matthias.wienand>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 0.1.0   
Target Milestone: 3.10.1 (Mars SR1) M1   
Hardware: All   
OS: All   
Whiteboard:

Description Matthias Wienand CLA 2015-06-25 12:21:00 EDT
The FXResizeRelocatePolicy currently determines if a part is resizable based on the part's visual. However, sometimes not the part's visual, but a child visual should be resized. Therefore, to determine if a part is resizable, it should be sufficient to test if it supports the FXResizePolicy, which can then take care of actually resizing the part's visual.

Besides, the FXResizePolicy should provide a mechanism to determine the visual that is resized and its initial size. This is necessary, so that sub-classes can define that not the main visual is to be resized, and use content data for the initial size (instead of computing the initial size from the visual).
Comment 1 Matthias Wienand CLA 2015-06-26 04:02:51 EDT
I removed the visual #isResizable() check from FXResizeRelocatePolicy and added two methods to FXResizePolicy for determining the resized visual and its initial size. The code is published on the master branch, therefore, I resolve this ticket as fixed for 3.10.1M1.