Browse Source

Merge pull request #3073 in DESIGN/design from bugfix/10.0 to feature/10.0

* commit '32d66d8ffc12c9c9fb223fc75c245d6d3a7dd0bb':
  REPORT-45095 修复代码质量&优化传递
  REPORT-44714 【10.0.12冒烟】设计器缓存文件记录设计器设置失效 【问题原因】需要在中间版本发布,提一份到final 【改动思路】改动已经在release中通过,提一份到final
  REPORT-44714 【10.0.12冒烟】设计器缓存文件记录设计器设置失效 将对一些文件的误改动回退一下
  REPORT-44714 【10.0.12冒烟】设计器缓存文件记录设计器设置失效 与产品沟通后,确认修改方案为,当发生了足以造成数据集面板丢失的容器高度变化时,至少保证水平拖拽面板不丢失
  CHART-17340 补充富文本国际化翻译
  CHART-17340 富文本颜色组件增加国际化
  REPORT-45095 表单控件设置提交事件,添加字段后编辑字段,事件弹框消失
  REPORT-44714 修改错误注释
  REPORT-44714 删除调试语句
  REPORT-44714 【10.0.12冒烟】设计器缓存文件记录设计器设置失效 【问题原因】实际上缓存文件的存取没有问题,但是因为此前缓存文件中记录的是上子面板的高度值,而在设计器的打开过程中,父容器的高度会变化(且有时候变为负数),导致了关闭设计器前,上子面板相对于父容器高度的比例与打开设计器之后的比例不同,视觉上就出现了面板高度的偏差 【改动思路】将之前的思路修改为,在容器高度发生变化时,根据上子面板占容器高度的比例去调整上子面板的高度,且将缓存文件中存储上子面板高度修改为存储比例
persist/11.0
superman 4 years ago
parent
commit
db658ce7a7
  1. 12
      designer-base/src/main/java/com/fr/design/DesignerEnvManager.java
  2. 13
      designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java
  3. 14
      designer-base/src/main/java/com/fr/design/mainframe/WestRegionContainerPane.java
  4. 1736
      designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java
  5. 4
      designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java

12
designer-base/src/main/java/com/fr/design/DesignerEnvManager.java

@ -240,7 +240,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
String installHome = StableUtils.getInstallHome(); String installHome = StableUtils.getInstallHome();
//这里不判断路径是.的情况,放在checkValid方法里面,重新选 //这里不判断路径是.的情况,放在checkValid方法里面,重新选
if (installHome != null) { if (installHome != null) {
String name = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Engine_DEFAULT"); String name = Toolkit.i18nText("Fine-Design_Basic_Engine_DEFAULT");
String envPath = designerEnvManager.getDefaultenvPath(installHome); String envPath = designerEnvManager.getDefaultenvPath(installHome);
designerEnvManager.putEnv(name, LocalDesignerWorkspaceInfo.create(name, envPath)); designerEnvManager.putEnv(name, LocalDesignerWorkspaceInfo.create(name, envPath));
designerEnvManager.setCurEnvName(name); designerEnvManager.setCurEnvName(name);
@ -304,8 +304,8 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
String today = calender.get(Calendar.YEAR) + "-" + (calender.get(Calendar.MONTH) + 1) + "-" + calender.get(Calendar.DAY_OF_MONTH); String today = calender.get(Calendar.YEAR) + "-" + (calender.get(Calendar.MONTH) + 1) + "-" + calender.get(Calendar.DAY_OF_MONTH);
String fileName = StableUtils.pathJoin(logLocation, "fr_" + today + "_%g.log"); String fileName = StableUtils.pathJoin(logLocation, "fr_" + today + "_%g.log");
if (!new java.io.File(fileName).exists()) { if (!new File(fileName).exists()) {
StableUtils.makesureFileExist(new java.io.File(fileName)); StableUtils.makesureFileExist(new File(fileName));
} }
Handler handler = new FileHandler(fileName, true); Handler handler = new FileHandler(fileName, true);
@ -529,7 +529,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
return env; return env;
} }
} }
String name = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Workspace_Default"); String name = Toolkit.i18nText("Fine-Design_Basic_Workspace_Default");
LocalDesignerWorkspaceInfo newDefaultEnv = LocalDesignerWorkspaceInfo.create(name, defaultenvPath); LocalDesignerWorkspaceInfo newDefaultEnv = LocalDesignerWorkspaceInfo.create(name, defaultenvPath);
this.putEnv(name, newDefaultEnv); this.putEnv(name, newDefaultEnv);
return newDefaultEnv; return newDefaultEnv;
@ -552,7 +552,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
} }
} }
} }
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Workspace_Default"); return Toolkit.i18nText("Fine-Design_Basic_Workspace_Default");
} }
@ -1643,7 +1643,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
if ((tmpVal = reader.getAttrAsString("webinfLocation", null)) != null) { if ((tmpVal = reader.getAttrAsString("webinfLocation", null)) != null) {
// marks:兼容6.1的 // marks:兼容6.1的
// marks:设置默认的目录. // marks:设置默认的目录.
String curReportServerName = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Server_Embedded_Server"); String curReportServerName = Toolkit.i18nText("Fine-Design_Basic_Server_Embedded_Server");
LocalDesignerWorkspaceInfo reportServer = LocalDesignerWorkspaceInfo.create(curReportServerName, tmpVal); LocalDesignerWorkspaceInfo reportServer = LocalDesignerWorkspaceInfo.create(curReportServerName, tmpVal);
this.putEnv(curReportServerName, reportServer); this.putEnv(curReportServerName, reportServer);

13
designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java

@ -1,12 +1,10 @@
package com.fr.design.gui.icontainer; package com.fr.design.gui.icontainer;
import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode; import com.fr.base.vcs.DesignerMode;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.collections.utils.MathUtils;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -159,8 +157,7 @@ public class UIResizableContainer extends JPanel {
} }
/** /**
* 设置关闭设计器前最后一次上下子面板的高度 * 设置关闭设计器前最新的上子面板的高度比例
*
* @param toolPaneY * @param toolPaneY
*/ */
public void setLastToolPaneY(int toolPaneY) { public void setLastToolPaneY(int toolPaneY) {
@ -242,10 +239,10 @@ public class UIResizableContainer extends JPanel {
if (parentHeight == -1) { if (parentHeight == -1) {
// 初始化下parentheight,存一下当前的父容器height // 初始化下parentheight,存一下当前的父容器height
parentHeight = parent.getHeight(); parentHeight = parent.getHeight();
} else if (parentHeight != parent.getHeight()) { }
// parentHeight与父容器height不等时,代表用户调整分辨率或者dpi了,此时调整toolPaneY if (parentHeight != parent.getHeight() && (parent.getHeight() - toolPaneHeight) >= 0) {
toolPaneY = toolPaneY * parent.getHeight() / parentHeight; // 调整toolPaneY,保证至少水平的拖拽条horizontToolPane不丢失
toolPaneY = Math.min(toolPaneY, (parent.getHeight() - toolPaneHeight)); toolPaneY = Math.min(toolPaneY, parent.getHeight() - toolPaneHeight);
parentHeight = parent.getHeight(); parentHeight = parent.getHeight();
} }
} }

14
designer-base/src/main/java/com/fr/design/mainframe/WestRegionContainerPane.java

@ -32,11 +32,11 @@ public class WestRegionContainerPane extends UIResizableContainer {
public WestRegionContainerPane() { public WestRegionContainerPane() {
super(DesignerFrameFileDealerPane.getInstance(), Constants.RIGHT); super(DesignerFrameFileDealerPane.getInstance(), Constants.RIGHT);
setDownPane(TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter())); setDownPane(TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()));
GeneralContext.listenPluginRunningChanged(new PluginEventListener(TableDataTreePane.PLUGIN_LISTENER_PRIORITY - 1) { GeneralContext.listenPluginRunningChanged(new PluginEventListener(TableDataTreePane.PLUGIN_LISTENER_PRIORITY - 1) {
@Override @Override
public void on(PluginEvent event) { public void on(PluginEvent event) {
@ -47,15 +47,15 @@ public class WestRegionContainerPane extends UIResizableContainer {
} }
} }
}, new PluginFilter() { }, new PluginFilter() {
@Override @Override
public boolean accept(PluginContext context) { public boolean accept(PluginContext context) {
return context.contain(PluginModule.ExtraDesign); return context.contain(PluginModule.ExtraDesign);
} }
}); });
setContainerWidth(165); setContainerWidth(165);
setBackground(UIConstants.TREE_BACKGROUND); setBackground(UIConstants.TREE_BACKGROUND);
} }
} }

1736
designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java

File diff suppressed because it is too large Load Diff

4
designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java

@ -456,7 +456,7 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
newAdd.clear(); newAdd.clear();
for (int i = 0; i < cs; i++) { for (int i = 0; i < cs; i++) {
for (int j = 0; j < rs; j++) { for (int j = 0; j < rs; j++) {
TemplateCellElement cellElement = ePane.getEditingElementCase().getTemplateCellElement(c + i, r + j ); TemplateCellElement cellElement = ePane.getEditingElementCase().getTemplateCellElement(c + i, r + j);
if (cellElement != null && ((i + c) != 0 || (r + j) != 0)) { if (cellElement != null && ((i + c) != 0 || (r + j) != 0)) {
String value = cellElement.toString(); String value = cellElement.toString();
if (!newAdd.contains(value) && !allColumnRow.contains(value)) { if (!newAdd.contains(value) && !allColumnRow.contains(value)) {
@ -512,7 +512,7 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
private SmartJTablePaneAction a = new AbstractSmartJTablePaneAction(this, SmartInsertDBManipulationPane.this) { private SmartJTablePaneAction a = new AbstractSmartJTablePaneAction(this, SmartInsertDBManipulationPane.this) {
@Override @Override
public void doOk() { public void doOk() {
((KeyColumnTableModel)keyColumnValuesTable.getModel()).refreshNameValueList((KeyColumnTableModel)model); ((KeyColumnTableModel) keyColumnValuesTable.getModel()).refreshNameValueList((KeyColumnTableModel) model);
} }
@Override @Override

Loading…
Cancel
Save