|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.mucommander.job.FileJob
com.mucommander.job.DeleteJob
public class DeleteJob
This class is responsible for deleting a set of files. This job can operate in two modes, depending on the boolean value specified in the construtor:
DesktopManager.getTrash().
| Field Summary |
|---|
| Fields inherited from class com.mucommander.job.FileJob |
|---|
APPEND_ACTION, APPEND_TEXT, baseSourceFolder, CANCEL_ACTION, CANCEL_TEXT, currentFile, currentFileIndex, currentFilename, files, FINISHED, INTERRUPTED, mainFrame, nbFiles, NOT_STARTED, PAUSED, progressDialog, RETRY_ACTION, RETRY_TEXT, RUNNING, SKIP_ACTION, SKIP_TEXT |
| Constructor Summary | |
|---|---|
DeleteJob(ProgressDialog progressDialog,
MainFrame mainFrame,
FileSet files,
boolean moveToTrash)
Creates a new DeleteJob without starting it. |
|
| Method Summary | |
|---|---|
java.lang.String |
getStatusString()
Returns a String describing what the job is currently doing. |
protected boolean |
hasFolderChanged(AbstractFile folder)
Returns true if the given folder has or may have been modified by this job. |
protected void |
jobCompleted()
This method is called when this job has completed normal execution : all files have been processed without any interruption (without any call to FileJob.interrupt()). |
protected void |
jobStopped()
This method is called when this job has been stopped. |
protected boolean |
processFile(AbstractFile file,
java.lang.Object recurseParams)
Deletes recursively the given file or folder. |
| Methods inherited from class com.mucommander.job.FileJob |
|---|
addFileJobListener, getCurrentFileIndex, getCurrentFilename, getEffectiveJobTime, getEndDate, getNbFiles, getPausedTime, getPauseStartDate, getStartDate, getState, getTotalPercentDone, interrupt, jobPaused, jobResumed, jobStarted, nextFile, refreshTables, removeFileJobListener, run, selectFileWhenFinished, setAutoUnmark, setPaused, setState, showErrorDialog, showErrorDialog, start, waitForUserResponse |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DeleteJob(ProgressDialog progressDialog,
MainFrame mainFrame,
FileSet files,
boolean moveToTrash)
progressDialog - dialog which shows this job's progressmainFrame - mainFrame this job has been triggered byfiles - files which are going to be deletedmoveToTrash - if true, files will be moved to the trash, if false they will be permanently deleted.
Should be true only if a trash is available on the current platform.| Method Detail |
|---|
protected boolean processFile(AbstractFile file,
java.lang.Object recurseParams)
processFile in class FileJobfile - the file or folder to deleterecurseParams - not used
true if the file has been completely deleted.protected boolean hasFolderChanged(AbstractFile folder)
FileJobtrue if the given folder has or may have been modified by this job.
This method is called after this job has finished processing files, to determine if the current MainFrame's
file tables need to be refreshed to reveal the modified contents.
hasFolderChanged in class FileJobfolder - the folder to test
protected void jobStopped()
FileJobFileJob.processFile(AbstractFile,Object) and
FileJob.jobCompleted().
This method implementation does nothing but it can be overriden by subclasses to properly terminate the job.
This is where you want to close any opened connections.
Note that unlike FileJob.jobCompleted() this method is always called, whether the job has been completed (all
files were processed) or has been interrupted in the middle.
jobStopped in class FileJobprotected void jobCompleted()
FileJobFileJob.interrupt()).
The call happens after the last call to FileJob.processFile(AbstractFile,Object) is made.
This method implementation does nothing but it can be overriden by subclasses to properly complete the job.
Note that this method will NOT be called if a call to FileJob.interrupt() was made before all files were processed.
jobCompleted in class FileJobpublic java.lang.String getStatusString()
FileJob
getStatusString in class FileJob
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard