Browse Source

Merge pull request #1101 in BA/design from ~KERRY/design:release/9.0 to release/9.0

* commit 'e25e5da475e6e81a7f700b34f61a88a0b5adb836':
  代码调整
  REPORT-3694 [9.0一轮回归]设计器参数界面控件无法设置
master
superman 7 years ago
parent
commit
4fa493b932
  1. 14
      designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java
  2. 7
      designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java

14
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 JTableHeader header;//把表头单独get出来作为一个组件
private UIHeadGroup tabsHeaderIconPane;
private XComponent lastAffectedCreator;
public static WidgetPropertyPane getInstance() {
@ -132,9 +133,7 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope
*/
private void createPropertyTable() {
formWidgetCardPane = new FormWidgetCardPane(designer);
designer.addDesignerEditListener(new WidgetPropertyDesignerAdapter(formWidgetCardPane));
psp = new UIScrollPane(formWidgetCardPane); // 用来装载属性表table
psp.setBorder(null);
}
@ -318,6 +317,7 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope
private class WidgetPropertyDesignerAdapter implements DesignerEditListener {
FormWidgetCardPane formWidgetCardPane;
WidgetPropertyDesignerAdapter(FormWidgetCardPane formWidgetCardPane) {
this.formWidgetCardPane = formWidgetCardPane;
}
@ -329,14 +329,19 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope
|| evt.getCreatorEventID() == DesignerEvent.CREATOR_RESIZED) {
formWidgetCardPane.populate();
}else if(evt.getCreatorEventID() == DesignerEvent.CREATOR_SELECTED){
formWidgetCardPane = new FormWidgetCardPane(designer);
// 防止多次触发
if (lastAffectedCreator != null && lastAffectedCreator == evt.getAffectedCreator()) {
return;
}
lastAffectedCreator = evt.getAffectedCreator();
refreshDockingView();
formWidgetCardPane.populate();
}
}
@Override
public boolean equals(Object o) {
return o instanceof WidgetPropertyDesignerAdapter && ((WidgetPropertyDesignerAdapter) o).formWidgetCardPane == this.formWidgetCardPane;
return o instanceof WidgetPropertyDesignerAdapter;
}
}
@ -345,7 +350,6 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope
*/
private class EventPropertyDesignerAdapter implements DesignerEditListener {
EventPropertyTable propertyTable;
private XComponent lastAffectedCreator;
EventPropertyDesignerAdapter(EventPropertyTable 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.
*/
public class FormWidgetCardPane extends AbstractAttrNoScrollPane {
private AttributeChangeListener listener2;
private AttributeChangeListener listener;
private FormDesigner designer;
//当前的编辑器属性定义面板
private DataModify<Widget> currentEditorDefinePane;
@ -81,7 +81,6 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane {
} else {
return null;
}
}
/**
@ -138,7 +137,7 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane {
jPanel.add(attriCardPane, BorderLayout.CENTER);
this.listener2 = new AttributeChangeListener() {
this.listener = new AttributeChangeListener() {
@Override
public void attributeChange() {
updateCreator();
@ -196,7 +195,7 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane {
}
widgetPropertyPane.populate(cellWidget);
reinitAllListeners();
this.addAttributeChangeListener(listener2);
this.addAttributeChangeListener(listener);
}

Loading…
Cancel
Save