diff --git a/o.n.swing.tabcontrol/apichanges.xml b/o.n.swing.tabcontrol/apichanges.xml --- a/o.n.swing.tabcontrol/apichanges.xml +++ b/o.n.swing.tabcontrol/apichanges.xml @@ -104,6 +104,24 @@ + + + + Added new abstract class WinsysInfoForTabbedContainer which can + adjust some tabbed container properties and behavior. + + + + + +

Added new methods to class WinsysInfoForTabbedContainer to find out the + status (enabled/disabled) of some window system features. For example, is the TopComponent + allowed to slide-out. +

+
+ + +
diff --git a/o.n.swing.tabcontrol/manifest.mf b/o.n.swing.tabcontrol/manifest.mf --- a/o.n.swing.tabcontrol/manifest.mf +++ b/o.n.swing.tabcontrol/manifest.mf @@ -1,6 +1,6 @@ Manifest-Version: 1.0 OpenIDE-Module-Localizing-Bundle: org/netbeans/swing/tabcontrol/Bundle.properties OpenIDE-Module: org.netbeans.swing.tabcontrol -OpenIDE-Module-Specification-Version: 1.14 +OpenIDE-Module-Specification-Version: 1.15 AutoUpdate-Essential-Module: true diff --git a/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/WinsysInfoForTabbedContainer.java b/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/WinsysInfoForTabbedContainer.java --- a/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/WinsysInfoForTabbedContainer.java +++ b/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/WinsysInfoForTabbedContainer.java @@ -42,6 +42,7 @@ package org.netbeans.swing.tabcontrol; import java.awt.Component; +import org.openide.windows.TopComponent; /** @@ -72,6 +73,45 @@ * from TopComponent's header. */ public boolean isTopComponentClosingEnabled() { + return true; + } + + /** + * @return True if given TopComponent can be closed, false to remove Close button + * from TopComponent's header. + */ + public boolean isTopComponentClosingEnabled( TopComponent tc ) { + return true; + } + + /** + * @return True if given TopComponent can be slided-out, false to remove 'Minimize Window' + * action from TopComponent's popup menu. + */ + public boolean isTopComponentSlidingEnabled( TopComponent tc ) { + return true; + } + + /** + * @return True if given TopComponent can be dragged-out and dropped into a + * different mode. + */ + public boolean isTopComponentDraggingEnabled( TopComponent tc ) { + return true; + } + + /** + * @return True if given TopComponent can be undocked (floating), false to + * remove "Undock Window" action from TopComponent's popup menu. + */ + public boolean isTopComponentUndockingEnabled( TopComponent tc ) { + return true; + } + + /** + * @return True if given TopComponent can be maximized. + */ + public boolean isTopComponentMaximizationEnabled( TopComponent tc ) { return true; } diff --git a/openide.windows/apichanges.xml b/openide.windows/apichanges.xml --- a/openide.windows/apichanges.xml +++ b/openide.windows/apichanges.xml @@ -47,6 +47,29 @@ Window System API + + + + Added a group of client properties for customization + of window system behavior on per-TopComponent basis. + + + + + +

There is a set of new boolean client properties which platform + developers can use to customize the behavior of individual TopComponents in NetBeans' window system:

+
    +
  • Disable window closing
  • +
  • Disable window drag and drop
  • +
  • Disable window undocking (floating windows)
  • +
  • Disable window sliding
  • +
  • Disable window maximization
  • +
+

The features above can be turned on/off simply by branding of core.windows module.

+
+ +
diff --git a/openide.windows/arch.xml b/openide.windows/arch.xml --- a/openide.windows/arch.xml +++ b/openide.windows/arch.xml @@ -540,11 +540,41 @@ Name of TopComponent's Boolean client property which forces the window system - to respect TopComponent's preferred size when it is slided-in from left/right/bottom + to respect TopComponent's preferred size when it is slided-in from left/right/bottom sliding bar when set to Boolean.TRUE. Otherwise the slided-in TopComponent will fill the entire width/length of the IDE window (the default behavior). - This switch is intended for tools/palette windows like e.g. color chooser, + This switch is intended for tools/palette windows like e.g. color chooser, tool picker etc. + + + + Name of TopComponent's Boolean client property which removes close button + from TopComponent's header and disables its 'Close Window' action when set to Boolean.TRUE. + + + + Name of TopComponent's Boolean client property which removes 'minimized' button + from TopComponent's header and disables its 'Minimize Window' action when + set to Boolean.TRUE. TopComponents which are already slided-out and have this + property set to Boolean.TRUE will have 'pin' button removed from their header + and their 'Minimize Window' action will be disabled. + + + + Name of TopComponent's Boolean client property which disables TopComponent's + 'Undock Window' action when set to Boolean.TRUE. TopComponents which are already + floating and have this property set to Boolean.TRUE will have their 'Dock Window' action disabled. + + + + Name of TopComponent's Boolean client property which disables drag and drop + when set to Boolean.TRUE. + + + + Name of TopComponent's Boolean client property which disables TopComponent + maximization by double-clicking its header when set to Boolean.TRUE. TopComponent's + 'Maximize Window' action will be also disabled. diff --git a/openide.windows/manifest.mf b/openide.windows/manifest.mf --- a/openide.windows/manifest.mf +++ b/openide.windows/manifest.mf @@ -1,6 +1,6 @@ Manifest-Version: 1.0 OpenIDE-Module: org.openide.windows -OpenIDE-Module-Specification-Version: 6.25 +OpenIDE-Module-Specification-Version: 6.26 OpenIDE-Module-Localizing-Bundle: org/openide/windows/Bundle.properties AutoUpdate-Essential-Module: true