Package com.io7m.jwheatsheaf.ui.internal
Class JWFileChooserViewController
java.lang.Object
com.io7m.jwheatsheaf.ui.internal.JWFileChooserViewController
public final class JWFileChooserViewController
extends java.lang.Object
The file chooser view controller.
The
setConfiguration
method must be called after creation.-
Constructor Summary
Constructors Constructor Description JWFileChooserViewController()
Construct a view controller. -
Method Summary
Modifier and Type Method Description void
cancel()
Cancel and hide the file selection.java.util.List<java.nio.file.Path>
result()
void
setConfiguration(JWFileChoosers inChoosers, java.util.concurrent.ExecutorService inIoExecutor, JWFileChoosersTesting inTesting, JWStrings inStrings, JWFileImageSetType inDefaultImageSet, JWFileChooserConfiguration inConfiguration)
Set the file chooser provider and configuration.void
setEventReceiver(java.util.function.Consumer<JWFileChooserEventType> newEventReceiver)
Set a function that will receive events from the chooser.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
JWFileChooserViewController
public JWFileChooserViewController()Construct a view controller.
-
-
Method Details
-
setEventReceiver
Set a function that will receive events from the chooser.- Parameters:
newEventReceiver
- The event receiver
-
setConfiguration
public void setConfiguration(JWFileChoosers inChoosers, java.util.concurrent.ExecutorService inIoExecutor, JWFileChoosersTesting inTesting, JWStrings inStrings, JWFileImageSetType inDefaultImageSet, JWFileChooserConfiguration inConfiguration)Set the file chooser provider and configuration.- Parameters:
inChoosers
- The providerinIoExecutor
- An executor for background I/O operationsinTesting
- An internal testing interfaceinStrings
- UI stringsinDefaultImageSet
- The default image setinConfiguration
- The configuration
-
result
public java.util.List<java.nio.file.Path> result()- Returns:
- The list of selected files, if any
-
cancel
public void cancel()Cancel and hide the file selection.
-