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

Bug 512620

Summary: ResizePolicy should use Node#minWidth(double) and Node#minHeight(double) to determine the minimum size for the resized visual
Product: [Tools] GEF Reporter: Matthias Wienand <matthias.wienand>
Component: GEF MVCAssignee: gef-inbox <gef-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.1.0   
Target Milestone: 5.0.0 (Oxygen) M6   
Hardware: All   
OS: All   
Whiteboard:

Description Matthias Wienand CLA 2017-02-23 05:42:12 EST
Currently, ResizePolicy provides two methods #getMinimumWidth() and #getMinimumHeight() that determine the minimum size for the resized visual. For determining the minimum size, a Region is queried for its minimum-width and minimum-height properties, whereas other resizable visuals are queried for their minimum size using Node#minWidth(double) and Node#minHeight(double). The special treatment of Region visuals is wrong. The minimum-width and minimum-height properties are merely hints for #minWidth() and #minHeight(). They can be set to a fixed value, or to a symbolic value (USE_PREFERRED_SIZE or USE_COMPUTED_SIZE), which is interpreted by #minWidth() and #minHeight(). Consequently, the special treatment for Region visuals should be removed from ResizePolicy.
Comment 1 Matthias Wienand CLA 2017-02-23 07:27:34 EST
I changed the implementation to solely rely on Node#minWidth(double) and Node#minHeight(double). I added a test to ensure that the bug is not reintroduced by a later change. The code is published on the master branch, therefore, I resolve this ticket as fixed for 5.0.0 M6.