From 649edf31f90a033b8f8d285bdeffcd12c6b525d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Thu, 8 Apr 2021 15:36:59 +0800 Subject: [PATCH 1/3] =?UTF-8?q?REPORT-50744=20=E5=9C=A8FineKit=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=A0=B9=E6=8D=AEJTemplate=E5=AF=B9=E8=B1=A1=E8=8E=B7?= =?UTF-8?q?=E5=8F=96templateId=E7=9A=84=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/fanruan/api/design/DesignKit.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/fanruan/api/design/DesignKit.java b/src/main/java/com/fanruan/api/design/DesignKit.java index b203735..d7f9768 100644 --- a/src/main/java/com/fanruan/api/design/DesignKit.java +++ b/src/main/java/com/fanruan/api/design/DesignKit.java @@ -74,6 +74,10 @@ public class DesignKit { return getCurrentEditingTemplate().getTarget().getTemplateID(); } + public static String getTemplateId(JTemplate template) { + return template.getTarget().getTemplateID(); + } + /** * 获取设计器ID * From 7013e6461fc8c5344716a6b2805a6eed378ce3be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Thu, 8 Apr 2021 15:39:33 +0800 Subject: [PATCH 2/3] =?UTF-8?q?REPORT-50744=20=E8=A1=A5=E4=B8=8A=E6=B3=A8?= =?UTF-8?q?=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/fanruan/api/design/DesignKit.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/com/fanruan/api/design/DesignKit.java b/src/main/java/com/fanruan/api/design/DesignKit.java index d7f9768..2ff10ec 100644 --- a/src/main/java/com/fanruan/api/design/DesignKit.java +++ b/src/main/java/com/fanruan/api/design/DesignKit.java @@ -74,6 +74,12 @@ public class DesignKit { return getCurrentEditingTemplate().getTarget().getTemplateID(); } + /** + * 获取指定模板的ID + * + * @param template 指定模板 + * @return 模板ID + */ public static String getTemplateId(JTemplate template) { return template.getTarget().getTemplateID(); } From 198f73b578f159399be558bc69e615c4a5777fcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Thu, 8 Apr 2021 15:56:06 +0800 Subject: [PATCH 3/3] =?UTF-8?q?REPORT-50744=20=E7=94=A8JTemplateProvider?= =?UTF-8?q?=E6=9B=BF=E4=BB=A3JTemplate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/fanruan/api/design/DesignKit.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/fanruan/api/design/DesignKit.java b/src/main/java/com/fanruan/api/design/DesignKit.java index 2ff10ec..4b95d64 100644 --- a/src/main/java/com/fanruan/api/design/DesignKit.java +++ b/src/main/java/com/fanruan/api/design/DesignKit.java @@ -1,6 +1,8 @@ package com.fanruan.api.design; +import com.fr.base.io.BaseBook; import com.fr.design.DesignerEnvManager; +import com.fr.design.mainframe.JTemplateProvider; import com.fr.design.mainframe.WidgetPropertyPane; import com.fr.base.TableData; import com.fr.design.DesignModelAdapter; @@ -76,12 +78,12 @@ public class DesignKit { /** * 获取指定模板的ID - * + * * @param template 指定模板 * @return 模板ID */ - public static String getTemplateId(JTemplate template) { - return template.getTarget().getTemplateID(); + public static String getTemplateId(JTemplateProvider template) { + return ((BaseBook) template.getTarget()).getTemplateID(); } /**