'Frameworks for developing Metro Map drawing software?

I'm looking to build a tool to draw simple Metro/Tube/Underground/Urban transit style maps. The concept being that there's a drag and drop diagram editor and a code window. Change the code by adding a station - the diagram changes. Change the diagram by dragging and dropping in a new station - the code changes.

A bit like a 2-way www.websequencediagrams.com

My question is what open source (or otherwise) libraries out there please that could assist on both fronts, primarily the UI of icons, a canvas, config boxes for the objects, but also on the syntax checking and highlighting and parsing of the diagram description language.

Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source