2024-10-07 00:58:29 +03:00
|
|
|
|
package Common_old.Utils.Files;
|
2024-10-07 14:22:52 +03:00
|
|
|
|
import Common.Utils.CommonUtils;
|
2024-10-07 00:58:29 +03:00
|
|
|
|
import Common_old.Constants;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
|
|
|
|
|
|
import javax.swing.*;
|
|
|
|
|
|
import javax.swing.filechooser.FileFilter;
|
|
|
|
|
|
import java.io.File;
|
|
|
|
|
|
public class ProjectsChooser extends VFileChooser_ {
|
|
|
|
|
|
public ProjectsChooser(String title) {
|
|
|
|
|
|
super(title, new FileFilter() {
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public boolean accept(File f) {
|
|
|
|
|
|
return
|
2024-10-07 14:22:52 +03:00
|
|
|
|
!CommonUtils.ContainsCyrillic(f.getAbsolutePath()) &&
|
2023-10-06 22:51:09 +03:00
|
|
|
|
!f.getName().equalsIgnoreCase(Constants.data)
|
2023-09-17 22:13:42 +03:00
|
|
|
|
;
|
|
|
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public String getDescription() {
|
|
|
|
|
|
return "Все папки";
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|