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

(-)a/openide.explorer/src/org/openide/explorer/view/OutlineView.java (-1 / +15 lines)
Lines 856-861 Link Here
856
        return p;
856
        return p;
857
    }
857
    }
858
858
859
860
    /** Enable/disable double click to invoke default action on branch nodes.
861
     * If defaultAction is not enabled double click expand/collapse node.
862
     * @param defaultActionAllowed <code>true</code> to enable
863
     */
864
    public void setDefaultActionAllowed(boolean defaultActionAllowed) {
865
        outline.setDefaultActionAllowed(defaultActionAllowed);
866
    }
867
859
    /**
868
    /**
860
     * Action registered in the component's action map.
869
     * Action registered in the component's action map.
861
     */
870
     */
Lines 1187-1192 Link Here
1187
        private int treePositionX = 0;
1196
        private int treePositionX = 0;
1188
        private int[] rowWidths;
1197
        private int[] rowWidths;
1189
        private RequestProcessor.Task changeTask;
1198
        private RequestProcessor.Task changeTask;
1199
        private boolean defaultActionAllowed = false;
1190
        //private int maxRowWidth;
1200
        //private int maxRowWidth;
1191
1201
1192
        public OutlineViewOutline(final OutlineModel mdl, PropertiesRowModel rowModel) {
1202
        public OutlineViewOutline(final OutlineModel mdl, PropertiesRowModel rowModel) {
Lines 1331-1337 Link Here
1331
                    // Default action.
1341
                    // Default action.
1332
                    Node node = Visualizer.findNode (o);
1342
                    Node node = Visualizer.findNode (o);
1333
                    if (node != null) {
1343
                    if (node != null) {
1334
                        if (node.isLeaf () && !node.canRename()) {
1344
                        if ((node.isLeaf() && !node.canRename()) || defaultActionAllowed) {
1335
                            Action a = TreeView.takeAction (node.getPreferredAction (), node);
1345
                            Action a = TreeView.takeAction (node.getPreferredAction (), node);
1336
1346
1337
                            if (a != null) {
1347
                            if (a != null) {
Lines 1462-1467 Link Here
1462
            }
1472
            }
1463
        }
1473
        }
1464
1474
1475
        public void setDefaultActionAllowed(boolean defaultActionAllowed) {
1476
            this.defaultActionAllowed = defaultActionAllowed;
1477
        }
1478
1465
1479
1466
1480
1467
        /**
1481
        /**

Return to bug 190258