Browse Source

Merge pull request #12043 in DESIGN/design from release/11.0 to bugfix/11.0

* commit '4157ecbcd891431ab1583efd067b89b44d4e774d':
  REPORT-94458 JS高级编辑面板帮助文档获取不到
  REPORT-93215 保存路径名称包含于上一次选的保存路径,保存弹窗的路径不会更新
  REPORT-94359 conflict
  REPORT-94359 新建fvs模板-轮播目录齿轮图数据配置未保存
  REPORT-94359 新建fvs模板-轮播目录齿轮图数据配置未保存
  REPORT-93215 保存路径名称包含于上一次选的保存路径,保存弹窗的路径不会更新
  REPORT-94324 保存弹窗,报表工作目录下双击文件夹时没有高亮
  REPORT-93422 控件样式开放自定义-去掉单元格的“字体大小”属性--减少冗余代码
bugfix/11.0
superman 2 years ago
parent
commit
9e8c266afe
  1. 2
      designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java
  2. 39
      designer-base/src/main/java/com/fr/file/FILEChooserPane.java
  3. 29
      designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java

2
designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java

@ -391,7 +391,7 @@ public class JSContentWithDescriptionPane extends JSContentPane implements KeyLi
}
private void updateHelpDocuments(Object value, List<HelpDocument> helpDocuments) {
String url = LocaleLinkProvider.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT);
String url = LocaleLinkProvider.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT) + value.toString();
try {
String result = HttpToolbox.get(url);
JSONObject jsonObject = new JSONObject(result);

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

@ -129,6 +129,10 @@ public class FILEChooserPane extends BasicPane {
public static final int JOPTIONPANE_CANCEL_OPTION = 3;
public static final String SEPARATOR_STRING = "/";
public static final char SEPARATOR_CHAR = '/';
/**
* alex:之所以在Pattern那里加个+,是因为有些路径会有两个甚至多个分隔符放在一起
@ -1466,10 +1470,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(SEPARATOR_STRING) && !dirPath.endsWith(SEPARATOR_STRING)) {
dirPath = dirPath + SEPARATOR_STRING;
}
if (ComparatorUtils.equals(actionPath, dirPath)) {
this.buttonList.get(i).setForeground(Color.BLUE);
}
}
}
}
@ -1479,7 +1490,7 @@ public class FILEChooserPane extends BasicPane {
}
public void populate(FILE dir) {
if (popDir != null && dir != null && popDir.toString().indexOf(dir.toString()) == 0) {
if (checkOnlyHighLight(dir)) {
highLightButton(dir);
return;
}
@ -1530,6 +1541,24 @@ public class FILEChooserPane extends BasicPane {
highLightButton(dir);
}
/**
* 检查是不是只需要设置高亮即可
*
* @param dir FILE
* @return 如果还要进行别的设置就返回false,如果只需要更新下高亮(通过点击上面的路径才会只需要更新高亮),返回true
*/
private boolean checkOnlyHighLight(FILE dir) {
if (popDir == null || dir == null) {
return false;
}
String popDirStr = popDir.toString();
String dirStr = dir.toString();
//前缀匹配是不够的,还要看下前缀匹配的下一位是不是'/'
//否则"test"和"test副本"明明不属于同个路径逻辑,也只更新高亮,应该是"test"和"test/副本"这样才可以通过
//如果通过了indexOf的检查,因为不会存在相同的路径,popDirStr只会比dirStr大,看一下前缀匹配的下一位是不是'/',如果不是就得更新路径文本,不能只设置高亮
return popDirStr.indexOf(dirStr) == 0 && popDirStr.length() > dirStr.length() && popDirStr.charAt(dirStr.length()) == SEPARATOR_CHAR;
}
// doLayout
@Override
public void doLayout() {

29
designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java

@ -97,25 +97,16 @@ public class ChartPropertyPane extends BaseChartPropertyPane {
* @param ePane 面板
*/
public void populateChartPropertyPane(ChartCollection collection, TargetComponent<?> ePane) {
new SwingWorker<Void, Void>() {
@Override
protected Void doInBackground() throws Exception {
GEOJSONHelper.getInstance();
return null;
}
@Override
protected void done() {
String chartID = collection.getSelectedChartProvider(ChartProvider.class).getID();
updateChartEditPane(collection.getSelectedChartProvider(ChartProvider.class).getID());
setSupportCellData(true);
container.setEPane(ePane);
if (ChartTypeManager.getInstance().chartExit(chartID)) {
chartEditPane.populate(collection);
} else {
GUICoreUtils.setEnabled(chartEditPane, false);
}
}
}.execute();
String chartID = collection.getSelectedChartProvider(ChartProvider.class).getID();
updateChartEditPane(collection.getSelectedChartProvider(ChartProvider.class).getID());
setSupportCellData(true);
this.container.setEPane(ePane);
if (ChartTypeManager.getInstance().chartExit(chartID)) {
chartEditPane.populate(collection);
} else {
GUICoreUtils.setEnabled(chartEditPane, false);
}
}
/**

Loading…
Cancel
Save