If a user drags a link from one node to another how do I cancel that “relinking” if it is not allowed? I am using version 5.03
The user can just press the Escape key to cancel any predefined user interaction.
True but I want to programmatically not allow them to relink to a certain type of node.
If you want to control what links are permitted, override JGoView.validLink(JGoPort, JGoPort).
I looked into that butI need to know what type of route (link) is being moved. Can I get that from the from port some how?
At first I thought JGoView.getCurrentObject() would return the link being relinked, but apparently that is not the case.
Perhaps it should be. If so, you can override JGoView.startReLink to setCurrentObject(oldlink), so that it is accessible from your override of JGoView.validLink.
OK, yes that works. Thanks for the idea.