Browse Source

Merge pull request #4521 in DESIGN/design from feature/10.0 to feature/x

* commit '7f27a557931816c15f7219668c7dbe72763d06db':
  REPORT-53365 && REPORT-53310 交互修改
  KERNEL-7634 依赖问题
  REPORT-53398 【智能联动】组件拖入时,tab2内引用到组件名的地方,替换名称有误
  REPORT-53229 补上空格
  REPORT-53240 加密组件在服务器上预览不显示
  REPORT-53229 设计器顶部版本号信息改为小版本信息
persist/11.0
superman 3 years ago
parent
commit
906345b0b4
  1. 9
      designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java
  2. 5
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java
  3. 6
      designer-base/src/main/java/com/fr/design/ui/ModernUIConstants.java
  4. 2
      designer-base/src/main/java/com/fr/design/ui/compatible/NxInterceptRequestCallback.java
  5. 8
      designer-form/src/main/java/com/fr/design/designer/beans/models/ModelUtil.java
  6. 13
      designer-form/src/main/java/com/fr/design/mainframe/share/util/SharableXMLUtils.java
  7. 6
      designer-realize/src/main/java/com/fr/design/mainframe/CellWidgetPropertyPane.java
  8. 2
      designer-realize/src/main/java/com/fr/design/share/SharableManager.java

9
designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java

@ -107,6 +107,15 @@ public abstract class UIListGroupControlPane extends UIControlPane implements L
contentPane.add(wrapperPane); contentPane.add(wrapperPane);
nameEdListMap.put(event, wrapperPane); nameEdListMap.put(event, wrapperPane);
} }
contentPane.addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
super.mousePressed(e);
if (selectNameEdList != null) {
selectNameEdList.stopEditing();
}
}
});
} }
protected void populateNameObjects(Widget widget) { protected void populateNameObjects(Widget widget) {

5
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java

@ -52,6 +52,7 @@ import com.fr.file.FILEFactory;
import com.fr.file.FileFILE; import com.fr.file.FileFILE;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext; import com.fr.general.GeneralContext;
import com.fr.general.GeneralUtils;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.invoke.Reflect; import com.fr.invoke.Reflect;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
@ -863,7 +864,9 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
JTemplate<?, ?> editingTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); JTemplate<?, ?> editingTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
StringBuilder defaultTitleSB = new StringBuilder(); StringBuilder defaultTitleSB = new StringBuilder();
defaultTitleSB.append(ProductConstants.PRODUCT_NAME); defaultTitleSB.append(ProductConstants.APP_NAME);
defaultTitleSB.append(" ");
defaultTitleSB.append(GeneralUtils.getVersion());
defaultTitleSB.append(" "); defaultTitleSB.append(" ");
defaultTitleSB.append(ProductConstants.BRANCH); defaultTitleSB.append(ProductConstants.BRANCH);
defaultTitleSB.append(" "); defaultTitleSB.append(" ");

6
designer-base/src/main/java/com/fr/design/ui/ModernUIConstants.java

@ -7,9 +7,9 @@ import com.fr.general.IOUtils;
* @version 10.0 * @version 10.0
* Created by richie on 2019-03-05 * Created by richie on 2019-03-05
*/ */
class ModernUIConstants { public class ModernUIConstants {
static final String SCRIPT_INIT_NAME_SPACE = IOUtils.readResourceAsString("/com/fr/design/ui/InitNameSpace.js"); public static final String SCRIPT_INIT_NAME_SPACE = IOUtils.readResourceAsString("/com/fr/design/ui/InitNameSpace.js");
static final String HTML_TPL = IOUtils.readResourceAsString("/com/fr/design/ui/tpl.html"); public static final String HTML_TPL = IOUtils.readResourceAsString("/com/fr/design/ui/tpl.html");
} }

2
designer-base/src/main/java/com/fr/design/ui/compatible/NxInterceptRequestCallback.java

@ -124,7 +124,7 @@ public class NxInterceptRequestCallback implements InterceptRequestCallback {
if (path.endsWith(".gif")) { if (path.endsWith(".gif")) {
return "image/gif"; return "image/gif";
} }
Path file = new File("D:\\Fanruan\\FR10.0\\final_05_27\\FineReport_10.0\\webapps\\webroot\\upm\\lib\\locale\\plugin_zh_CN.js").toPath(); Path file = new File(path).toPath();
try { try {
return Files.probeContentType(file); return Files.probeContentType(file);
} catch (IOException e) { } catch (IOException e) {

8
designer-form/src/main/java/com/fr/design/designer/beans/models/ModelUtil.java

@ -32,6 +32,8 @@ abstract class ModelUtil {
//直接遍历出来目标值,然后按需处理 //直接遍历出来目标值,然后按需处理
xCreator.traversalNameRelatedXCreators(nameRelatedCreators); xCreator.traversalNameRelatedXCreators(nameRelatedCreators);
Map<String, String> renameMap = new HashMap<>(); Map<String, String> renameMap = new HashMap<>();
// 避免与旧名称重复
initDuplicated(nameRelatedCreators, duplicated);
for (XCreator target : nameRelatedCreators) { for (XCreator target : nameRelatedCreators) {
String uniqueName = uniqueName(form, target, duplicated); String uniqueName = uniqueName(form, target, duplicated);
String oldName = target.toData().getWidgetName(); String oldName = target.toData().getWidgetName();
@ -42,6 +44,12 @@ abstract class ModelUtil {
} }
EventDispatcher.fire(WidgetNameModifyEvent.INSTANCE, new ContentChangeItem(renameMap, xCreator.toData(), ChangeItem.WIDGET_NAME)); EventDispatcher.fire(WidgetNameModifyEvent.INSTANCE, new ContentChangeItem(renameMap, xCreator.toData(), ChangeItem.WIDGET_NAME));
} }
private static void initDuplicated(Set<XCreator> nameRelatedCreators, Set<String> duplicated) {
for (XCreator xCreator : nameRelatedCreators) {
duplicated.add(xCreator.toData().getWidgetName());
}
}
private static String uniqueName(Form form, XCreator xCreator, Set<String> duplicated) { private static String uniqueName(Form form, XCreator xCreator, Set<String> duplicated) {

13
designer-form/src/main/java/com/fr/design/mainframe/share/util/SharableXMLUtils.java

@ -1,13 +0,0 @@
package com.fr.design.mainframe.share.util;
import com.fr.form.share.encrypt.engine.SharableReadHelper;
import com.fr.stable.xml.XMLConf;
import com.fr.stable.xml.helper.XMLReadHelper;
public class SharableXMLUtils {
public static synchronized void registerSharableReadHelper() {
XMLReadHelper readHelper = XMLConf.getReadHelper();
XMLReadHelper helper = new SharableReadHelper(readHelper);
XMLConf.registerXMLHelper(helper);
}
}

6
designer-realize/src/main/java/com/fr/design/mainframe/CellWidgetPropertyPane.java

@ -106,6 +106,9 @@ public class CellWidgetPropertyPane extends BasicPane {
final CellSelection finalCS = (CellSelection) ePane.getSelection(); final CellSelection finalCS = (CellSelection) ePane.getSelection();
final TemplateElementCase tplEC = ePane.getEditingElementCase(); final TemplateElementCase tplEC = ePane.getEditingElementCase();
final Widget cellWidget = cellEditorDefPane.update(); final Widget cellWidget = cellEditorDefPane.update();
if(cellWidget == null){
return;
}
if (finalCS.isSelectedOneCell(ePane)) { if (finalCS.isSelectedOneCell(ePane)) {
if (tplEC.getTemplateCellElement(cellElement.getColumn(), cellElement.getRow()) == null) {//cellElement未加入到report中时要添加进去 if (tplEC.getTemplateCellElement(cellElement.getColumn(), cellElement.getRow()) == null) {//cellElement未加入到report中时要添加进去
tplEC.addCellElement(cellElement); tplEC.addCellElement(cellElement);
@ -141,6 +144,9 @@ public class CellWidgetPropertyPane extends BasicPane {
final CellSelection finalCS = (CellSelection) selection; final CellSelection finalCS = (CellSelection) selection;
final TemplateElementCase tplEC = ePane.getEditingElementCase(); final TemplateElementCase tplEC = ePane.getEditingElementCase();
final Widget cellWidget = cellEditorDefPane.update(); final Widget cellWidget = cellEditorDefPane.update();
if(cellWidget == null){
return;
}
if(finalCS.isSelectedOneCell(ePane)){ if(finalCS.isSelectedOneCell(ePane)){
if(tplEC.getTemplateCellElement(cellElement.getColumn(), cellElement.getRow())== null){//cellElement未加入到report中时要添加进去 if(tplEC.getTemplateCellElement(cellElement.getColumn(), cellElement.getRow())== null){//cellElement未加入到report中时要添加进去
tplEC.addCellElement(cellElement); tplEC.addCellElement(cellElement);

2
designer-realize/src/main/java/com/fr/design/share/SharableManager.java

@ -9,7 +9,6 @@ import com.fr.design.mainframe.share.collect.ComponentCollector;
import com.fr.design.mainframe.share.collect.SharableCollectorManager; import com.fr.design.mainframe.share.collect.SharableCollectorManager;
import com.fr.design.mainframe.share.encrypt.clipboard.impl.EncryptSelectionClipboardHandler; import com.fr.design.mainframe.share.encrypt.clipboard.impl.EncryptSelectionClipboardHandler;
import com.fr.design.mainframe.share.encrypt.clipboard.impl.EncryptTransferableClipboardHandler; import com.fr.design.mainframe.share.encrypt.clipboard.impl.EncryptTransferableClipboardHandler;
import com.fr.design.mainframe.share.util.SharableXMLUtils;
import com.fr.design.mainframe.share.util.ShareComponentUtils; import com.fr.design.mainframe.share.util.ShareComponentUtils;
import com.fr.design.share.utils.EffectItemUtils; import com.fr.design.share.utils.EffectItemUtils;
import com.fr.json.JSONArray; import com.fr.json.JSONArray;
@ -18,7 +17,6 @@ import java.util.List;
public class SharableManager { public class SharableManager {
public static void start() { public static void start() {
SharableXMLUtils.registerSharableReadHelper();
SharableCollectorManager.getInstance().execute(); SharableCollectorManager.getInstance().execute();
ClipboardFilter.registerClipboardHandler(EncryptSelectionClipboardHandler.getInstance()); ClipboardFilter.registerClipboardHandler(EncryptSelectionClipboardHandler.getInstance());
ClipboardFilter.registerClipboardHandler(EncryptTransferableClipboardHandler.getInstance()); ClipboardFilter.registerClipboardHandler(EncryptTransferableClipboardHandler.getInstance());

Loading…
Cancel
Save