[API Review]: RT-28289 Unable to determine the selected ExtensionFilter when a FileChooser closes

Richard Bair richard.bair at oracle.com
Wed Apr 3 07:52:12 PDT 2013


>>      This property is used to pre-select extension filter for the next
>>      displayed dialog and to get selected extension filter from dismissed file
>>      dialog.
>> 
>>      When file dialog is invoked the extension filter stored in this property
>>      will be activated. If value of property is null or not presented in
>>      extensionFilters list the first extension filter will be selected.
>> 
>>      After file dialog is dismissed the value of property is updated to
>>      selected extension filter or to null if the dialog has been canceled.

Some suggested changes to the text:

This property is used to pre-select the extension filter for the next displayed
dialog and to read the user-selected extension filter from the dismissed dialog.

When the file dialog is shown, the selectedExtensionFilter will be checked.
If the value of selectedExtensionFilter is null or is not contained in the list
of selection filters, then the first extension filter in the list of extension filters
will be selected instead. Otherwise, the specified selectedExtensionFilter will
be activated.

After the dialog is dismissed the value of this property is updated to match the
user-selected extension filter from the dialog.

>>    public final ObjectProperty<ExtensionFilter> selectedExtensionFilterProperty()
>> 
>>    public final void setSelectedExtensionFilter(ExtensionFilter extensionFilter)
>> 
>>    public final ExtensionFilter getSelectedExtensionFilter()

Also this seems wrong:

>>      After file dialog is dismissed the value of property is updated to
>>      selected extension filter or to null if the dialog has been canceled.

I don't think we should be clearing the selectedExtensionFilter if the dialog has been cancelled.

Thanks!
Richard


More information about the openjfx-dev mailing list