use of org.knime.base.node.mine.decisiontree2.model.DecisionTreeNodeRenderer in project knime-core by knime.
the class DecTreePredictorNodeView method modelChanged.
/**
* {@inheritDoc}
*/
@Override
protected void modelChanged() {
DecTreePredictorNodeModel model = this.getNodeModel();
DecisionTree dt = model.getDecisionTree();
if (dt != null) {
// set new model
m_jTree.setModel(new DefaultTreeModel(dt.getRootNode()));
// change default renderer
m_jTree.setCellRenderer(new DecisionTreeNodeRenderer());
// make sure no default height is assumed (the renderer's
// preferred size should be used instead)
m_jTree.setRowHeight(0);
// retrieve HiLiteHandler from Input port
m_hiLiteHdl = model.getInHiLiteHandler(DecTreePredictorNodeModel.INDATAPORT);
// and adjust menu entries for HiLite-ing
m_hiLiteMenu.setEnabled(m_hiLiteHdl != null);
} else {
m_jTree.setModel(null);
}
}
use of org.knime.base.node.mine.decisiontree2.model.DecisionTreeNodeRenderer in project knime-core by knime.
the class DecTreePredictorNodeView method modelChanged.
/**
* {@inheritDoc}
*/
@Override
protected void modelChanged() {
DecTreePredictorNodeModel model = this.getNodeModel();
DecisionTree dt = model.getDecisionTree();
if (dt != null) {
// set new model
m_jTree.setModel(new DefaultTreeModel(dt.getRootNode()));
// change default renderer
m_jTree.setCellRenderer(new DecisionTreeNodeRenderer());
// make sure no default height is assumed (the renderer's
// preferred size should be used instead)
m_jTree.setRowHeight(0);
// retrieve HiLiteHandler from Input port
m_hiLiteHdl = model.getInHiLiteHandler(DecTreePredictorNodeModel.INDATAPORT);
// and adjust menu entries for HiLite-ing
m_hiLiteMenu.setEnabled(m_hiLiteHdl != null);
} else {
m_jTree.setModel(null);
}
}
use of org.knime.base.node.mine.decisiontree2.model.DecisionTreeNodeRenderer in project knime-core by knime.
the class DecTreeNodeView method modelChanged.
/**
* {@inheritDoc}
*/
@Override
protected void modelChanged() {
NodeModel model = this.getNodeModel();
DecisionTree dt = ((DecisionTreeLearnerNodeModel) model).getDecisionTree();
if (dt != null) {
// set new model
m_jTree.setModel(new DefaultTreeModel(dt.getRootNode()));
// change default renderer
m_jTree.setCellRenderer(new DecisionTreeNodeRenderer());
// make sure no default height is assumed (the renderer's
// preferred size should be used instead)
m_jTree.setRowHeight(0);
// retrieve HiLiteHandler from Input port
m_hiLiteHdl = (((DecisionTreeLearnerNodeModel) model).getInHiLiteHandler(DecisionTreeLearnerNodeModel.DATA_INPORT));
// and adjust menu entries for HiLite-ing
m_hiLiteMenu.setEnabled(m_hiLiteHdl != null);
} else {
m_jTree.setModel(null);
}
}
use of org.knime.base.node.mine.decisiontree2.model.DecisionTreeNodeRenderer in project knime-core by knime.
the class DecTreeNodeView2 method modelChanged.
/**
* {@inheritDoc}
*/
@Override
protected void modelChanged() {
NodeModel model = this.getNodeModel();
DecisionTree dt = ((DecisionTreeLearnerNodeModel2) model).getDecisionTree();
if (dt != null) {
// set new model
m_jTree.setModel(new DefaultTreeModel(dt.getRootNode()));
// change default renderer
m_jTree.setCellRenderer(new DecisionTreeNodeRenderer());
// make sure no default height is assumed (the renderer's
// preferred size should be used instead)
m_jTree.setRowHeight(0);
// retrieve HiLiteHandler from Input port
m_hiLiteHdl = (((DecisionTreeLearnerNodeModel2) model).getInHiLiteHandler(DecisionTreeLearnerNodeModel2.DATA_INPORT));
// and adjust menu entries for HiLite-ing
m_hiLiteMenu.setEnabled(m_hiLiteHdl != null);
} else {
m_jTree.setModel(null);
}
}
Aggregations