miho / VWorkflows

Flow Visualization Library for JavaFX and VRL-Studio
http://vworkflows.mihosoft.eu
Other
294 stars 67 forks source link

VisualizationRequest.KEY_NODE_NOT_REMOVABLE has no effect #68

Open m0squito opened 4 years ago

m0squito commented 4 years ago

I am trying to disable/hide the 'X' button in a VNode that is rendered in a VCanvas. Here's the code snippet that I wrote to do it:

DefaultValueObject dvo = new DefaultValueObject(); dvo.setValue(myObject); VNode node = workflow.newNode(dvo); node.getVisualizationRequest().set(VisualizationRequest.KEY_NODE_NOT_REMOVABLE, true);

Unfortunately, it has no effect. I have tried it both when creating the node, but also inside a custom class that extends the FXFlowNodeSkinBase.

Am I doing something wrong?

PS. Is this project still active?

cbvms123 commented 3 years ago

I do think this is a bug. The method FlowNodeWindow.setCloseableState is private and only called from FlowNodeWindow.setEditableState so it looks while this fine grained control was forseen at some point it was never fully implemented. Nevertheless it should be rather straight forward to add this to the code.