issue #136636 introduced window-system-wide customizations allowing e.g. turning 'sliding' of windows off.
however in many cases there's need to enable/disable some window system features on topcomponent level. i propose
introducing of a set of boolean client properties which would enable/disable the following features for particular
- disable closing - topcomponent won't have close button in its title bar and 'close window' action in its popup and in
main window will be disabled
- disable sliding - topcomponent won't have minimize button and 'minimize action' will be disabled. topcomponents docked
in sliding modes (slided-out by default) won't have 'pin' button and their 'minimizer action' will be disabled.
- disable dragging - it won't be possible to drag and drop topcomponent to a different location
- disable undocking - topcomponent's 'undock window' action will be disabled, topcomponents floating by default will
have their 'dock window' action disabled
- disable maximization - it won't be possible to maximize the topcomponent by doubleclicking its header and their
'maximize action' will be disabled
Created attachment 75766 [details]
[JG01] "The features above can be turned on/off simply by branding of core.windows module" doesn't make much sense here.
[JG02] Why aren't these simply methods on TopComponent? Or at least API constants?
Excellent! The methods seem clear enough to me.
Re JG comments: I wondered the same thing, but assumed (perhaps incorrectly) that this was simply documenting the
changes made through #136636. In other words, the properties are used to turn off features of the Window System
globally, while the methods are used to turn it off for specific TopComponents.
At least some of those properties (such as netbeans.winsys.tc.closing_disabled) are not listed in the API doc here:
Re JG02 - I agree. At least some property name constants to make setting those properties easier or making methods to
set and get them and show the developer how to do it and make it more clear would be good.
Re JG01 - Yes. I'm trying to figure out how this has meaning as well. Will the TC definition files which can be placed
in the layer be able to use these properties some how so these properties are definable from those type sources, or is
it expected that developers will always set client properties on specific top components to make these things work? Is
it envisioned that these properties have different hierarchies where these things can be set at a global level and it
affects all TCs (branding), then in the .wstcref files for specific ones, and finally on the client property level and
each one can override the others in the hierarchy?
JG01: that's a copy-pasted left-over only, that sentence shouldn't be there
JG02: i'll define the property names in TopComponent class
if there are no more comments i'll integrate this feature sometime this week
integrated in ec137c496193
Integrated into 'main-golden', will be available in build *200901310201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: S. Aubrecht <firstname.lastname@example.org>
Log: #156693 - allow window system customizations on TopComponent level
*** Issue 96331 has been marked as a duplicate of this issue. ***
doesn't include a property for preventing resize. All other properties are covered, but for: org.netbeans.core.windows.TopComponent.Resizing.Enabled
(In reply to comment #11)
> doesn't include a property for preventing resize. All other properties are
> covered, but for: org.netbeans.core.windows.TopComponent.Resizing.Enabled
no, it does not. and it never will unless someone rewrites the layout manager which handles the placement of topcomponents into main window's grid.
(In reply to comment #13)
> feature request.
file a new issue for it then