From 7154e33994df1c81af087607e2b750657b33b5d8 Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 6 Sep 2017 11:46:58 +0800 Subject: [PATCH 01/24] =?UTF-8?q?REPORT-4393=20&&=20REPORT-4028=20&&=20REP?= =?UTF-8?q?ORT-4192=20=E5=8F=82=E6=95=B0=E9=9D=A2=E6=9D=BF=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E6=8E=A7=E4=BB=B6=E6=8E=A7=E4=BB=B6=E5=80=BC=E8=81=94?= =?UTF-8?q?=E5=8A=A8=E5=A4=B1=E6=95=88=20=E6=8E=A7=E4=BB=B6=E5=90=8D?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E4=BF=AE=E6=94=B9=20=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E4=B8=8D=E8=87=AA=E5=8A=A8=E6=8D=A2=E8=A1=8C?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/designer/creator/XCreator.java | 8 ++++++++ .../src/com/fr/design/designer/creator/XDateEditor.java | 9 ++++++++- .../com/fr/design/designer/creator/XWScaleLayout.java | 8 ++++++++ .../design/mainframe/widget/ui/FormWidgetCardPane.java | 8 ++++++-- .../com/fr/design/parameter/RootDesignDefinePane.java | 4 ++-- .../fr/design/widget/ui/designer/LabelDefinePane.java | 4 ++-- 6 files changed, 34 insertions(+), 7 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/XCreator.java b/designer_form/src/com/fr/design/designer/creator/XCreator.java index 1e7058f52..2daf303de 100644 --- a/designer_form/src/com/fr/design/designer/creator/XCreator.java +++ b/designer_form/src/com/fr/design/designer/creator/XCreator.java @@ -642,4 +642,12 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo this.data = data; } + /** + * 属性改变触发 + * + */ + public void firePropertyChange(){ + + } + } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/XDateEditor.java b/designer_form/src/com/fr/design/designer/creator/XDateEditor.java index 2a8f6aedd..fa0450fd9 100644 --- a/designer_form/src/com/fr/design/designer/creator/XDateEditor.java +++ b/designer_form/src/com/fr/design/designer/creator/XDateEditor.java @@ -174,5 +174,12 @@ public class XDateEditor extends XDirectWriteEditor { public boolean shouldScaleCreator() { return true; } - + + /** + * 触发其他操作 + * + */ + public void firePropertyChange(){ + initFieldText(); + } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/XWScaleLayout.java b/designer_form/src/com/fr/design/designer/creator/XWScaleLayout.java index a8ae49ddc..8aaf3e830 100644 --- a/designer_form/src/com/fr/design/designer/creator/XWScaleLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/XWScaleLayout.java @@ -161,4 +161,12 @@ public class XWScaleLayout extends DedicateLayoutContainer { public boolean supportSetVisibleOrEnable(){ return true; } + + /** + * 更新组件及子组件的UI + */ + public void firePropertyChange(){ + XCreator child = getXCreator(INDEX); + child.firePropertyChange(); + } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java b/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java index 7fdb11e66..95e09ec25 100644 --- a/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java +++ b/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java @@ -1,6 +1,7 @@ package com.fr.design.mainframe.widget.ui; import com.fr.design.data.DataCreatorUI; +import com.fr.design.designer.beans.events.DesignerEvent; import com.fr.design.designer.creator.*; import com.fr.design.dialog.BasicScrollPane; import com.fr.design.foldablepane.UIExpandablePane; @@ -205,6 +206,8 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { if (widgetBoundPane != null) { widgetBoundPane.update(); } + xCreator.resetCreatorName(widget.getWidgetName()); + designer.getEditListenerTable().fireCreatorModified(xCreator, DesignerEvent.CREATOR_RENAMED); fireValueChanged(); } @@ -218,8 +221,9 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { } public void fireValueChanged() { - designer.repaint(); - DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); + xCreator.firePropertyChange(); + designer.fireTargetModified(); + designer.refreshDesignerUI(); } public String getIconPath() { diff --git a/designer_form/src/com/fr/design/parameter/RootDesignDefinePane.java b/designer_form/src/com/fr/design/parameter/RootDesignDefinePane.java index 85b84588b..250a7e5c5 100644 --- a/designer_form/src/com/fr/design/parameter/RootDesignDefinePane.java +++ b/designer_form/src/com/fr/design/parameter/RootDesignDefinePane.java @@ -115,7 +115,7 @@ public class RootDesignDefinePane extends AbstractDataModify { displayReport.setSelected(ob.isDelayDisplayContent()); useParamsTemplate.setSelected(ob.isUseParamsTemplate()); designerWidth.setValue(ob.getDesignWidth()); - hAlignmentPane.setSelectedIndex(ob.getPosition()); + hAlignmentPane.setSelectedItem(ob.getPosition()); } @@ -129,7 +129,7 @@ public class RootDesignDefinePane extends AbstractDataModify { JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); jTemplate.needAddTemplateId(useParamsTemplate.isSelected()); wParameterLayout.setBackground((Background) background.getValue()); - wParameterLayout.setPosition(hAlignmentPane.getSelectedIndex()); + wParameterLayout.setPosition((int)hAlignmentPane.getSelectedItem()); return wParameterLayout; } diff --git a/designer_form/src/com/fr/design/widget/ui/designer/LabelDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/LabelDefinePane.java index 50c8c15b6..56393bcb4 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/LabelDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/LabelDefinePane.java @@ -84,7 +84,7 @@ public class LabelDefinePane extends AbstractDataModify