protected void configureTreeCellEditor( Component editor, int row, int column ) { if( !(editor instanceof JComponent) ) { return; } TreeCellEditorBorder b = new TreeCellEditorBorder(); TreePath path = getLayoutCache().getPathForRow(convertRowIndexToModel(row)); Object o = getValueAt(row, column); RenderDataProvider rdp = getRenderDataProvider(); b.icon = rdp.getIcon(o); b.nestingDepth = Math.max( 0, path.getPathCount() - (isRootVisible() ? 1 : 2) ); b.isLeaf = getOutlineModel().isLeaf(o); b.isExpanded = getLayoutCache().isExpanded(path); ((JComponent)editor).setBorder(b); }
@NbBundle.Messages("LBL_DiffView.TreeColumnLabel=Revision") public DiffTreeTable(SearchHistoryPanel master) { super(Bundle.LBL_DiffView_TreeColumnLabel()); this.master = master; getOutline().setShowHorizontalLines(true); getOutline().setShowVerticalLines(false); getOutline().setRootVisible(false); setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); setupColumns(); getOutline().setRenderDataProvider( new NoLeafIconRenderDataProvider( getOutline().getRenderDataProvider() ) ); }
RenderDataProvider rendata = tbl.getRenderDataProvider(); Icon icon = null; if (rendata != null) {