Q: How can I make the diagram read only, so that users cannot modify anything?

A: Call DiagramView.setBehavior(Behavior.DoNothing); The Behavior property specifies how the control responds to mouse input, and the DoNothing mode ignores all mouse input. Other modes can be set to allow drawling links but not nodes, to allow selecting and moving existing items but not creating new ones, etc.

Q: How can I prevent users from resizing a node, but still allow moving it?

A: Call node.setEnabledHandles(AdjustmentHandles.Move); It is also possible to set a combination of handles, such as AdjustmentHandles.Move | AdjustmentHandles.Rotate to allow only moving and resizing the node.

Q: Can I prevent users from deleting specific nodes in my flowchart, such as start and end nodes?

A: Implement the DiagramListener.nodeDeleting method and call NodeValidationEvent.setCancel(true) for nodes that should not be deleted.

Copyright © 2001-2022 MindFusion LLC. Alle Rechte vorbehalten.
Nutzungsbedingungen - Kontakt