VWorkflows icon indicating copy to clipboard operation
VWorkflows copied to clipboard

VisualizationRequest.KEY_NODE_NOT_REMOVABLE has no effect

Open m0squito opened this issue 4 years ago • 1 comments

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?

m0squito avatar Sep 21 '20 19:09 m0squito

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.

cbvms123 avatar Oct 04 '20 18:10 cbvms123