Package prefuse.data

Examples of prefuse.data.Node


        public void run(final double frac) {
            TupleSet focus = vis.getGroup(Visualization.FOCUS_ITEMS);
            if (focus == null || focus.getTupleCount() == 0)
                return;           
            Graph g = (Graph) vis.getGroup(m_group);
            Node f = null;
            Iterator tuples = focus.tuples();
            while (tuples.hasNext() &&
                   !g.containsTuple(f=(Node)tuples.next())) {
                f = null;
            }
            if (f == null) {
                return;
            }
            Object uo = f.get(Constants.USER_OBJECT);
            if(uo!=null && uo instanceof GraphNode) {
                GraphNode node = (GraphNode)uo;
                if(node.isServiceInstance())
                    return;
            }
View Full Code Here


public class GraphUtil {

    public static Node addService(Graph g,
                                  Node opstringNode,
                                  ServiceElement service) {
        Node node = g.addNode();
        node.set(VisualItem.LABEL, service.getName());
        node.set(Constants.USER_OBJECT,
                 new GraphNode(service, (TableNode) node));
        node.set(Constants.STATE, Constants.EMPTY);
        g.addEdge(opstringNode, node);
        return (node);
    }
View Full Code Here

    public static Node addService(Graph g,
                                  Node opstringNode,
                                  String name,
                                  GraphNode graphNode) {
        Node node = g.addNode();
        node.set(VisualItem.LABEL, name);
        node.set(Constants.USER_OBJECT, graphNode);
        node.set(Constants.STATE, Constants.EMPTY);
        g.addEdge(opstringNode, node);
        graphNode.setTableNode((TableNode) node);
        return (node);
    }
View Full Code Here

    public static Node addServiceInstance(Graph g,
                                          Node serviceNode,
                                          String opStringName,
                                          long instanceID) {
        Node instance = g.addNode();
        g.addEdge(serviceNode, instance);
        instance.set(VisualItem.LABEL, "");
        GraphNode gNode = new GraphNode(instanceID,
                                        opStringName,
                                        (TableNode) instance);
        instance.set(Constants.USER_OBJECT, gNode);
        instance.set(Constants.STATE, Constants.EMPTY);
        gNode.setTableNode((TableNode)instance);
        return (instance);
    }
View Full Code Here

    }

    public static Node addServiceInstance(Graph g,
                                          Node serviceNode,
                                          GraphNode graphNode) {
        Node instance = g.addNode();
        g.addEdge(serviceNode, instance);
        instance.set(VisualItem.LABEL, "");
        instance.set(Constants.USER_OBJECT, graphNode);
        instance.set(Constants.STATE, Constants.EMPTY);
        if (graphNode.getServiceItem() == null) {
            instance.set(Constants.STATE, Constants.ACTIVE_NO_SERVICE_ITEM);
        } else {
            instance.set(Constants.STATE, Constants.ACTIVE);
        }
        graphNode.setTableNode((TableNode) instance);
        return (instance);
    }
View Full Code Here

    }

    public static GraphNode addServiceInstance(Graph g,
                                               GraphNode serviceNode,
                                               ServiceBeanInstance sbInstance) {
        Node instance = g.addNode();
        g.addEdge(serviceNode.getTableNode(), instance);
        instance.set(VisualItem.LABEL, "");
        GraphNode graphNode =
            new GraphNode(sbInstance.getServiceBeanConfig().getInstanceID(),
                          serviceNode.getServiceElement().getOperationalStringName(),
                          (TableNode) instance);
        instance.set(Constants.USER_OBJECT, graphNode);
        if (graphNode.getInstance() != null) {
            if (graphNode.getServiceItem() == null) {
                instance.set(Constants.STATE, Constants.ACTIVE_NO_SERVICE_ITEM);
            } else {
                instance.set(Constants.STATE, Constants.ACTIVE);
            }
        } else {
            instance.set(Constants.STATE, Constants.FAILED);
        }
        /*
        if(graphNode.getServiceItem()==null) {
            instance.set(Constants.STATE, Constants.FAILED);
        } else {
View Full Code Here

TOP

Related Classes of prefuse.data.Node

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.