GUIKit Example: GraphEditor
CodeExamplesThis example demonstrates the benefit of supplementing Mathematica functionality with GUIKit user interface elements leveraging existing third-party graph model and editing libraries. GraphEdit widgets take advantage of the Graph expression supported by DiscreteMath`Combinatorica` and also SparseArray ArrayRules. The user interface of the graph editing canvas allows you to Create a new node ( + mouse click or Right (alternate) mouse click).
Create a new edge ( + mouse click or Right (alternate) mouse click inside a node). Move selection (Drag mouse on selected nodes and edges). Change selection (Drag, click, and shift click). Delete currently selected nodes and edges ( or Backspace key).
MatrixGraph
SparseArrayCreate
| Out[12]= |  |
| Out[13]= |  |
Here is another version run in a modeless session where you can interact with and change the displayed graph.
| Out[14]= |  |
| Out[16]= |  |
|