public final class FcmdCopyCmprDel extends FcmdFileActionBase
Modifier and Type | Class and Description |
---|---|
(package private) static class |
FcmdCopyCmprDel.Ecmd |
(package private) static class |
FcmdCopyCmprDel.Estate |
(package private) class |
FcmdCopyCmprDel.ProgressAction
Will be initialized if the main.gralMng is available.
|
(package private) class |
FcmdCopyCmprDel.TestProgressThread |
Modifier and Type | Field and Description |
---|---|
protected GralUserAction |
actionButtonAbort |
(package private) GralUserAction |
actionButtonCmprDelMove
Opens the confirm-copy window, prepares the list of src files.
|
protected GralUserAction |
actionButtonOk
Action for any button of the confirm-copy window.
|
protected GralUserAction |
actionButtonSkipDir
This action is used to skip over the current showed file while copying.
|
protected GralUserAction |
actionButtonSkipFile
This action is used to skip over the current showed file while copying.
|
(package private) GralUserAction |
actionCheck
Opens the confirm-copy window, prepares the list of src files.
|
(package private) GralUserAction |
actionConfirmCopy
Opens the confirm-copy window, prepares the list of src files.
|
(package private) GralUserAction |
actionCreateCopy |
protected GralUserAction |
actionEnterTextInDst |
(package private) GralUserAction |
actionOverwrDate |
protected GralUserAction |
actionOverwriteFile
This action is used to skip over the current showed file while copying.
|
(package private) GralUserAction |
actionOverwrReadonly |
protected GralUserAction |
actionSelectMask |
protected GralUserAction |
actionSetDst |
protected GralUserAction |
actionSetSrc |
(package private) GralUserAction |
actionShowState
Shows the state of FileRemote, especially for debug and problems.
|
(package private) boolean |
bDstChanged
If true then the
widgDstDir was changed for this session. |
protected boolean |
bFineSelect
If true then not all files are selected below the shown source directory.
|
(package private) boolean |
bFirstSelect |
(package private) boolean |
bRunTestProgressThread |
(package private) java.lang.StringBuilder |
bufferDstChars
Name of the file for dst.
|
(package private) FileRemoteWalkerCallback |
callbackFromFilesCheck
This event instance with back event and a possible command event as opponent is generally used for invoke and callback to routines
for file handling.
|
(package private) FileRemoteWalkerCallback |
callbackFromFilesExec |
protected FcmdCopyCmprDel.Ecmd |
cmd
Selected handling command.
|
(package private) GralColor |
colorChangedText |
(package private) GralColor |
colorGrayed |
(package private) GralColor |
colorNoChangedText |
(package private) FileRemote |
dirDst
The destination selected directory and file as destination for compare and move or second tree for comparison.
|
(package private) FileRemote |
dirProcessed |
(package private) EventSource |
evSrc
Last files which are in copy process.
|
(package private) FcmdFileCard |
fileCardDst
The file card where the directory content is shown where the files will be copied to, the destination.
|
(package private) FcmdFileCard |
fileCardSrc
The file card where the directory content is shown where the files will be copied to, the destination.
|
(package private) FileRemote |
fileDst
The destination selected directory and file as destination for compare and move or second tree for comparison.
|
(package private) FileRemote |
fileProcessed |
(package private) java.util.List<FileRemote> |
filesToCopy
Current files which are in copy process.
|
(package private) StringFormatter |
formatShow |
protected Fcmd |
main |
(package private) int |
modeCreateCopy
Mode create new file while copying.
|
(package private) int |
modeOverwrDate
Mode overwrite with timestamp.
|
(package private) int |
modeOverwrReadonly
Mode overwrite readonly. '?'
|
(package private) int |
nrofFilesCheck
This list is filled with some callback Events for files which are checked before copying.
|
(package private) GralPos |
posWindConfirmCopy |
(package private) FcmdCopyCmprDel.ProgressAction |
progress
This reference is set with the callback of operation cmd.
|
(package private) java.lang.String |
sFileMaskDst |
(package private) FileRemote |
srcDir
The source dir and file to use.
|
(package private) FileRemote |
srcFile
The source dir and file to use.
|
protected FcmdCopyCmprDel.Estate |
state
State of the handling.
|
(package private) java.lang.String |
sTextExecuteForFile |
(package private) FcmdCopyCmprDel.TestProgressThread |
testProgressThread |
static int |
version
Version and History
2023-04-06 Hartmut restructured also in widgets as in functionality, in progress, for version 2.0 of The.file.Commander
2013-02-03 Hartmut chg: set the destination only if it is not set on button setSrc
2013-02-03 Hartmut chg:
execMove() with files
2013-02-03 Hartmut new: Copy exception (on file open to write) cases a message, the key widgOverwrFile
works together with the Ask state. |
(package private) GralButton |
widgBtnExec |
(package private) GralButton |
widgBtnPause |
(package private) GralButton |
widgButtonCheck |
(package private) GralButton |
widgButtonClearSel |
(package private) GralButton |
widgButtonEsc |
(package private) GralButton |
widgButtonMove |
(package private) GralButton |
widgButtonSetDst |
(package private) GralButton |
widgButtonSetSrc |
(package private) GralButton |
widgButtonShowDst |
(package private) GralButton |
widgButtonShowResult |
(package private) GralButton |
widgButtonShowSrc |
(package private) GralTextField |
widgCopyDirDst |
(package private) GralTextField |
widgCopyNameDst |
(package private) GralTextField |
widgCopyState |
(package private) GralButton |
widgdChoiceCreateNew |
(package private) GralButton |
widgdChoiceOverwrExists |
(package private) GralButton |
widgdChoiceOverwrReadOnly |
(package private) GralTextField |
widgDstDir |
(package private) GralTextField |
widgDstFileModification |
(package private) GralButton |
widgOverwrFile |
(package private) GralValueBar |
widgProgressAll |
(package private) GralValueBar |
widgProgressFile |
(package private) GralButton |
widgSkipDir |
(package private) GralButton |
widgSkipFile |
(package private) GralTextField |
widgSrcDir |
(package private) GralTextField |
widgSrcSelection |
(package private) GralButton |
widgState |
(package private) GralWindow |
windConfirmCopy |
(package private) long |
zBytes
Content from the input fields while copy is pending.
|
(package private) int |
zFiles |
cmdWind, helpPrefix
Constructor and Description |
---|
FcmdCopyCmprDel(Fcmd main,
FcmdCopyCmprDel.Ecmd cmdArg) |
Modifier and Type | Method and Description |
---|---|
protected void |
abortCopy() |
(package private) void |
actionConfirmCopy() |
protected void |
activateWindow()
Last files which are in copy process.
|
protected void |
closeWindow() |
private void |
eventConsumed(java.util.EventObject evp,
boolean ok) |
protected void |
exec()
Operation associated to the Ok or Exec key:
widgBtnExec associated to its actionButtonOk . |
(package private) void |
execCheck()
Starts the execution of mark in another thread.
|
protected void |
execCompare()
Starts the execution of compare in another thread.
|
protected void |
execCopy()
Starts the execution of copy in another thread.
|
private void |
execCopy(FileRemote filedir)
|
protected void |
execDel() |
protected void |
execMove() |
protected void |
execSearch()
Starts the execution of compare in another thread.
|
protected void |
getDstFileDir(FcmdFileCard fromCard,
boolean bSetFile) |
protected FileRemote[] |
getSrcDstFileDir(boolean bAlsoDst,
GralWidget widgShowSrcArg,
GralWidget widgShowMask)
Gets the situation of selection in the file panels for source and destination.
|
protected int |
modeCopy()
All mode bits of the 3 variables.
|
protected boolean |
occupyProgress() |
private void |
setDirFileDst() |
(package private) void |
setTexts(FcmdCopyCmprDel.Estate newState)
Set the texts to any widgets depending on the state of execution and the activated switch key.
|
(package private) void |
showCurrentProcessedFileAndDir(FileRemoteProgressEvData order)
Invoked with a time order.
|
(package private) void |
showFinishState(java.lang.CharSequence start) |
(package private) void |
startStopTestProgressThread() |
(package private) void |
stop() |
public static final int version
execMove()
with files
widgOverwrFile
works together with the Ask state.
filesToCopy
will be filled after callback of check. The files which are used
are read only from the input fields of the GUI. The user can change it.
java.lang.String sTextExecuteForFile
protected final Fcmd main
GralWindow windConfirmCopy
GralPos posWindConfirmCopy
GralTextField widgSrcDir
GralTextField widgSrcSelection
GralTextField widgDstDir
GralTextField widgDstFileModification
GralTextField widgCopyDirDst
GralTextField widgCopyNameDst
GralTextField widgCopyState
GralButton widgdChoiceCreateNew
GralButton widgdChoiceOverwrExists
GralButton widgdChoiceOverwrReadOnly
GralButton widgOverwrFile
GralButton widgSkipFile
GralButton widgSkipDir
GralButton widgBtnPause
GralButton widgState
GralButton widgButtonSetSrc
GralButton widgButtonSetDst
GralButton widgButtonCheck
GralButton widgButtonMove
GralButton widgBtnExec
GralButton widgButtonClearSel
GralButton widgButtonShowSrc
GralButton widgButtonShowDst
GralButton widgButtonShowResult
GralValueBar widgProgressFile
GralValueBar widgProgressAll
GralButton widgButtonEsc
GralColor colorNoChangedText
GralColor colorChangedText
GralColor colorGrayed
int modeOverwrReadonly
int modeOverwrDate
int modeCreateCopy
FcmdFileCard fileCardSrc
FcmdFileCard fileCardDst
FileRemote srcDir
activateWindow()
due to the situation of selected files in the first file table of the Fcmd:
see getSrcDstFileDir(boolean, GralWidget, GralWidget)
.FileRemote srcFile
activateWindow()
due to the situation of selected files in the first file table of the Fcmd:
see getSrcDstFileDir(boolean, GralWidget, GralWidget)
.FileRemote fileDst
FileRemote dirDst
java.lang.String sFileMaskDst
java.lang.StringBuilder bufferDstChars
StringFormatter formatShow
boolean bDstChanged
widgDstDir
was changed for this session. Not automatically change the content.boolean bFirstSelect
long zBytes
int zFiles
FileRemote fileProcessed
FileRemote dirProcessed
int nrofFilesCheck
protected FcmdCopyCmprDel.Estate state
protected FcmdCopyCmprDel.Ecmd cmd
protected boolean bFineSelect
final java.util.List<FileRemote> filesToCopy
actionConfirmCopy
.
If the copy process is finished, this list will be empty.EventSource evSrc
#actionButtonCopy
if the copy process will be started.
It is used in #actionLastSrc
to fill the filesToCopy
.
This list remains after copy process to supply "last files".final FcmdCopyCmprDel.ProgressAction progress
boolean bRunTestProgressThread
FcmdCopyCmprDel.TestProgressThread testProgressThread
GralUserAction actionShowState
GralUserAction actionConfirmCopy
GralUserAction actionCheck
#actionButtonCopy
is called,
with the "check" case.protected GralUserAction actionSetSrc
protected GralUserAction actionSetDst
protected GralUserAction actionEnterTextInDst
GralUserAction actionOverwrReadonly
GralUserAction actionOverwrDate
GralUserAction actionCreateCopy
GralUserAction actionButtonCmprDelMove
#actionButtonCopy
is called,
with the "check" case.protected GralUserAction actionButtonOk
org.vishia.fileLocalAccessor.FileRemoteAccessorLocalFile#addCommission(org.vishia.util.FileRemoteAccessor.Commission)
for local files. The copy process can be executed in an remote device without copying of data
between this device (PC) and the remote device, if the commission is organized in the remote device itself.
#success
EventConsumer
in this class. The event instance is given to the
FileRemote#copyTo(FileRemote, EventCmdPingPongType)
invocation. It is used to callback either from the thread
which copies local or from the thread which receives the copy response telegrams for remote communication.
#listEvCopy
. If the callback occurs, the event
will be removed from the list. The list is only used to check whether the copy action is succeeded
respectively to check whether all copy actions are succeeded. If a copy success callback is not received,
for example because a remote device hangs or the communication fails, the copy process hasn't no
progression. The operator on this machine sees this situation because the progression bar stands.
The operator can abort the copy process to preset to a default empty state.protected GralUserAction actionButtonAbort
protected GralUserAction actionOverwriteFile
protected GralUserAction actionButtonSkipFile
protected GralUserAction actionButtonSkipDir
protected GralUserAction actionSelectMask
FileRemoteWalkerCallback callbackFromFilesCheck
EventCmdPingPongType#occupyRecall(int, EventSource, EventConsumer, org.vishia.event.EventThread, boolean)
FileRemoteWalkerCallback callbackFromFilesExec
FcmdCopyCmprDel(Fcmd main, FcmdCopyCmprDel.Ecmd cmdArg)
protected void activateWindow()
#actionButtonCopy
if the copy process will be started.
It is used in #actionLastSrc
to fill the filesToCopy
.
This list remains after copy process to supply "last files".protected void closeWindow()
protected FileRemote[] getSrcDstFileDir(boolean bAlsoDst, GralWidget widgShowSrcArg, GralWidget widgShowMask)
srcDir
is set with the tables dir, srcFile
= null, showMask = "** /*"
srcDir
is set with the tables dir, srcFile
= null, showMask = "?!"
It means the marked files should be taken.
srcDir
is set with the tables dir, srcFile
is set with the dir,
and showMask is set with "dirname/** /*". Do not use srcFile
, use the mask to walk.
srcFile
is set with it, srcDir
= null, the mask is set with the file name (but not changeable)
srcDir
is set with the tables dir, srcFile
= null
The mask is set with "?!", it means do somewhat with the marked files.
srcDir
is set only.bAlsoDst
- false then handle only the current panel.protected void getDstFileDir(FcmdFileCard fromCard, boolean bSetFile)
fromCard
- Either the fileCard[0] on command "set dst" or fileCard[1] on command activate.bSetFile
- true then set the selected file as current, it is for "set dst"protected int modeCopy()
protected boolean occupyProgress()
protected void exec()
widgBtnExec
associated to its actionButtonOk
.
It executes the operation set by construction (via cmd
and depending from state
.
It calls execCheck()
if the state is FcmdCopyCmprDel.Estate.start
or FcmdCopyCmprDel.Estate.check
.
It closes the window on state FcmdCopyCmprDel.Estate.finit
.final void execCheck()
FileRemote#refreshAndMark(int, boolean, String, int, int, FileRemoteWalkerCallback)
.protected final void execDel()
protected final void execMove()
protected final void execCopy()
FileRemote#children()
tree.
See FileRemote#copyChecked(String, String, int, org.vishia.fileRemote.FileRemote.CallbackEvent)
.private final void execCopy(FileRemote filedir)
FileRemote#copyDirTreeTo(FileRemote, int, String, int, FileRemoteProgressEvData)
or FileRemote#copyTo(FileRemote, org.vishia.fileRemote.FileRemote.CallbackEvent)
with the given filedir for the dirDst
or fileDst
.filedir
- protected final void execSearch()
FileRemote#refreshAndCompare(FileRemote, int, String, int, org.vishia.fileRemote.FileRemote.CallbackEvent)
.protected final void execCompare()
FileRemote#refreshAndCompare(FileRemote, int, String, int, org.vishia.fileRemote.FileRemote.CallbackEvent)
.private void setDirFileDst()
protected final void abortCopy()
void setTexts(FcmdCopyCmprDel.Estate newState)
newState
- void showCurrentProcessedFileAndDir(FileRemoteProgressEvData order)
void showFinishState(java.lang.CharSequence start)
void actionConfirmCopy()
void startStopTestProgressThread()
private void eventConsumed(java.util.EventObject evp, boolean ok)
void stop()