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

(-)openide/explorer/apichanges.xml (+15 lines)
Lines 25-30 Link Here
25
<changes>
25
<changes>
26
    <change id="deleted-PropertySheetSettings">
26
    <change id="deleted-PropertySheetSettings">
27
        <api name="explorer"/>
27
        <api name="explorer"/>
28
        <summary>Added setters to show/hide the description area and 
29
        enable/disable the popup menu</summary>
30
        <version major="6" minor="9"/>
31
        <date day="3" month="4" year="2007"/>
32
        <author login="tboudreau"/>
33
        <compatibility binary="compatible" source="compatible" deprecation="no" deletion="no"/>
34
        <description>Added setters for the visibility of the description area
35
        and availability of the popup menu to PropertySheet
36
        </description>
37
        <class package="org.openide.explorer.propertysheet" name="PropertySheet" link="yes"/>
38
        <issue number="88769"/>
39
    </change>
40
    
41
    <change id="deleted-PropertySheetSettings">
42
        <api name="explorer"/>
28
        <summary>PropertySheetSettings was deleted</summary>
43
        <summary>PropertySheetSettings was deleted</summary>
29
        <version major="6" minor="8"/>
44
        <version major="6" minor="8"/>
30
        <date day="9" month="11" year="2006"/>
45
        <date day="9" month="11" year="2006"/>
(-)openide/explorer/manifest.mf (-1 / +1 lines)
Lines 1-6 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.openide.explorer
2
OpenIDE-Module: org.openide.explorer
3
OpenIDE-Module-Specification-Version: 6.8
3
OpenIDE-Module-Specification-Version: 6.9
4
OpenIDE-Module-Implementation-Version: 1
4
OpenIDE-Module-Implementation-Version: 1
5
OpenIDE-Module-Localizing-Bundle: org/openide/explorer/Bundle.properties
5
OpenIDE-Module-Localizing-Bundle: org/openide/explorer/Bundle.properties
6
6
(-)openide/explorer/src/org/openide/explorer/propertysheet/PropertySheet.java (-7 / +30 lines)
Lines 332-343 Link Here
332
            Exceptions.printStackTrace(e);
332
            Exceptions.printStackTrace(e);
333
        }
333
        }
334
    }
334
    }
335
335
    
336
    /** Enable/disable display of the description area */
336
    private boolean popupEnabled = true;
337
    void setDescriptionVisible(boolean val) {
337
    /**
338
     * Set whether or not the popup menu should be available on
339
     * right-click.
340
     * @param val If true, right-clicking the property sheet will show a popup
341
     *  offering sorting options, show/hide description area, etc.
342
     * @since 6.9
343
     */ 
344
    public final void setPopupEnabled(boolean val) {
345
        this.popupEnabled = val;
346
    }
347
    
348
    /**
349
     * Set the visibility of the description area.
350
     * 
351
     * @param val Whether or not it should be visible
352
     * @since 6.9
353
     */ 
354
    public final void setDescriptionAreaVisible (boolean val) {
338
        if (isDescriptionVisible() != val) {
355
        if (isDescriptionVisible() != val) {
339
            int state = psheet.getState();
356
            int state = psheet.getState();
340
341
            if (!val) {
357
            if (!val) {
342
                int newState = ((state & PSheet.STATE_HAS_TABS) != 0) ? PSheet.STATE_HAS_TABS : 0;
358
                int newState = ((state & PSheet.STATE_HAS_TABS) != 0) ? PSheet.STATE_HAS_TABS : 0;
343
359
Lines 348-358 Link Here
348
364
349
                psheet.setState(newState);
365
                psheet.setState(newState);
350
            }
366
            }
351
352
            PropUtils.saveShowDescription(val);
353
        }
367
        }
354
    }
368
    }
355
369
370
    /** Enable/disable display of the description area */
371
    void setDescriptionVisible(boolean val) {
372
        setDescriptionAreaVisible (val);
373
        PropUtils.saveShowDescription(val);
374
    }
375
356
    boolean isDescriptionVisible() {
376
    boolean isDescriptionVisible() {
357
        return (psheet.getState() & PSheet.STATE_HAS_DESCRIPTION) != 0;
377
        return (psheet.getState() & PSheet.STATE_HAS_DESCRIPTION) != 0;
358
    }
378
    }
Lines 762-769 Link Here
762
    public @Deprecated boolean getDisplayWritableOnly() {
782
    public @Deprecated boolean getDisplayWritableOnly() {
763
        return false;
783
        return false;
764
    }
784
    }
765
785
    
766
    final void showPopup(Point p) {
786
    final void showPopup(Point p) {
787
        if (!popupEnabled) {
788
            return;
789
        }
767
        JMenuItem helpItem = new JMenuItem();
790
        JMenuItem helpItem = new JMenuItem();
768
        JRadioButtonMenuItem sortNamesItem = new JRadioButtonMenuItem();
791
        JRadioButtonMenuItem sortNamesItem = new JRadioButtonMenuItem();
769
        JRadioButtonMenuItem unsortedItem = new JRadioButtonMenuItem();
792
        JRadioButtonMenuItem unsortedItem = new JRadioButtonMenuItem();

Return to bug 100170