|
|
|
@ -197,7 +197,9 @@ public class JavaFxNativeFileChooser implements FileChooserProvider {
|
|
|
|
|
private File currentDirectory; |
|
|
|
|
|
|
|
|
|
public Builder fileSelectionMode(FileSelectionMode fileSelectionMode) { |
|
|
|
|
this.fileSelectionMode = fileSelectionMode; |
|
|
|
|
if (fileSelectionMode != null) { |
|
|
|
|
this.fileSelectionMode = fileSelectionMode; |
|
|
|
|
} |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -209,13 +211,17 @@ public class JavaFxNativeFileChooser implements FileChooserProvider {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public Builder filters(FileChooser.ExtensionFilter[] filters) { |
|
|
|
|
this.filters = filters; |
|
|
|
|
if (filters != null) { |
|
|
|
|
this.filters = filters; |
|
|
|
|
} |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public Builder filters(ExtensionFilter[] filters) { |
|
|
|
|
for (ExtensionFilter filter : filters) { |
|
|
|
|
this.filters = ArrayUtils.add(this.filters, new FileChooser.ExtensionFilter(filter.getDes(), filter.getExtensions())); |
|
|
|
|
if (filters != null) { |
|
|
|
|
for (ExtensionFilter filter : filters) { |
|
|
|
|
this.filters = ArrayUtils.add(this.filters, new FileChooser.ExtensionFilter(filter.getDes(), filter.getExtensions())); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|