for (GraphNode node : layerLinesGraphNodeList){
node.setVisible(false);
}
for ( int i = 0; i< totalLevelOffset.size(); i++){
GraphNode captionNode = layerLabelGraphNodeList.get(i);
captionNode.setVisible(true);
int height =sublevelCount.get(i) * (longestY+yOffset)-15;
int width = captionNode.getSize().width;
captionNode.setSize(width, height);
int x = 5;
int y = totalLevelOffset.get(i)*(longestY+yOffset)+5;
captionNode.setLocation(x, y);
if (i>0){
//don't draw a line at the top
GraphNode lineNode = layerLinesGraphNodeList.get(i-1);
lineNode.setSize((longestX+xOffset)*highestNumberOfNodes, 1);
lineNode.setLocation(x, y-8);
lineNode.setVisible(true);
}
}
repairCaptions();
}