Menu

#14 Class Cast Exception in LayeredTreeLayout

open
nobody
None
5
2003-08-06
2003-08-06
Bruno C
No

on Linux (redHat 8):

This bug happens when you push the Layout button with
a tree loaded from a File.

How to reproduce the bug:
Build a Tree through a java class (i.e let's consider
the SampleTreeLayout class).
Save it as "tmp.xgmml".
Push the Layout button>>everything is ok

Now, open the file you just saved: "tmp.xgmml".
Push the Layout button
You'll get a Class Cast exception:

This happens 'cause there's a casting from Graph to Tree:

"tree=(Tree) this.vgraph.getGraph();"

This instruction is totally safe when the Tree is
builded from an external class (i.e SampleTreeLayout),
but it gives a systematic Class Cast Exception if the
Tree is builded from an xgmml file...

Discussion


Log in to post a comment.

MongoDB Logo MongoDB