Disabling JavaFX minimise/maximise/etc buttons

Artem Ananiev artem.ananiev at oracle.com
Mon Jul 22 08:20:10 PDT 2013


On 7/22/2013 11:14 AM, Pavel Safrata wrote:
> Hi Jonathan,
> I believe this has been neither requested nor discussed so far. I don't
> see why this couldn't be added, it just might have to be a conditional
> feature, we'll have to check. Feel free to file a feature request.

Some native platforms (mostly, X window managers) don't provide direct 
APIs to enable/disable certain window decoration buttons. A library or 
an application may provides some hints, which may or may not be 
respected by WM.

I like what we have right now, StageStyle approach. Application defines 
the purpose of the window and let the platform decide, what are 
available actions for it.

Thanks,

Artem

> Regards,
> Pavel
>
> On 21.7.2013 4:44, Jonathan Giles wrote:
>> Hi all,
>>
>> For once this is a request for more information from another JavaFX
>> team, rather than a review request, etc! :-)
>>
>> I'm keen to see support in JavaFX Stage / Window classes for an API
>> that would allow for the minimize / maximize / full screen / etc
>> buttons to be disabled. I'm aware of the StageStyle.UTLITY option
>> (which does disable the minimize button), but sometimes you don't want
>> a utility stage style, but you do want to prevent minimizing a stage.
>> My particular use case is dialogs - you can see a discussion of the
>> issue at [1].
>>
>> For example, I note that Stage has an iconfied property to represent
>> whether the stage is minimized, but no property to specify whether the
>> stage should be allowed to be iconified (setIconifiable(boolean),
>> boolean isIconifiable(), for example). Is there a reason for this or
>> just that this API hasn't been required yet?
>>
>> In short, I would love API to allow me to specify whether a stage can
>> be minimised, maximised and made full screen, and for this to follow
>> through to the buttons available in the native titlebar area of the
>> stage. Does such an API exist, is there a valid reason why it doesn't,
>> or should I file a jira to request such API?
>>
>> [1]
>> https://bitbucket.org/controlsfx/controlsfx/issue/49/dialogs-should-use-native-title-bars
>>
>>
>> Thanks!
>> -- Jonathan
>


More information about the openjfx-dev mailing list