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

Jonathan Giles jonathan.giles at oracle.com
Mon Apr 23 12:49:03 PDT 2012


On behalf of Kinsley, I would like to see an official +1 on this 
request. Otherwise, we will assume approval was received by default in 
24 hours.

-- Jonathan


On 14/04/2012 9:31 a.m., Kinsley Wong wrote:
> Currently it is implemented exactly as Jonathan describes.  The user 
> cannot interact with a disabled tab.  A disabled styled tab is still 
> selectable programatically.  Also the tab content is not disabled when 
> the tab is disabled.
>
> Kinsley
>
> On 4/13/2012 1:47 AM, Jonathan Giles wrote:
>> +1...mostly.
>>
>> Without having spoken to Kinsley  (I walked in the door 10 minutes 
>> ago from JavaOne Japan / vacation), my gut feeling is that 'disable' 
>> should make the tab unable to be interacted with by the user, but it 
>> should still be selectable programatically (with the tab having the 
>> required disable look). I don't think the Tab content should be 
>> disabled when the Tab is however.
>>
>> I don't think it is necessary to include the selectable property, but 
>> I might be missing something.
>>
>> -- Jonathan
>>
>>
>> On 13/04/2012 4:57 p.m., Tom Eugelink wrote:
>>>
>>> One non-mainstream scenario could be considered: the situation where 
>>> a tab is not selectable by the user anymore, only programmatically, 
>>> but the contents are still enabled (e.g. a wizard with enforced steps).
>>>
>>> This could be achieved by making the calls below only influence the 
>>> tab itself, not the content, but that would make the programmer 
>>> responsible for disabling the content. This is not the main usage 
>>> (although, if a tab is disabled, how likely is it the content is 
>>> being shown).
>>>
>>> A better solution would be to also introduce "setSelectable" and 
>>> "isSelectable", which is a part of what is needed to implement 
>>> "disabled".
>>>
>>> Tom
>>>
>>>
>>>
>>>
>>> On 2012-04-12 23:39, Kinsley Wong wrote:
>>>> 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