public final class FcmdCopyCmprDel extends FcmdFileActionBase
Modifier and Type | Class and Description |
---|---|
private class |
FcmdCopyCmprDel.Actions
Will be initialized if the main.gralMng is available.
|
(package private) static class |
FcmdCopyCmprDel.Ecmd |
(package private) static class |
FcmdCopyCmprDel.Estate |
Modifier and Type | Field and Description |
---|---|
(package private) FcmdCopyCmprDel.Actions |
action |
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.
|
protected GralUserAction |
actionChgModeDst |
(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 |
(package private) GralUserAction |
actionShowState
Shows the state of FileRemote, especially for debug and problems.
|
(package private) boolean |
bDstChanged
If true then the
widgInputDst 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) java.lang.StringBuilder |
bufferDstChars |
(package private) FileRemoteCallback |
callbackFromFilesCheck |
(package private) FileRemoteCallback |
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) FileRemote.CallbackEvent |
evCallback
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) EventConsumer |
evConsumerCallbackFromFileMachine
Instance of an event consumer which is used for all callback actions from the FileRemote machine.
|
(package private) FileRemote.CallbackEvent |
evCurrentFile
This reference is set with the callback of operation cmd.
|
(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 |
(package private) java.util.List<FileRemote.CallbackEvent> |
listEvCheck
This list is filled with some callback Events for files which are checked before copying.
|
(package private) java.util.List<FileRemote.CallbackEvent> |
listEvCopy |
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 |
(package private) GralPos |
posWindConfirmCopy |
(package private) java.lang.CharSequence |
sFileDstCopy
Name of the file for dst.
|
(package private) java.lang.String |
sFilesSrc
If more as one files are selected to copy, the names are contained here separated with ' : '.
|
(package private) FileRemote |
srcDir
The source file to copy.
|
(package private) FileRemote |
srcFile
The source file to copy.
|
(package private) boolean |
srcSomeFiles |
protected FcmdCopyCmprDel.Estate |
state
State of the handling.
|
(package private) java.lang.String |
sTextExecuteForFile |
static int |
version
Version and History
2015-01-03 Hartmut refactory
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 |
widgBtnPause |
(package private) GralButton |
widgButtonCheck |
(package private) GralButton |
widgButtonClearSel |
(package private) GralButton |
widgButtonEsc |
(package private) GralButton |
widgButtonModeDst |
(package private) GralButton |
widgButtonMove |
(package private) GralButton |
widgButtonOk |
(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 |
widgFromConditions |
(package private) GralTextField |
widgInputDst |
(package private) GralButton |
widgOverwrFile |
(package private) GralValueBar |
widgProgressAll |
(package private) GralValueBar |
widgProgressFile |
(package private) GralTextField |
widgShowSrc |
(package private) GralButton |
widgSkipDir |
(package private) GralButton |
widgSkipFile |
(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() |
(package private) void |
buildWindowConfirmCopy(java.lang.String sTitle)
Builds the content of the confirm-copy window.
|
protected void |
closeWindow() |
private void |
eventConsumed(java.util.EventObject evp,
boolean ok) |
protected void |
execCompare()
Starts the execution of compare in another thread.
|
protected void |
execCopy()
Starts the execution of copy in another thread.
|
protected void |
execDel() |
(package private) void |
execMark()
Starts the execution of mark in another thread.
|
protected void |
execMove() |
private int |
modeCopy()
All mode bits of the 3 variables.
|
(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 |
setTextSrcDst()
Sets the source and destination depending on the cmd and given
srcFile , dirDst
The widgInputDst will be not changed if bDstChanged is set. |
(package private) void |
showCurrentProcessedFileAndDir(FileRemoteProgressTimeOrder order)
Invoked with a time order.
|
(package private) void |
showFinishState(java.lang.CharSequence start,
SortedTreeWalkerCallback.Counters cnt) |
(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
GralWindow windConfirmCopy
GralPos posWindConfirmCopy
GralTextField widgShowSrc
GralTextField widgFromConditions
GralButton widgButtonModeDst
GralTextField widgInputDst
GralTextField widgCopyState
GralTextField widgCopyDirDst
GralTextField widgCopyNameDst
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 widgButtonOk
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
actionConfirmCopy()
. Either dirSrc == fileSrc
and the sFilesSrc
contains some file names, or dirSrc is the directory of fileSrc, fileSrc is the only one
file to copy (maybe a directory) and sFilesSrc is empty.FileRemote srcFile
actionConfirmCopy()
. Either dirSrc == fileSrc
and the sFilesSrc
contains some file names, or dirSrc is the directory of fileSrc, fileSrc is the only one
file to copy (maybe a directory) and sFilesSrc is empty.boolean srcSomeFiles
java.lang.String sFilesSrc
FileRemote fileDst
FileRemote dirDst
java.lang.CharSequence sFileDstCopy
java.lang.StringBuilder bufferDstChars
StringFormatter formatShow
boolean bDstChanged
widgInputDst
was changed for this session. Not automatically change the content.boolean bFirstSelect
long zBytes
int zFiles
FileRemote fileProcessed
FileRemote dirProcessed
final java.util.List<FileRemote.CallbackEvent> listEvCheck
int nrofFilesCheck
protected FcmdCopyCmprDel.Estate state
protected FcmdCopyCmprDel.Ecmd cmd
protected boolean bFineSelect
final java.util.List<FileRemote.CallbackEvent> listEvCopy
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".FileRemote.CallbackEvent evCurrentFile
FcmdCopyCmprDel.Actions action
GralUserAction actionShowState
GralUserAction actionConfirmCopy
GralUserAction actionCheck
#actionButtonCopy
is called,
with the "check" case.protected GralUserAction actionSetDst
protected GralUserAction actionChgModeDst
protected GralUserAction actionEnterTextInDst
GralUserAction actionOverwrReadonly
GralUserAction actionOverwrDate
GralUserAction actionCreateCopy
GralUserAction actionButtonCmprDelMove
#actionButtonCopy
is called,
with the "check" case.protected GralUserAction actionButtonOk
FileRemoteAccessorLocalFile
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
EventConsumer evConsumerCallbackFromFileMachine
FileRemote.CallbackCmd#nrofFilesAndBytes
: shows the progress of the action.
FileRemote.CallbackEvent evCallback
EventCmdPingPongType#occupyRecall(int, EventSource, EventConsumer, org.vishia.event.EventThread, boolean)
FileRemoteCallback callbackFromFilesCheck
FileRemoteCallback callbackFromFilesExec
FcmdCopyCmprDel(Fcmd main, FcmdCopyCmprDel.Ecmd cmdArg)
void buildWindowConfirmCopy(java.lang.String sTitle)
protected void closeWindow()
private int modeCopy()
final void execMark()
FileRemote#refreshAndMark(int, boolean, String, int, int, FileRemoteCallback)
.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)
.protected final void execCompare()
FileRemote#refreshAndCompare(FileRemote, int, String, int, org.vishia.fileRemote.FileRemote.CallbackEvent)
.protected final void abortCopy()
final void setTextSrcDst()
srcFile
, dirDst
The widgInputDst
will be not changed if bDstChanged
is set.void setTexts(FcmdCopyCmprDel.Estate newState)
newState
- void showCurrentProcessedFileAndDir(FileRemoteProgressTimeOrder order)
void showFinishState(java.lang.CharSequence start, SortedTreeWalkerCallback.Counters cnt)
void actionConfirmCopy()
private void eventConsumed(java.util.EventObject evp, boolean ok)
void stop()