Make links a certain category based on the node they come from

I would like all the links coming out of a certain category of node to be a certain category of link. This would be only for the links coming out; the links coming in would retain their category. Can this be done as a property on the node, the port, or could it be configured as part of the LinkingTool somehow?

I suppose you could implement “LinkDrawn” and “LinkRelinked” DiagramEvent listeners that modify the Link.category of the new or reconnected Link.