G2DParentNode handles "undefined" child bounds separately 84/3584/1
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Wed, 20 Nov 2019 14:33:29 +0000 (16:33 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Wed, 20 Nov 2019 14:55:07 +0000 (14:55 +0000)
commit452670c58399d8054872655841ebb6e66d9c6b6e
treeec5b5bf1cac5bc0d2738921a7eb5c7cee763088a
parent2ed2f09de0043bbf98a5b727854bd93a02b204ab
G2DParentNode handles "undefined" child bounds separately

Previously nodes could only return null to say "I have no bounds".
Now it is possible to return GeometryUtils.undefinedBounds() to say
"ignore my bounds" to G2DParentNode.

Also allow customization of the node class used by ElementPainter to
mark selections under "element nodes" through a new configuration class
ElementPainterConfiguration.

This allows e.g. district to use its own node for this purpose to
optimize the scene graph and customize the bounds it returns.

gitlab #419

Change-Id: I210fd26be5d269847277616b9d5c52ef4f930dd7
(cherry picked from commit ad29e24f50e336add4c28df14312b3134ab93427)
bundles/org.simantics.g2d/src/org/simantics/g2d/diagram/participant/ElementPainter.java
bundles/org.simantics.g2d/src/org/simantics/g2d/diagram/participant/ElementPainterConfiguration.java [new file with mode: 0644]
bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/G2DParentNode.java
bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/utils/GeometryUtils.java