while (enumt.hasMoreElements()) {
tempNode = (ColorTreeNode) enumt.nextElement();
tempNode.setInCurrentSeq(true);
Transition nodeInfo = (Transition) tempNode.getUserObject();
EdgeInfo edgeInfo = jView_.getEdge(nodeInfo);
edgeInfo.setIsCurrSeq(true);
edgeInfo.getSrcVertex().setIsCurrSeq(true);
edgeInfo.getDestVertex().setIsCurrSeq(true);
if (tempNode.getUserObject() instanceof Transition
&& node.getParent().getIndex(tempNode) <= node.getParent().getIndex(node)) {
jView_.setEdgeDisplayed(nodeInfo, true);
pickedEdgeState.clear();
pickedVertexState.clear();
pickedEdgeState.pick(edgeInfo, true);
pickedVertexState.pick(edgeInfo.getDestVertex(), true);
pickedVertexState.pick(edgeInfo.getSrcVertex(), true);
updateInfoPanel(edgeInfo);
}
}
tree.treeDidChange();
vv.repaint();
} else if (node.isRoot()) {
Collection<Object> checkEdges = g.getEdges();
for (Object ed : checkEdges) {
if (ed instanceof EdgeInfo) {
EdgeInfo ei = (EdgeInfo) ed;
if (ei.getIsVisited()) {
ei.setIsDisplayed(true);
ei.getSrcVertex().setIsDisplayed(true);
ei.getDestVertex().setIsDisplayed(true);
ei.setIsCurrSeq(false);
ei.getSrcVertex().setIsCurrSeq(false);
ei.getDestVertex().setIsCurrSeq(false);
}
}
}
pickedEdgeState.clear();
pickedVertexState.clear();
updateInfoPanel("Nothing Selected");
tree.treeDidChange();
vv.repaint();
} else {
Collection<Object> checkEdges = g.getEdges();
for (Object ed : checkEdges) {
if (ed instanceof EdgeInfo) {
EdgeInfo ei = (EdgeInfo) ed;
ei.setIsDisplayed(false);
ei.getSrcVertex().setIsDisplayed(false);
ei.getDestVertex().setIsDisplayed(false);
ei.setIsCurrSeq(false);
ei.getSrcVertex().setIsCurrSeq(false);
ei.getDestVertex().setIsCurrSeq(false);
}
}
DefaultMutableTreeNode tempNode = null;
Enumeration enumt = node.children();
while (enumt.hasMoreElements()) {
tempNode = (DefaultMutableTreeNode) enumt.nextElement();
if (tempNode.getUserObject() instanceof Transition) {
Transition nodeInfo = (Transition) tempNode.getUserObject();
jView_.setEdgeDisplayed(nodeInfo, true);
}
}
pickedEdgeState.clear();
pickedVertexState.clear();