Bug 495464 - [Java9] GeometryNode API should reflect Geometry origin in its layout bounds (similar to Shape).
Summary: [Java9] GeometryNode API should reflect Geometry origin in its layout bounds ...
Status: NEW
Alias: None
Product: GEF
Classification: Tools
Component: GEF FX (show other bugs)
Version: 0.2.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-04 08:35 EDT by Alexander Nyßen CLA
Modified: 2016-06-16 05:16 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Nyßen CLA 2016-06-04 08:35:00 EDT
As GeometryNode had to be based on Region instead of Group (to longer rely on JavaFX-internal functionality; see bug #443954) its layout bounds are now fixed to (0, 0, width, height). That is, the origin of the contained Geometry is not reflected in the layout bounds (but only in layoutX and layoutY).

In constrast, javafx.scene.shape.Shape reflects the origin of its geometry in its layout bounds, which feels more natural. While the API of GeometryNode is consistent, it would be preferable to have similar behavior to Shape.

I have requested that JavaFX provides a public API so that Region subclasses could overwrite the layout bounds calculation (see https://bugs.openjdk.java.net/browse/JDK-8156089). If such a functionality would be offered, we could migrate GeometryNode back to extend Group instead of region (to realize the respective behavior). If not, we could think of wrapping a Group around the Region to achieve identical functionality.