Menu

#17 bug in setWidth of class Layout

open
nobody
None
5
2003-03-25
2003-03-25
Michael
No

Hello,

I think there is a bug in the class
royere.cwi.layout.Layout

Namely, when I use the method setWidth, and then
position the nodes, I get an ClassCastException.

I have looked at the code, and have compared it with the
methode setSize.
In the method setSize, I saw
sizeMap.put(node, graph, nodeSize);
with nodeSize an element of class NodeSize

But in the method setWidth, the code is
Double widthDouble = new Double(width);
sizeMap.put(node, graph, widthDouble);
So it is a double here.

I have changed the code to
NodeSize size =
new NodeSize(width,getHeightnode,graph));
sizeMap.put(node, graph, size);

It seems to work. At least I don't get an exeption
anymore.

Please correct me if I'm wrong

Michael...

Discussion


Log in to post a comment.

MongoDB Logo MongoDB