[Biojava-l] Cast to Sequence

2005-07-31 Thread Jacob Rohde
Hi, I'm having a problem with a JTree and rendering of Sequences. Since the JTree calls toString() on objects when displaying them, I had to make my own TreeCellRenderer because the Sequence toString method prints out debug info. My code looks like this: public class FeatureTreeCellRenderer ext

Re: [Biojava-l] Cast to Sequence

2005-07-31 Thread Tom Oinn
Jacob Rohde wrote: Hi, I'm having a problem with a JTree and rendering of Sequences. Since the JTree calls toString() on objects when displaying them, I had to make my own TreeCellRenderer because the Sequence toString method prints out debug info. My code looks like this: public class Featur

Re: [Biojava-l] Cast to Sequence

2005-07-31 Thread Tom Oinn
Tom Oinn wrote: You should use : Sequence s = (Sequence)((DefaultMutableTreeNode)getUserObject()); instead, and next time read the javadoc for TreeCellRenderer and the like more carefully :) Or even : Sequence s = (Sequence)((DefaultMutableTreeNode)value).getUserObject(); in the case of wan

Re: [Biojava-l] Cast to Sequence

2005-07-31 Thread mark . schreiber
You might also want to use the Biojava FeatureTree class. An example of it's use is at http://www.biojava.org/docs/bj_in_anger/treeView.htm - Mark Jacob Rohde <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 07/31/2005 08:36 PM Please respond to Jacob Rohde To: biojava-l@biojava