Browse Source

REPORT-94324 保存弹窗,报表工作目录下双击文件夹时没有高亮

newui
Destiny.Lin 2 years ago
parent
commit
02a13b696d
  1. 15
      designer-base/src/main/java/com/fr/file/FILEChooserPane.java

15
designer-base/src/main/java/com/fr/file/FILEChooserPane.java

@ -1466,10 +1466,17 @@ public class FILEChooserPane extends BasicPane {
for (int i = 0; i < this.buttonList.size(); i++) {
this.buttonList.get(i).setForeground(null);
if (((SetDirectoryAction) this.buttonList.get(i).getAction()).getDir() != null
&& this.buttonList.get(i).getAction() instanceof SetDirectoryAction
&& (ComparatorUtils.equals(((SetDirectoryAction) this.buttonList.get(i).getAction()).getDir().getPath(), dir.getPath()))) {
this.buttonList.get(i).setForeground(Color.BLUE);
&& this.buttonList.get(i).getAction() instanceof SetDirectoryAction) {
String actionPath = ((SetDirectoryAction) this.buttonList.get(i).getAction()).getDir().getPath();
String dirPath = dir.getPath();
//如果是报表环境,button的Action最后会跟上"/",这个是特意处理的,但是对应代码没有说明原因,不做修改
//FILE的getPath不会带"/",这边针对这种情况加个处理,不建议直接改FILE
if (actionPath.endsWith("/") && !dirPath.endsWith("/")) {
dirPath = dirPath + "/";
}
if (ComparatorUtils.equals(actionPath, dirPath)) {
this.buttonList.get(i).setForeground(Color.BLUE);
}
}
}
}

Loading…
Cancel
Save