Browse Source

REPORT-3694 [9.0一轮回归]设计器参数界面控件无法设置

master
kerry 7 years ago
parent
commit
b5ab960678
  1. 15
      designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java
  2. 7
      designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java

15
designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java

@ -49,6 +49,7 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope
private CardLayout cardLayout; // 卡片布局,选中参数面板时显示mobileWidgetTable,选中body时显示mobileBodyWidgetTable private CardLayout cardLayout; // 卡片布局,选中参数面板时显示mobileWidgetTable,选中body时显示mobileBodyWidgetTable
private JTableHeader header;//把表头单独get出来作为一个组件 private JTableHeader header;//把表头单独get出来作为一个组件
private UIHeadGroup tabsHeaderIconPane; private UIHeadGroup tabsHeaderIconPane;
private XComponent lastAffectedCreator;
public static WidgetPropertyPane getInstance() { public static WidgetPropertyPane getInstance() {
@ -132,9 +133,7 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope
*/ */
private void createPropertyTable() { private void createPropertyTable() {
formWidgetCardPane = new FormWidgetCardPane(designer); formWidgetCardPane = new FormWidgetCardPane(designer);
designer.addDesignerEditListener(new WidgetPropertyDesignerAdapter(formWidgetCardPane)); designer.addDesignerEditListener(new WidgetPropertyDesignerAdapter(formWidgetCardPane));
psp = new UIScrollPane(formWidgetCardPane); // 用来装载属性表table psp = new UIScrollPane(formWidgetCardPane); // 用来装载属性表table
psp.setBorder(null); psp.setBorder(null);
} }
@ -318,6 +317,7 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope
private class WidgetPropertyDesignerAdapter implements DesignerEditListener { private class WidgetPropertyDesignerAdapter implements DesignerEditListener {
FormWidgetCardPane formWidgetCardPane; FormWidgetCardPane formWidgetCardPane;
WidgetPropertyDesignerAdapter(FormWidgetCardPane formWidgetCardPane) { WidgetPropertyDesignerAdapter(FormWidgetCardPane formWidgetCardPane) {
this.formWidgetCardPane = formWidgetCardPane; this.formWidgetCardPane = formWidgetCardPane;
} }
@ -329,14 +329,20 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope
|| evt.getCreatorEventID() == DesignerEvent.CREATOR_RESIZED) { || evt.getCreatorEventID() == DesignerEvent.CREATOR_RESIZED) {
formWidgetCardPane.populate(); formWidgetCardPane.populate();
}else if(evt.getCreatorEventID() == DesignerEvent.CREATOR_SELECTED){ }else if(evt.getCreatorEventID() == DesignerEvent.CREATOR_SELECTED){
formWidgetCardPane = new FormWidgetCardPane(designer); // 防止多次触发
if (lastAffectedCreator != null && lastAffectedCreator == evt.getAffectedCreator()) {
formWidgetCardPane.populate();
return;
}
lastAffectedCreator = evt.getAffectedCreator();
refreshDockingView();
formWidgetCardPane.populate(); formWidgetCardPane.populate();
} }
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
return o instanceof WidgetPropertyDesignerAdapter && ((WidgetPropertyDesignerAdapter) o).formWidgetCardPane == this.formWidgetCardPane; return o instanceof WidgetPropertyDesignerAdapter;
} }
} }
@ -345,7 +351,6 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope
*/ */
private class EventPropertyDesignerAdapter implements DesignerEditListener { private class EventPropertyDesignerAdapter implements DesignerEditListener {
EventPropertyTable propertyTable; EventPropertyTable propertyTable;
private XComponent lastAffectedCreator;
EventPropertyDesignerAdapter(EventPropertyTable eventTable) { EventPropertyDesignerAdapter(EventPropertyTable eventTable) {
this.propertyTable = eventTable; this.propertyTable = eventTable;

7
designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java

@ -27,7 +27,7 @@ import java.awt.*;
* Created by ibm on 2017/7/25. * Created by ibm on 2017/7/25.
*/ */
public class FormWidgetCardPane extends AbstractAttrNoScrollPane { public class FormWidgetCardPane extends AbstractAttrNoScrollPane {
private AttributeChangeListener listener2; private AttributeChangeListener listener;
private FormDesigner designer; private FormDesigner designer;
//当前的编辑器属性定义面板 //当前的编辑器属性定义面板
private DataModify<Widget> currentEditorDefinePane; private DataModify<Widget> currentEditorDefinePane;
@ -81,7 +81,6 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane {
} else { } else {
return null; return null;
} }
} }
/** /**
@ -138,7 +137,7 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane {
jPanel.add(attriCardPane, BorderLayout.CENTER); jPanel.add(attriCardPane, BorderLayout.CENTER);
this.listener2 = new AttributeChangeListener() { this.listener = new AttributeChangeListener() {
@Override @Override
public void attributeChange() { public void attributeChange() {
updateCreator(); updateCreator();
@ -196,7 +195,7 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane {
} }
widgetPropertyPane.populate(cellWidget); widgetPropertyPane.populate(cellWidget);
reinitAllListeners(); reinitAllListeners();
this.addAttributeChangeListener(listener2); this.addAttributeChangeListener(listener);
} }

Loading…
Cancel
Save