# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: D:\hg\core-main
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: openide.explorer/apichanges.xml
--- openide.explorer/apichanges.xml Base (BASE)
+++ openide.explorer/apichanges.xml Locally Modified (Based On LOCAL)
@@ -50,6 +50,21 @@
Explorer API
+
+
+ PropertySheet extensions
+
+
+
+
+
+ PropertySheet class has new methods which allow subclasses to provide custom
+ popup menu, check expansion state, expand/collapse property categories,
+ retrieve the selected property.
+
+
+
+
setPropertyColumnAttribute() method added to OutlineView
Index: openide.explorer/manifest.mf
--- openide.explorer/manifest.mf Base (BASE)
+++ openide.explorer/manifest.mf Locally Modified (Based On LOCAL)
@@ -2,5 +2,5 @@
OpenIDE-Module: org.openide.explorer
OpenIDE-Module-Localizing-Bundle: org/openide/explorer/Bundle.properties
AutoUpdate-Essential-Module: true
-OpenIDE-Module-Specification-Version: 6.46
+OpenIDE-Module-Specification-Version: 6.47
Index: openide.explorer/src/org/openide/explorer/propertysheet/PropertySheet.java
--- openide.explorer/src/org/openide/explorer/propertysheet/PropertySheet.java Base (BASE)
+++ openide.explorer/src/org/openide/explorer/propertysheet/PropertySheet.java Locally Modified (Based On LOCAL)
@@ -859,12 +859,16 @@
final void showPopup(Point p) {
if( !popupEnabled )
return;
+
+ JPopupMenu popup = createPopupMenu();
+
+ if( null == popup ) {
JMenuItem helpItem = new JMenuItem();
JRadioButtonMenuItem sortNamesItem = new JRadioButtonMenuItem();
JRadioButtonMenuItem unsortedItem = new JRadioButtonMenuItem();
JCheckBoxMenuItem descriptionItem = new JCheckBoxMenuItem();
JMenuItem defaultValueItem = new JMenuItem();
- JPopupMenu popup = new JPopupMenu();
+ popup = new JPopupMenu();
unsortedItem.setSelected(getSortingMode() == UNSORTED);
sortNamesItem.setSelected(getSortingMode() == SORTED_BY_NAMES);
@@ -887,9 +891,53 @@
popup.add(defaultValueItem);
popup.add(new JSeparator());
popup.add(helpItem);
+ }
popup.show(psheet, p.x, p.y);
}
+ /**
+ * Subclasses may override this method to create a custom popup menu that will
+ * show on right-click in the property sheet.
+ * @return Custom popup menu or null to use the default popup menu provided
+ * by this class.
+ * @since 6.47
+ */
+ protected JPopupMenu createPopupMenu() {
+ return null;
+ }
+
+ /**
+ * Check if the PropertySet the given property belongs to is expanded or not.
+ * @param fd Property or PropertySet to check.
+ * @return True if the PropertySet the given property belongs is expanded.
+ * @since 6.47
+ */
+ protected final boolean isExpanded( FeatureDescriptor fd ) {
+ return table.getPropertySetModel().isExpanded( fd );
+ }
+
+ /**
+ * Expand or collapse the PropertySet the given property belongs to.
+ * @param fd
+ * @since 6.47
+ */
+ protected final void toggleExpanded( FeatureDescriptor fd ) {
+ int index = table.getPropertySetModel().indexOf( fd );
+ if( index >= 0 ) {
+ table.getPropertySetModel().toggleExpanded( WIDTH );
+ }
+ }
+
+ /**
+ * Retrieve currently selected property or PropertySet.
+ * @return Selected property or PropertySet or null if there is no selection.
+ * @since 6.47
+ */
+ protected final FeatureDescriptor getSelection() {
+ return table.getSelection();
+ }
+
+
Node[] getCurrentNodes() {
Node n = pclistener.getNode();