🚩 完善文件图标支持
This commit is contained in:
parent
c036127f36
commit
0a94a9f7d1
@ -148,7 +148,11 @@ public class FileUtil {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
DirFileModel dirFileModel = new DirFileModel(file.getAbsolutePath(), file.getName(), new ArrayList<>(), new FontIcon(FOLDER), new FontIcon(FOLDER_OPEN));
|
DirFileModel dirFileModel = new DirFileModel(
|
||||||
|
file.getAbsolutePath(),
|
||||||
|
file.getName(), new ArrayList<>(),
|
||||||
|
new FontIcon(FOLDER),
|
||||||
|
new FontIcon(FOLDER_OPEN));
|
||||||
|
|
||||||
File[] files = file.listFiles();
|
File[] files = file.listFiles();
|
||||||
if (files != null) {
|
if (files != null) {
|
||||||
@ -158,7 +162,10 @@ public class FileUtil {
|
|||||||
dirFileModel.getChildFile().add(childDirFileModel);
|
dirFileModel.getChildFile().add(childDirFileModel);
|
||||||
} else {
|
} else {
|
||||||
// todo 在此监测文件后缀,设置对应的图标
|
// todo 在此监测文件后缀,设置对应的图标
|
||||||
dirFileModel.getChildFile().add(new DirFileModel(f.getAbsolutePath(), f.getName(), null, getIconCorrespondingToFileName(f.getName()), getIconCorrespondingToFileName(f.getName())));
|
dirFileModel.getChildFile().add(new DirFileModel(
|
||||||
|
f.getAbsolutePath(), f.getName(), null,
|
||||||
|
getIconCorrespondingToFileName(f.getName()),
|
||||||
|
getIconCorrespondingToFileName(f.getName())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user