Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

26
LINES

< > BotCompany Repo | #1007177 // Test JGraphX [i.e. mxGraph], WORKS

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Uses 4464K of libraries. Click here for Pure Java version (3091L/21K/79K).

1  
!7
2  
3  
lib 1007175 // mxGraph
4  
5  
import com.mxgraph.swing.mxGraphComponent;
6  
import com.mxgraph.view.mxGraph;
7  
8  
p-substance {
9  
  showFrame(makeGraphComponent());
10  
}
11  
12  
static mxGraphComponent makeGraphComponent() {
13  
  new mxGraph graph;
14  
  O parent = graph.getDefaultParent();
15  
  
16  
  graph.getModel().beginUpdate();
17  
  try {
18  
  	O v1 = graph.insertVertex(parent, null, "Hello", 20, 20, 80, 30);
19  
  	O v2 = graph.insertVertex(parent, null, "World!", 240, 150, 80, 30);
20  
  	graph.insertEdge(parent, null, "Edge", v1, v2);
21  
  } finally {
22  
  	graph.getModel().endUpdate();
23  
  }
24  
  
25  
  ret new mxGraphComponent(graph);
26  
}

Author comment

Began life as a copy of #1007176

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1007177
Snippet name: Test JGraphX [i.e. mxGraph], WORKS
Eternal ID of this version: #1007177/5
Text MD5: d0ef27907996efb25e3d9a450c939e3f
Transpilation MD5: 411081db14e6faa9f32b667b3c47b355
Author: stefan
Category: javax / imaging
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-03-10 15:40:45
Source code size: 616 bytes / 26 lines
Pitched / IR pitched: No / No
Views / Downloads: 434 / 523
Version history: 4 change(s)
Referenced in: [show references]