Search in sources :

Example 1 with CGraphNode

use of org.eclipse.zest.core.widgets.CGraphNode in project archi by archimatetool.

the class AbstractStructuredGraphViewer method addGraphModelNode.

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;
}
Also used : Graph(org.eclipse.zest.core.widgets.Graph) GraphNode(org.eclipse.zest.core.widgets.GraphNode) CGraphNode(org.eclipse.zest.core.widgets.CGraphNode) CGraphNode(org.eclipse.zest.core.widgets.CGraphNode)

Aggregations

CGraphNode (org.eclipse.zest.core.widgets.CGraphNode)1 Graph (org.eclipse.zest.core.widgets.Graph)1 GraphNode (org.eclipse.zest.core.widgets.GraphNode)1