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