|
|
@ -1466,13 +1466,20 @@ public class FILEChooserPane extends BasicPane { |
|
|
|
for (int i = 0; i < this.buttonList.size(); i++) { |
|
|
|
for (int i = 0; i < this.buttonList.size(); i++) { |
|
|
|
this.buttonList.get(i).setForeground(null); |
|
|
|
this.buttonList.get(i).setForeground(null); |
|
|
|
if (((SetDirectoryAction) this.buttonList.get(i).getAction()).getDir() != null |
|
|
|
if (((SetDirectoryAction) this.buttonList.get(i).getAction()).getDir() != null |
|
|
|
&& this.buttonList.get(i).getAction() instanceof SetDirectoryAction |
|
|
|
&& this.buttonList.get(i).getAction() instanceof SetDirectoryAction) { |
|
|
|
&& (ComparatorUtils.equals(((SetDirectoryAction) this.buttonList.get(i).getAction()).getDir().getPath(), dir.getPath()))) { |
|
|
|
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); |
|
|
|
this.buttonList.get(i).setForeground(Color.BLUE); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setPopDir(FILE file) { |
|
|
|
public void setPopDir(FILE file) { |
|
|
|
popDir = file; |
|
|
|
popDir = file; |
|
|
|