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)
{