GraphNode addGraphModelNode(Object element, IFigure figure) { GraphNode node = this.getGraphModelNode(element); if (node == null) { if (figure != null) { node = new CGraphNode((Graph) getControl(), SWT.NONE, figure); this.nodesMap.put(element, node); node.setData(element); } else { node = new GraphNode((Graph) getControl(), SWT.NONE); this.nodesMap.put(element, node); node.setData(element); } } return node; }
GraphNode addGraphModelNode(IContainer container, Object element) { GraphNode node = this.getGraphModelNode(element); if (node == null) { node = new GraphNode(container, SWT.NONE); this.nodesMap.put(element, node); node.setData(element); } return node; }
GraphNode addGraphModelContainer(Object element) { GraphNode node = this.getGraphModelNode(element); if (node == null) { node = new GraphContainer((Graph) getControl(), SWT.NONE); this.nodesMap.put(element, node); node.setData(element); } return node; }