This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 247556
Collapse All | Expand All

(-)a/o.n.swing.outline/src/org/netbeans/swing/outline/DefaultOutlineCellRenderer.java (-2 / +14 lines)
Lines 80-85 Link Here
80
    private boolean leaf = true;
80
    private boolean leaf = true;
81
    private boolean showHandle = true;
81
    private boolean showHandle = true;
82
    private int nestingDepth = 0;
82
    private int nestingDepth = 0;
83
    private int labelTextGap = 0;
83
    private final JCheckBox theCheckBox;
84
    private final JCheckBox theCheckBox;
84
    private final CellRendererPane fakeCellRendererPane;
85
    private final CellRendererPane fakeCellRendererPane;
85
    private JCheckBox checkBox;
86
    private JCheckBox checkBox;
Lines 207-212 Link Here
207
        return showHandle;
208
        return showHandle;
208
    }
209
    }
209
    
210
    
211
    private void setLabelTextGap(int labelTextGap) {
212
        this.labelTextGap = labelTextGap;
213
    }
214
    
215
    private int getLabelTextGap() {
216
        return labelTextGap;
217
    }
218
    
210
    /** Set the nesting depth - the number of path elements below the root.
219
    /** Set the nesting depth - the number of path elements below the root.
211
     * This is set in getTableCellEditorComponent(), and retrieved by the
220
     * This is set in getTableCellEditorComponent(), and retrieved by the
212
     * expansion border to determine how far to the right to indent the current
221
     * expansion border to determine how far to the right to indent the current
Lines 239-244 Link Here
239
248
240
        setForeground(null);
249
        setForeground(null);
241
        setBackground(null);
250
        setBackground(null);
251
        setLabelTextGap(0);
242
        super.getTableCellRendererComponent(
252
        super.getTableCellRendererComponent(
243
                  table, value, isSelected, hasFocus, row, column);
253
                  table, value, isSelected, hasFocus, row, column);
244
        JLabel label = null;
254
        JLabel label = null;
Lines 343-349 Link Here
343
            } else {
353
            } else {
344
                label.setIcon(icon);
354
                label.setIcon(icon);
345
            }
355
            }
346
        
356
            if (icon == null || icon.getIconWidth() == 0) {
357
                setLabelTextGap(getIconTextGap());
358
            }
347
        } else { // ! tbl.isTreeColumnIndex(column)
359
        } else { // ! tbl.isTreeColumnIndex(column)
348
            setCheckBox(null);
360
            setCheckBox(null);
349
            if (swingRendering) {
361
            if (swingRendering) {
Lines 410-416 Link Here
410
            }
422
            }
411
            if (ren.isShowHandle()) {
423
            if (ren.isShowHandle()) {
412
                insets.left = getExpansionHandleWidth() + (ren.getNestingDepth() *
424
                insets.left = getExpansionHandleWidth() + (ren.getNestingDepth() *
413
                    getNestingWidth());
425
                    getNestingWidth()) + ren.getLabelTextGap();
414
                //Defensively adjust all the insets fields
426
                //Defensively adjust all the insets fields
415
                insets.top = 1;
427
                insets.top = 1;
416
                insets.right = 1;
428
                insets.right = 1;

Return to bug 247556