コード例 #1
0
 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;
 }
コード例 #2
0
 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;
 }
コード例 #3
0
 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;
 }