Package org.gvt.gui

Examples of org.gvt.gui.CompartmentQueryParamWithEntitiesDialog


            return;
        }

        //open dialog
        CompartmentQueryParamWithEntitiesDialog dialog =
      new CompartmentQueryParamWithEntitiesDialog(main);
        options = dialog.open(options);

        if ( !options.isCancel() )
    {
      options.setCancel(true);
    }
    else
    {
      return;
    }

        //Source and target node sets

        Set<Node> sourceNodes = new HashSet<Node>();
        Set<Node> targetNodes = new HashSet<Node>();

    //Get added source compartments.
        ArrayList<Compartment> sourceAddedCompartments =
      dialog.getSourceAddedCompartments();

    Set<GraphObject> sourceSet = new HashSet<GraphObject>();
    //Get nodes and edges from source added compartments.
    for (Compartment compartment : sourceAddedCompartments)
    {
      sourceSet.addAll(compartment.getChildren());
    }

    //Select the nodes that are entity associated
    for (GraphObject go : sourceSet)
        {
            if (go instanceof EntityAssociated)
            {
                sourceNodes.add((Node)go);
            }
        }

    //Get added target compartments.
        ArrayList<Compartment> targetAddedCompartments =
      dialog.getTargetAddedCompartments();

        Set<GraphObject> targetSet = new HashSet<GraphObject>();
    //Get nodes and edges from target added compartments.
    for (Compartment compartment : targetAddedCompartments)
    {
View Full Code Here

TOP

Related Classes of org.gvt.gui.CompartmentQueryParamWithEntitiesDialog

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.