Index: openide/explorer/apichanges.xml =================================================================== RCS file: /cvs/openide/explorer/apichanges.xml,v retrieving revision 1.10 diff -u -r1.10 apichanges.xml --- openide/explorer/apichanges.xml 10 Nov 2006 09:57:53 -0000 1.10 +++ openide/explorer/apichanges.xml 5 Apr 2007 22:21:57 -0000 @@ -25,6 +25,21 @@ + Added setters to show/hide the description area and + enable/disable the popup menu + + + + + Added setters for the visibility of the description area + and availability of the popup menu to PropertySheet + + + + + + + PropertySheetSettings was deleted Index: openide/explorer/manifest.mf =================================================================== RCS file: /cvs/openide/explorer/manifest.mf,v retrieving revision 1.10 diff -u -r1.10 manifest.mf --- openide/explorer/manifest.mf 9 Nov 2006 16:54:15 -0000 1.10 +++ openide/explorer/manifest.mf 5 Apr 2007 22:21:58 -0000 @@ -1,6 +1,6 @@ Manifest-Version: 1.0 OpenIDE-Module: org.openide.explorer -OpenIDE-Module-Specification-Version: 6.8 +OpenIDE-Module-Specification-Version: 6.9 OpenIDE-Module-Implementation-Version: 1 OpenIDE-Module-Localizing-Bundle: org/openide/explorer/Bundle.properties Index: openide/explorer/src/org/openide/explorer/propertysheet/PropertySheet.java =================================================================== RCS file: /cvs/openide/explorer/src/org/openide/explorer/propertysheet/PropertySheet.java,v retrieving revision 1.14 diff -u -r1.14 PropertySheet.java --- openide/explorer/src/org/openide/explorer/propertysheet/PropertySheet.java 28 Oct 2006 21:57:40 -0000 1.14 +++ openide/explorer/src/org/openide/explorer/propertysheet/PropertySheet.java 5 Apr 2007 22:21:59 -0000 @@ -332,12 +332,28 @@ Exceptions.printStackTrace(e); } } - - /** Enable/disable display of the description area */ - void setDescriptionVisible(boolean val) { + + private boolean popupEnabled = true; + /** + * Set whether or not the popup menu should be available on + * right-click. + * @param val If true, right-clicking the property sheet will show a popup + * offering sorting options, show/hide description area, etc. + * @since 6.9 + */ + public final void setPopupEnabled(boolean val) { + this.popupEnabled = val; + } + + /** + * Set the visibility of the description area. + * + * @param val Whether or not it should be visible + * @since 6.9 + */ + public final void setDescriptionAreaVisible (boolean val) { if (isDescriptionVisible() != val) { int state = psheet.getState(); - if (!val) { int newState = ((state & PSheet.STATE_HAS_TABS) != 0) ? PSheet.STATE_HAS_TABS : 0; @@ -348,11 +364,15 @@ psheet.setState(newState); } - - PropUtils.saveShowDescription(val); } } + /** Enable/disable display of the description area */ + void setDescriptionVisible(boolean val) { + setDescriptionAreaVisible (val); + PropUtils.saveShowDescription(val); + } + boolean isDescriptionVisible() { return (psheet.getState() & PSheet.STATE_HAS_DESCRIPTION) != 0; } @@ -762,8 +782,11 @@ public @Deprecated boolean getDisplayWritableOnly() { return false; } - + final void showPopup(Point p) { + if (!popupEnabled) { + return; + } JMenuItem helpItem = new JMenuItem(); JRadioButtonMenuItem sortNamesItem = new JRadioButtonMenuItem(); JRadioButtonMenuItem unsortedItem = new JRadioButtonMenuItem();