Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

GUIKit Example:
GraphEditor

Code

In[40]:=
In[41]:=
In[42]:=
In[43]:=
In[44]:=
In[45]:=
In[46]:=
In[47]:=
In[48]:=
In[49]:=

Examples

This 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
FilledSmallCircle Create a new node (ControlKey + mouse click or Right (alternate) mouse click).
FilledSmallCircle Create a new edge (ControlKey + mouse click or Right (alternate) mouse click inside a node).
FilledSmallCircle Move selection (Drag mouse on selected nodes and edges).
FilledSmallCircle Change selection (Drag, click, and shift click).
FilledSmallCircle Delete currently selected nodes and edges (DeleteKey or Backspace key).

Matrix

Graph

SparseArray

Create

In[12]:=
Out[12]=
In[13]:=

Out[13]=

Here is another version run in a modeless session where you can interact with and change the displayed graph.

In[14]:=
Out[14]=
In[15]:=
In[16]:=
Out[16]=


Any questions about topics on this page? Click here to get an individual response.Buy NowFree TrialMore Information



 © 2009 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
Sign up for our newsletter: