diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java index bb7fee0a36..dbc71fe1af 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java +++ b/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); 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) { diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java index 3d7fb8c48b..6fa9871bc7 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java +++ b/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.general.ComparatorUtils; import com.fr.general.GeneralContext; +import com.fr.general.GeneralUtils; import com.fr.general.IOUtils; import com.fr.invoke.Reflect; import com.fr.log.FineLoggerFactory; @@ -863,7 +864,9 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta JTemplate editingTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); StringBuilder defaultTitleSB = new StringBuilder(); - defaultTitleSB.append(ProductConstants.PRODUCT_NAME); + defaultTitleSB.append(ProductConstants.APP_NAME); + defaultTitleSB.append(" "); + defaultTitleSB.append(GeneralUtils.getVersion()); defaultTitleSB.append(" "); defaultTitleSB.append(ProductConstants.BRANCH); defaultTitleSB.append(" "); diff --git a/designer-base/src/main/java/com/fr/design/ui/ModernUIConstants.java b/designer-base/src/main/java/com/fr/design/ui/ModernUIConstants.java index ed6fb542e9..8f7bf07034 100644 --- a/designer-base/src/main/java/com/fr/design/ui/ModernUIConstants.java +++ b/designer-base/src/main/java/com/fr/design/ui/ModernUIConstants.java @@ -7,9 +7,9 @@ import com.fr.general.IOUtils; * @version 10.0 * 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"); } diff --git a/designer-base/src/main/java/com/fr/design/ui/compatible/NxInterceptRequestCallback.java b/designer-base/src/main/java/com/fr/design/ui/compatible/NxInterceptRequestCallback.java index 5ec0ff4339..7b4977e77b 100644 --- a/designer-base/src/main/java/com/fr/design/ui/compatible/NxInterceptRequestCallback.java +++ b/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")) { 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 { return Files.probeContentType(file); } catch (IOException e) { diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/models/ModelUtil.java b/designer-form/src/main/java/com/fr/design/designer/beans/models/ModelUtil.java index 10e672f58b..0f75896e1b 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/models/ModelUtil.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/models/ModelUtil.java @@ -32,6 +32,8 @@ abstract class ModelUtil { //直接遍历出来目标值,然后按需处理 xCreator.traversalNameRelatedXCreators(nameRelatedCreators); Map renameMap = new HashMap<>(); + // 避免与旧名称重复 + initDuplicated(nameRelatedCreators, duplicated); for (XCreator target : nameRelatedCreators) { String uniqueName = uniqueName(form, target, duplicated); String oldName = target.toData().getWidgetName(); @@ -42,6 +44,12 @@ abstract class ModelUtil { } EventDispatcher.fire(WidgetNameModifyEvent.INSTANCE, new ContentChangeItem(renameMap, xCreator.toData(), ChangeItem.WIDGET_NAME)); } + + private static void initDuplicated(Set nameRelatedCreators, Set duplicated) { + for (XCreator xCreator : nameRelatedCreators) { + duplicated.add(xCreator.toData().getWidgetName()); + } + } private static String uniqueName(Form form, XCreator xCreator, Set duplicated) { diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/util/SharableXMLUtils.java b/designer-form/src/main/java/com/fr/design/mainframe/share/util/SharableXMLUtils.java deleted file mode 100644 index baacf42722..0000000000 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/util/SharableXMLUtils.java +++ /dev/null @@ -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); - } -} diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/CellWidgetPropertyPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/CellWidgetPropertyPane.java index 246bb72aa8..0ddfdd3d7d 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/CellWidgetPropertyPane.java +++ b/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 TemplateElementCase tplEC = ePane.getEditingElementCase(); final Widget cellWidget = cellEditorDefPane.update(); + if(cellWidget == null){ + return; + } if (finalCS.isSelectedOneCell(ePane)) { if (tplEC.getTemplateCellElement(cellElement.getColumn(), cellElement.getRow()) == null) {//cellElement未加入到report中时要添加进去 tplEC.addCellElement(cellElement); @@ -141,6 +144,9 @@ public class CellWidgetPropertyPane extends BasicPane { final CellSelection finalCS = (CellSelection) selection; final TemplateElementCase tplEC = ePane.getEditingElementCase(); final Widget cellWidget = cellEditorDefPane.update(); + if(cellWidget == null){ + return; + } if(finalCS.isSelectedOneCell(ePane)){ if(tplEC.getTemplateCellElement(cellElement.getColumn(), cellElement.getRow())== null){//cellElement未加入到report中时要添加进去 tplEC.addCellElement(cellElement); diff --git a/designer-realize/src/main/java/com/fr/design/share/SharableManager.java b/designer-realize/src/main/java/com/fr/design/share/SharableManager.java index ba3b830643..05f893fadd 100644 --- a/designer-realize/src/main/java/com/fr/design/share/SharableManager.java +++ b/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.encrypt.clipboard.impl.EncryptSelectionClipboardHandler; 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.share.utils.EffectItemUtils; import com.fr.json.JSONArray; @@ -18,7 +17,6 @@ import java.util.List; public class SharableManager { public static void start() { - SharableXMLUtils.registerSharableReadHelper(); SharableCollectorManager.getInstance().execute(); ClipboardFilter.registerClipboardHandler(EncryptSelectionClipboardHandler.getInstance()); ClipboardFilter.registerClipboardHandler(EncryptTransferableClipboardHandler.getInstance());