|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.pandoragames.far.ui.UIBean
public class UIBean
GUI neutral bridge between backend and frontend. Since searches can take quite a lot
of time, the findFiles(), rename() and replace()
methods execute the respective commands in a Thread on their own.
| Constructor Summary | |
|---|---|
UIBean(MessageBox sink,
Localizer localizer)
Constructor requires a sink for (error) messages |
|
| Method Summary | |
|---|---|
void |
abort()
Aborts a currently running operation (find, replace, ...). |
void |
addProgressListener(ProgressListener prol)
Adds a ProgressListener that will reveive notifications about find and replace operations (but not about renaming operations). |
java.util.List<TargetFile> |
findFiles(FindForm criteriaForm)
Uses the "criteria" parameter to configure a FileSelector
and returns the list of found files. |
void |
removeProgressListener(ProgressListener prol)
Removes a previously set ProgressListener |
java.util.List<TargetFile> |
rename(java.util.List<TargetFile> fileList,
OverwriteFileCallback callback)
Cycles through the file list and renames each file to the name specified in the "newName" property, unless the file is not selected or "newName" is empty. |
void |
replace(ReplaceForm criteriaForm,
java.util.List<TargetFile> fileList)
Uses the "criteria" parameter to configure a FileMatcher and
applies the defined relacement algorithm to all files
in the list that are marked as "selected" (the default). |
void |
reset()
Aborts any currently running search and clears the history. |
void |
setLocalizer(Localizer localizer)
Sets the Localizer instance to be used for translations. |
void |
undoLastReplace()
Undo command for the last replace operation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UIBean(MessageBox sink,
Localizer localizer)
sink - for (error) messages| Method Detail |
|---|
public java.util.List<TargetFile> findFiles(FindForm criteriaForm)
FileSelector
and returns the list of found files.
findFiles in interface UIFacecriteriaForm - search criteria
public void replace(ReplaceForm criteriaForm,
java.util.List<TargetFile> fileList)
FileMatcher and
applies the defined relacement algorithm to all files
in the list that are marked as "selected" (the default).
replace in interface UIFacecriteriaForm - defining a regular expression and a replacement patternfileList - list of files to operate onspublic void undoLastReplace()
undoLastReplace in interface UIFace
public java.util.List<TargetFile> rename(java.util.List<TargetFile> fileList,
OverwriteFileCallback callback)
rename in interface UIFacefileList - files to be renamedcallback - for user feedback
public void abort()
abort in interface UIFacepublic void reset()
reset in interface Resetablereset in interface UIFacepublic void setLocalizer(Localizer localizer)
localizer - for translationspublic void addProgressListener(ProgressListener prol)
addProgressListener in interface UIFaceprol - ProgressListener to be added.public void removeProgressListener(ProgressListener prol)
removeProgressListener in interface UIFaceprol - ProgressListener to be removed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||