From 6b0d6c60ec1abcde0a6b4d890d0d6c6a4dcd6d9e Mon Sep 17 00:00:00 2001 From: plough Date: Fri, 14 Sep 2018 17:31:51 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-11155=2010.0=20=E4=B8=A2=E5=A4=B1?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=82=B9=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../beans/actions/FormWidgetEditAction.java | 22 ++++++++++++++++++- .../actions/FormMobileAttrAction.java | 10 +++++++++ .../AccessibleBodyWatermarkEditor.java | 10 +++++++++ .../report/ReportMobileAttrAction.java | 9 ++++++++ .../actions/report/ReportWatermarkAction.java | 10 +++++++++ 5 files changed, 60 insertions(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/actions/FormWidgetEditAction.java b/designer-form/src/main/java/com/fr/design/designer/beans/actions/FormWidgetEditAction.java index 753dc812b4..300086040a 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/actions/FormWidgetEditAction.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/actions/FormWidgetEditAction.java @@ -3,9 +3,14 @@ package com.fr.design.designer.beans.actions; import com.fr.design.actions.TemplateComponentAction; import com.fr.design.designer.beans.actions.behavior.UpdateBehavior; import com.fr.design.mainframe.FormDesigner; +import com.fr.intelli.record.Focus; +import com.fr.intelli.record.Original; +import com.fr.record.analyzer.EnableMetrics; +import javax.swing.JButton; import java.awt.event.ActionEvent; +@EnableMetrics public abstract class FormWidgetEditAction extends TemplateComponentAction { private UpdateBehavior updateBehavior = new UpdateBehavior() { @@ -27,9 +32,24 @@ public abstract class FormWidgetEditAction extends TemplateComponentAction { public FormMobileAttrAction(JForm jf) { @@ -64,6 +68,7 @@ public class FormMobileAttrAction extends JTemplateAction { // 放到后面。如果提前 return 了,则仍然处于未设置状态,不要添加 jf.getTarget().addAttrMark(new MobileOnlyTemplateAttrMark()); } + recordFunction(); // 设置移动端属性并刷新界面 formTpl.setFormMobileAttr(formMobileAttr); // 会调整 body 的自适应布局,放到最后 ((FormArea)jf.getFormDesign().getParent()).onMobileAttrModified(); @@ -74,6 +79,11 @@ public class FormMobileAttrAction extends JTemplateAction { dialog.setVisible(true); } + @Focus(id = "com.fr.mobile.mobile_template_frm", text = "Fine-Design_Function_Mobile_Template_Frm", source = Original.EMBED) + private void recordFunction() { + // do nothing + } + private static final MenuKeySet REPORT_APP_ATTR = new MenuKeySet() { @Override public char getMnemonic() { diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/accessibles/AccessibleBodyWatermarkEditor.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/accessibles/AccessibleBodyWatermarkEditor.java index c5acb61148..a0567bad1d 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/widget/accessibles/AccessibleBodyWatermarkEditor.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/accessibles/AccessibleBodyWatermarkEditor.java @@ -7,6 +7,9 @@ import com.fr.design.mainframe.widget.editors.ITextComponent; import com.fr.design.mainframe.widget.renderer.WatermarkRenderer; import com.fr.design.mainframe.widget.wrappers.WatermarkWrapper; import com.fr.design.report.WatermarkPane; +import com.fr.intelli.record.Focus; +import com.fr.intelli.record.Original; +import com.fr.record.analyzer.EnableMetrics; import javax.swing.*; import java.awt.*; @@ -15,6 +18,7 @@ import java.awt.*; * Created by plough on 2018/5/15. */ +@EnableMetrics public class AccessibleBodyWatermarkEditor extends UneditableAccessibleEditor { private WatermarkPane watermarkPane; @@ -40,9 +44,15 @@ public class AccessibleBodyWatermarkEditor extends UneditableAccessibleEditor { public void doOk() { setValue(watermarkPane.update()); fireStateChanged(); + recordFunction(); } }); watermarkPane.populate((WatermarkAttr) getValue()); dlg.setVisible(true); } + + @Focus(id = "com.fr.watermark", text = "Fine-Design_Form_WaterMark", source = Original.EMBED) + private void recordFunction() { + // do nothing + } } \ No newline at end of file diff --git a/designer-realize/src/main/java/com/fr/design/actions/report/ReportMobileAttrAction.java b/designer-realize/src/main/java/com/fr/design/actions/report/ReportMobileAttrAction.java index 40d4e68a41..a31108f2c4 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/report/ReportMobileAttrAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/report/ReportMobileAttrAction.java @@ -11,7 +11,9 @@ import com.fr.design.report.mobile.ReportMobileAttrPane; import com.fr.file.FILE; import com.fr.general.IOUtils; +import com.fr.intelli.record.Focus; import com.fr.main.TemplateWorkBook; +import com.fr.record.analyzer.EnableMetrics; import com.fr.report.mobile.ElementCaseMobileAttr; import javax.swing.*; @@ -22,6 +24,7 @@ import java.awt.event.ActionEvent; * * Created by Administrator on 2016/5/12/0012. */ +@EnableMetrics public class ReportMobileAttrAction extends JWorkBookAction{ public ReportMobileAttrAction(JWorkBook jwb) { @@ -64,6 +67,7 @@ public class ReportMobileAttrAction extends JWorkBookAction{ // 放到后面。如果提前 return 了,则仍然处于未设置状态,不要添加 wbTpl.addAttrMark(new MobileOnlyTemplateAttrMark()); } + recordFunction(); // 设置移动端属性并刷新界面 wbTpl.setReportMobileAttr(elementCaseMobileAttr); // 会同时修改页面设置,放到最后 jwb.fireTargetModified(); @@ -72,6 +76,11 @@ public class ReportMobileAttrAction extends JWorkBookAction{ dialog.setVisible(true); } + @Focus(id = "com.fr.mobile.mobile_template_cpt", text = "Fine-Design_Function_Mobile_Template_Cpt") + private void recordFunction() { + // do nothing + } + private static final MenuKeySet REPORT_APP_ATTR = new MenuKeySet() { @Override public char getMnemonic() { return 'P'; } diff --git a/designer-realize/src/main/java/com/fr/design/actions/report/ReportWatermarkAction.java b/designer-realize/src/main/java/com/fr/design/actions/report/ReportWatermarkAction.java index db1d10f9d1..a07df219f9 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/report/ReportWatermarkAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/report/ReportWatermarkAction.java @@ -8,7 +8,10 @@ import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.JWorkBook; import com.fr.design.menu.KeySetUtils; import com.fr.design.report.WatermarkPane; +import com.fr.intelli.record.Focus; +import com.fr.intelli.record.Original; import com.fr.main.impl.WorkBook; +import com.fr.record.analyzer.EnableMetrics; import com.fr.report.core.ReportUtils; import java.awt.event.ActionEvent; @@ -16,6 +19,7 @@ import java.awt.event.ActionEvent; /** * Created by plough on 2018/5/15. */ +@EnableMetrics public class ReportWatermarkAction extends JWorkBookAction { public ReportWatermarkAction(JWorkBook jwb) { super(jwb); @@ -42,7 +46,13 @@ public class ReportWatermarkAction extends JWorkBookAction { public void doOk() { wbTpl.addAttrMark(watermarkPane.update()); jwb.fireTargetModified(); + recordFunction(); } }).setVisible(true); } + + @Focus(id = "com.fr.watermark", text = "Fine-Design_Form_WaterMark", source = Original.EMBED) + private void recordFunction() { + // do nothing + } }