child.getGraph().getNodeTable().getTuple(row).setString("visible", "false");
//==== Hide the node's edges
Iterator edgeIt = child.edges();
while(edgeIt.hasNext())
{
Edge edge = (Edge)edgeIt.next();
int edgerow = edge.getRow();
v.getVisualItem(treeEdges,edge.getGraph().getEdgeTable().getTuple(edgerow)).setVisible(false);
}
}
else if(child.get("refType").equals("CITATIONS") && whichNodes.equals("cit"))
{
v.getVisualItem(treeNodes, child.getGraph().getNodeTable().getTuple(row)).setVisible(false);
child.getGraph().getNodeTable().getTuple(row).setString("visible", "false");
//==== Hide the node's edges
Iterator edgeIt = child.edges();
while(edgeIt.hasNext())
{
Edge edge = (Edge)edgeIt.next();
int edgerow = edge.getRow();
v.getVisualItem(treeEdges,edge.getGraph().getEdgeTable().getTuple(edgerow)).setVisible(false);
}
}
}
else if(childEdges < 1)
{
//=== If the child is connected to another node, don't do anything
}
} //end which, all children checked
}
//==== Hide all the attached nodes and edges
else
{
//==== Record all nodes as hidden, for use by the PrefuseTooltip menu
currentGraph.getNodeTable().setString(rowNumber, "refHidden", "true");
currentGraph.getNodeTable().setString(rowNumber, "citHidden", "true");
//==== Hide the node (visual item), and record it as hidden on the graph
item.setVisible(false);
currentGraph.getNodeTable().setString(rowNumber, "visible", "false");
//==== Hide the selected node's edges
Iterator edgeIt = ((Node)v.getSourceTuple(item)).edges();
while(edgeIt.hasNext())
{
Edge edge = (Edge)edgeIt.next();
int row = edge.getRow();
v.getVisualItem(treeEdges, edge).setVisible(false);
//=== Find attached FOCUS nodes and set it so that they know this node has been hidden
Node checkNode = edge.getAdjacentNode((Node)v.getSourceTuple(item));
if(checkNode.getString("refType").equals("FOCUS"))
{
if(edge.getSourceNode().getInt("DEFAULT_NODE_KEY") == checkNode.getInt("DEFAULT_NODE_KEY"))
{
checkNode.setString("refHidden", "true");
}
else if(edge.getTargetNode().getInt("DEFAULT_NODE_KEY") == checkNode.getInt("DEFAULT_NODE_KEY"))
{
checkNode.setString("citHidden", "true");
}
}
}