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).

!7

lib 1007175 // mxGraph

import com.mxgraph.swing.mxGraphComponent;
import com.mxgraph.view.mxGraph;

p-substance {
  showFrame(makeGraphComponent());
}

static mxGraphComponent makeGraphComponent() {
  new mxGraph graph;
  O parent = graph.getDefaultParent();
  
  graph.getModel().beginUpdate();
  try {
  	O v1 = graph.insertVertex(parent, null, "Hello", 20, 20, 80, 30);
  	O v2 = graph.insertVertex(parent, null, "World!", 240, 150, 80, 30);
  	graph.insertEdge(parent, null, "Edge", v1, v2);
  } finally {
  	graph.getModel().endUpdate();
  }
  
  ret new mxGraphComponent(graph);
}

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: 504 / 617
Version history: 4 change(s)
Referenced in: [show references]