API REVIEW request for RT17668 Disable/enable tabs in a TabPane

Richard Bair richard.bair at oracle.com
Wed Apr 25 15:18:46 PDT 2012

+1 I agree I think that you should programatically be able to select it, although the user won't be able to interact with the tab itself (either to close it or select it). We could have a selectable boolean separately if that is important. I agree setDisable() for the API, however from CSS the pseudoclass needs to be "disabled" just like on nodes. Might be worth adding a public read disabled() property just like node as well, and it will be true if the tab is disable or the TabPane is disabled.


On Apr 23, 2012, at 1:09 PM, Jonathan Giles wrote:

> Tom,
> Here are my gut feeling answers on your questions, although Kinsley is the owner of TabPane. I'll have to defer to him in case I am wrong.
> The Tab is not selectable by the user, but it is selectable programmatically.
> If you are on the selected Tab when it becomes disabled, you should remain on this Tab.
> I think disable is a fair term here, and is analogous to other disabled UI controls in the user interface: they are just no longer interactive or traversable, but they still exist in the user interface, and the programmer can still force them to fire their actions. This will apply to the disabled Tab in the same way.
> -- Jonathan
> On 13/04/2012 7:09 p.m., Tom Schindl wrote:
>> Is the tab still selectable? If no, what will happen if the tab you are
>> just disabling is the active one? Will the focus be shifted to the
>> next/previous one? What if it is the only tab?
>> If yes. Is disable really the right property name? Disabled means it can
>> not be selected anymore (doesn't receive focus, not part of tab
>> navigation, ...)
>> Tom
>> Am 12.04.12 23:39, schrieb Kinsley Wong:
>>> JIRA: http://javafx-jira.kenai.com/browse/RT-17668
>>> This tweak will add the following api to Tab
>>>     public final void setDisable(boolean value);
>>>     public final boolean isDisable();
>>>     /**
>>>      * Sets the disabled state of this tab. Setting
>>>      * disable to true will cause this tab and the tab content to
>>>      * become disabled.
>>>      *
>>>      * @defaultValue false
>>>      */
>>>     public final BooleanProperty disableProperty();

More information about the openjfx-dev mailing list