ProgressObserverpublic class CopyFileWorker extends Task
| Modifier and Type | Class | Description |
|---|---|---|
static class |
CopyFileWorker.Behavior |
The behavior if the target already exists
|
| Constructor | Description |
|---|---|
CopyFileWorker(java.awt.Component comp,
java.lang.String source,
java.lang.String target) |
Copy a file.
|
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.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
_run() |
This is the method you have to implement and that will be executed
in the thread.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcancel, 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