public class CopyFileWorker extends Task
| Modifier and Type | Class and Description |
|---|---|
static class |
CopyFileWorker.Behavior
The behavior if the target already exists
|
| Constructor and Description |
|---|
CopyFileWorker(java.awt.Component comp,
java.util.List<java.lang.String> sources,
java.lang.String target)
Copy all files from the list to the target directory.
|
CopyFileWorker(java.awt.Component comp,
java.util.List<java.lang.String> sources,
java.lang.String target,
CopyFileWorker.Behavior behavior)
Copy all files from the list to the target directory.
|
CopyFileWorker(java.awt.Component comp,
java.lang.String source,
java.lang.String target)
Copy a file.
|
| Modifier and Type | Method and Description |
|---|---|
void |
_run()
This is the method you have to implement and that will be executed
in the thread.
|
java.lang.String |
toString() |
cancel, getLabel, getMaximum, getState, getStatus, getValue, isCancellable, run, setCancellable, setLabel, setMaximum, setStatus, setValuepublic CopyFileWorker(java.awt.Component comp,
java.lang.String source,
java.lang.String target)
comp - the component that will be used as parent in case of errorsource - the source pathtarget - the target path (it is the file path, not a parent directory)public CopyFileWorker(java.awt.Component comp,
java.util.List<java.lang.String> sources,
java.lang.String target)
comp - the component that will be used as parent in case of errorsources - the sources path to copytarget - the target path (it must be a directory otherwise nothing will be copied)public CopyFileWorker(java.awt.Component comp,
java.util.List<java.lang.String> sources,
java.lang.String target,
CopyFileWorker.Behavior behavior)
Behavior will decide what
to do.comp - the component that will be used as parent in case of errorsources - the sources path to copytarget - the target path (it must be a directory otherwise nothing will be copied)behavior - the behavior if the target file already exists