Browse Source

Merge pull request #1167 in BA/design from ~YAOH.WU/a_design_0811:release/9.0 to release/9.0

* commit '033940a959387ee1c2649bc8f772f1d276f195c8':
  REPORT-4267 单元格预定义控件不可用
master
superman 7 years ago
parent
commit
b72c1cdf96
  1. 11
      designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java
  2. 9
      designer/src/com/fr/design/widget/WidgetPane.java

11
designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java

@ -2,18 +2,14 @@ package com.fr.design.mainframe;
import com.fr.base.FRContext;
import com.fr.design.actions.utils.ReportActionUtils;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.present.CellWriteAttrPane;
import com.fr.design.widget.WidgetPane;
import com.fr.form.ui.NoneWidget;
import com.fr.form.ui.Widget;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.grid.selection.CellSelection;
import com.fr.grid.selection.FloatSelection;
import com.fr.grid.selection.Selection;
import com.fr.privilege.finegrain.WidgetPrivilegeControl;
import com.fr.report.cell.CellElement;
@ -43,8 +39,6 @@ public class CellWidgetPropertyPane extends BasicPane {
public CellWidgetPropertyPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
// this.addAttributeChangeListener(listener);
// cellEditorDefPane = new WidgetPane(elementCasePane);
}
public void clear() {
@ -144,14 +138,15 @@ public class CellWidgetPropertyPane extends BasicPane {
return newWidget;
}
@Override
/**
* 检测是否有效
*
* @throws Exception e
*/
@Override
public void checkValid() throws Exception {
this.cellEditorDefPane.checkValid();
}
}

9
designer/src/com/fr/design/widget/WidgetPane.java

@ -129,16 +129,16 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
editorTypeComboBox.setSelectedIndex(-1);
return;
}
// 预定义组件
if (widget instanceof NameWidget) {
String name = ((NameWidget) widget).getName();
shouldFireSelectedEvent = false;
editorTypeComboBox.setSelectedItem(new Item(name, name));
shouldFireSelectedEvent = true;
cellEditorCardPane.populate(widget);
return;
}
// 内置组件
else {
Class clazz = widget.getClass();
if (ArrayUtils.contains(ButtonConstants.CLASSES4BUTTON, clazz)) {
clazz = Button.class;
@ -148,11 +148,10 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
shouldFireSelectedEvent = false;
editorTypeComboBox.setSelectedItemByWidgetClass(clazz);
shouldFireSelectedEvent = true;
}
removeAttributeChangeListener();
initAllListeners();
this.addAttributeChangeListener(listener);
}
public Widget update() {

Loading…
Cancel
Save