weka.gui.ensembleLibraryEditor.tree
Class ModelTreeNodeRenderer

java.lang.Object
  extended by weka.gui.ensembleLibraryEditor.tree.ModelTreeNodeRenderer
All Implemented Interfaces:
javax.swing.tree.TreeCellRenderer

public class ModelTreeNodeRenderer
extends java.lang.Object
implements javax.swing.tree.TreeCellRenderer

This class renders a tree nodes. It determines which type of node the m_Tree is trying to render and then returns the approapriate gui widget. It is basically the same thing as the ModelTreeNodeEditor class except it does not have to.

Version:
$Revision: 1.1 $
Author:
Robert Jung (mrbobjung@gmail.com)

Constructor Summary
ModelTreeNodeRenderer()
          empty Constructor
 
Method Summary
 java.awt.Component getTreeCellRendererComponent(javax.swing.JTree tree, java.lang.Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)
          This is the method of this class that is responsible for figuring out how to display each of the tree nodes.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelTreeNodeRenderer

public ModelTreeNodeRenderer()
empty Constructor

Method Detail

getTreeCellRendererComponent

public java.awt.Component getTreeCellRendererComponent(javax.swing.JTree tree,
                                                       java.lang.Object value,
                                                       boolean selected,
                                                       boolean expanded,
                                                       boolean leaf,
                                                       int row,
                                                       boolean hasFocus)
This is the method of this class that is responsible for figuring out how to display each of the tree nodes. All it does is figure out the type of the node and then return a new instance of the apropriate editor type for the node.

Specified by:
getTreeCellRendererComponent in interface javax.swing.tree.TreeCellRenderer
Parameters:
tree - the associated tree
value - the value
selected - true if item is selected
expanded - true if node is expanded
leaf - true if node is leaf
row - the row in the tree
hasFocus - true if item has the focus
Returns:
the rendering component