Skip to content

Instantly share code, notes, and snippets.

@insac
insac / JGraphX_singleCellFoldableExample
Last active September 27, 2016 22:29
An example to show how to make single cell foldable
import java.awt.KeyEventDispatcher;
import java.awt.KeyboardFocusManager;
import java.awt.event.KeyEvent;
import java.util.HashMap;
import java.util.Map;
import javax.swing.JFrame;
import com.mxgraph.layout.mxGraphLayout;
import com.mxgraph.model.mxCell;
@insac
insac / Example2.java
Created September 27, 2016 19:23
An example of a multi-value node in JGraphX using "custom shape"
import java.awt.Color;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.util.HashMap;
import java.util.Map;
import javax.swing.JFrame;
import com.mxgraph.canvas.mxGraphics2DCanvas;
@insac
insac / Example.java
Created September 27, 2016 19:22
An example of a multi-value node in JGraphX using "child nodes"
import javax.swing.JFrame;
import com.mxgraph.layout.mxGraphLayout;
import com.mxgraph.model.mxCell;
import com.mxgraph.model.mxGeometry;
import com.mxgraph.model.mxICell;
import com.mxgraph.swing.mxGraphComponent;
import com.mxgraph.view.mxGraph;
public class Example extends JFrame {