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 223021
Collapse All | Expand All

(-)a/o.n.swing.outline/src/org/netbeans/swing/outline/Outline.java (-7 / +6 lines)
Lines 707-712 Link Here
707
        boolean isTreeColumn = isTreeColumnIndex(column);
707
        boolean isTreeColumn = isTreeColumnIndex(column);
708
        if (isTreeColumn && e instanceof MouseEvent) {
708
        if (isTreeColumn && e instanceof MouseEvent) {
709
            MouseEvent me = (MouseEvent) e;
709
            MouseEvent me = (MouseEvent) e;
710
            // It may be a request to check/uncheck a check-box
711
            if (checkAt(row, column, me)) {
712
                return false;
713
            }
710
            TreePath path = getLayoutCache().getPathForRow(convertRowIndexToModel(row));
714
            TreePath path = getLayoutCache().getPathForRow(convertRowIndexToModel(row));
711
            if (!getOutlineModel().isLeaf(path.getLastPathComponent())) {
715
            if (!getOutlineModel().isLeaf(path.getLastPathComponent())) {
712
                int handleWidth = DefaultOutlineCellRenderer.getExpansionHandleWidth();
716
                int handleWidth = DefaultOutlineCellRenderer.getExpansionHandleWidth();
Lines 764-773 Link Here
764
                    return false;
768
                    return false;
765
                }
769
                }
766
            }
770
            }
767
            // It may be a request to check/uncheck a check-box
768
            if (checkAt(row, column, me)) {
769
                return false;
770
            }
771
        }
771
        }
772
            
772
            
773
        boolean res = false;
773
        boolean res = false;
Lines 814-820 Link Here
814
        return false;
814
        return false;
815
    }
815
    }
816
816
817
    private boolean checkAt(int row, int column, MouseEvent me) {
817
    protected final boolean checkAt(int row, int column, MouseEvent me) {
818
        RenderDataProvider render = getRenderDataProvider();
818
        RenderDataProvider render = getRenderDataProvider();
819
        TableCellRenderer tcr = getDefaultRenderer(Object.class);
819
        TableCellRenderer tcr = getDefaultRenderer(Object.class);
820
        if (render instanceof CheckRenderDataProvider && tcr instanceof DefaultOutlineCellRenderer) {
820
        if (render instanceof CheckRenderDataProvider && tcr instanceof DefaultOutlineCellRenderer) {
Lines 838-845 Link Here
838
                    int chEnd = chStart + chWidth;
838
                    int chEnd = chStart + chWidth;
839
                    //TODO: Translate x/y to position of column if non-0
839
                    //TODO: Translate x/y to position of column if non-0
840
840
841
                    chBoxPosition = (me.getX() > ins.left && me.getX() >= chStart && me.getX() <= chEnd) &&
841
                    chBoxPosition = (me.getX() > ins.left && me.getX() >= chStart && me.getX() <= chEnd);
842
                                    me.getClickCount() == 1;
843
                }
842
                }
844
                if (chBoxPosition) {
843
                if (chBoxPosition) {
845
                    Boolean selected = crender.isSelected(value);
844
                    Boolean selected = crender.isSelected(value);
(-)a/openide.explorer/src/org/openide/explorer/view/OutlineView.java (+3 lines)
Lines 1910-1915 Link Here
1910
            boolean actionPerformed = false;
1910
            boolean actionPerformed = false;
1911
            boolean isTreeColumn = convertColumnIndexToModel(column) == 0;
1911
            boolean isTreeColumn = convertColumnIndexToModel(column) == 0;
1912
            if (isTreeColumn && row != -1 && e instanceof MouseEvent && SwingUtilities.isLeftMouseButton ((MouseEvent) e)) {
1912
            if (isTreeColumn && row != -1 && e instanceof MouseEvent && SwingUtilities.isLeftMouseButton ((MouseEvent) e)) {
1913
                if (checkAt(row, column, (MouseEvent) e)) {
1914
                    return false;
1915
                }
1913
                int clickCount = ((MouseEvent) e).getClickCount();
1916
                int clickCount = ((MouseEvent) e).getClickCount();
1914
                if (clickCount > 1) {
1917
                if (clickCount > 1) {
1915
                    // Default action.
1918
                    // Default action.

Return to bug 223021