Hello,
I'm trying to implement ClickableAreaBehavior in our project by starting from the logo example project.
We used GEF4 3.11.0 M4 version.
I only change this line compared to FXClickableAreaBehavior class:
getHost().getVisual().getCurveNode().clickableAreaWidthProperty()
.bind(clickableAreaBinding);
to
((GeometryNode<IGeometry>) getHost().getVisual()).clickableAreaWidthProperty().bind(clickableAreaBinding);
Because i want the behavior applied on every GeometryNode object.
I bind the behavior like in the example:
adapterMapBinder.addBinding(AdapterKey.defaultRole()).to(ClickableAreaBehavior.class);
The problem is I have a NullPointerException when this line is called in my behavior:
((GeometryNode<IGeometry>) getHost().getVisual()).clickableAreaWidthProperty().bind(clickableAreaBinding);
It is caused by the fact the geometryProperty.getValue() is null (line 148 in GeometryNode)
I think maybe just add a test if not null before could solve the problem are you agree with that?
Than you.