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