int level, boolean highlightNeighbors, int maxLabelLength, int curvedLabelAngle, boolean scaleLabels, boolean hideConflictingLabels,
boolean drawLabelBox, Graphics2D g2d, int nodeWidth, List<DNVNode> nodes, List<DNVNode> selectedNodes, SortByLabelSize sortByLabelSize,
boolean boldLabels, float fadeFactor, int maxNumberOfSelectedLabels, Vector3D neighborHighlightColor ) throws MalformedURLException,
IOException
{
DNVNode tempNode;
drawMustDrawLabels( subgraph, width, height, minXPercent, minYPercent, maxXPercent, maxYPercent, ratio, curvedLabels, outlinedLabels,
labelSize, interpolationLabels, minX, maxX, minY, maxY, overview, level, highlightNeighbors, maxLabelLength, curvedLabelAngle,
scaleLabels, hideConflictingLabels, drawLabelBox, g2d, nodeWidth, sortByLabelSize, boldLabels, fadeFactor, neighborHighlightColor );
if( drawLabels )
{
if( hideConflictingLabels )
{
nodes = getNodesWithoutOverlappingLabels( nodes, g2d, nodeWidth, interpolationLabels, curvedLabels, labelSize, minX, maxX, minY,
maxY, minXPercent, maxXPercent, minYPercent, maxYPercent, width, height, ratio, scaleLabels, maxLabelLength,
curvedLabelAngle, boldLabels, fadeFactor, subgraph.getSuperGraph() );
}
for( int i = 0; i < nodes.size(); i++ )
{
tempNode = nodes.get( i );
// if( tempNode.isVisible() )
// {
boolean highlighted = highlightNode( highlightNeighbors, tempNode );
drawLabel( width, height, minXPercent, minYPercent, maxXPercent, maxYPercent, ratio, drawLabels, curvedLabels, outlinedLabels,
labelSize, interpolationLabels, minX, maxX, minY, maxY, highlightNeighbors, maxLabelLength, curvedLabelAngle, scaleLabels,
drawLabelBox, tempNode, g2d, nodeWidth, boldLabels, highlighted, neighborHighlightColor );
// }
}
}
else if( showSearchSelectedLabels && !overview
&& ( subgraph.getSuperGraph().getSelectedNodes( level ).size() > 0 || subgraph.getSuperGraph().getSelectedEdges( level ).size() > 0 ) )
{
// int maxNumberLabelsShown = 200;
// int numberLabelsShown = 0;
Map<Integer, DNVNode> neighborSelectedNodes = new HashMap<Integer, DNVNode>();
for( DNVNode selectedNode : selectedNodes )
{
neighborSelectedNodes.put( selectedNode.getId(), selectedNode );
for( DNVNode neighbor : selectedNode.getNeighborMap( true ).values() )
{
neighborSelectedNodes.put( neighbor.getId(), neighbor );
}
}
nodes = new ArrayList<DNVNode>( neighborSelectedNodes.values() );
if( hideConflictingLabels )
{
nodes = getNodesWithoutOverlappingLabels( nodes, g2d, nodeWidth, interpolationLabels, curvedLabels, labelSize, minX, maxX, minY,
maxY, minXPercent, maxXPercent, minYPercent, maxYPercent, width, height, ratio, scaleLabels, maxLabelLength,
curvedLabelAngle, boldLabels, fadeFactor, subgraph.getSuperGraph() );
}
for( int i = 0; i < nodes.size(); i++ )
{
tempNode = nodes.get( i );
if( tempNode.getLabel() != null && !tempNode.getLabel().trim().equals( "" )/*
* &&
* tempNode
* .
* isVisible
* (
* )
*/)
{
if( tempNode.isNeighborSelected() || tempNode.isEdgeSelected() || tempNode.isSelected() )
{
boolean selected = highlightNode( highlightNeighbors, tempNode );
boolean temp = tempNode.isSelected();
tempNode.setSelected( selected );
drawLabel( width, height, minXPercent, minYPercent, maxXPercent, maxYPercent, ratio, selected, curvedLabels, outlinedLabels,
labelSize, interpolationLabels, minX, maxX, minY, maxY, highlightNeighbors, maxLabelLength, curvedLabelAngle,
scaleLabels, drawLabelBox, tempNode, g2d, nodeWidth, boldLabels, highlightNode( highlightNeighbors, tempNode ),
neighborHighlightColor );
tempNode.setSelected( temp );
}
}
}
}