| Summary: | ResizePolicy should respect the visual's content-bias as well as the visual's maxWidth() and maxHeight(). | ||
|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Matthias Wienand <matthias.wienand> |
| Component: | GEF MVC | Assignee: | 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: | |||
I adjusted the ResizePolicy implementation so that the visuals min-size and max-size restrict the resizable range. When determining the min-size and max-size, the visual's content-bias is respected. The code is published on the master branch, therefore, I resolve this ticket as fixed for 5.0.0 M6. |
Resizing a visual via the standard JavaFX API should respect the visual's content-bias, as well as its min-size and max-size, similar to JavaFX Node#autosize(), i.e. the final size should be bounded by the min-size and max-size, which are determined via Node#minWidth(double), Node#minHeight(double), Node#maxWidth(double), and Node#maxHeight(double) methods. If the content-bias is indeterminate, -1 should be passed-in to the {min,max}{Width,Height} methods. Otherwise, the independent size should be queried first, and the result should then be passed-in to the method determining the dependent size, e.g. if the content-bias is Orientation.HORIZONTAL, then the min and max width need to be determined first, and the bounded result width should be used to compute the min and max height.