Browse Source

Pull request #12487: REPORT-96966 fix: 手动提到release

Merge in DESIGN/design from ~SKY.LUO/design:release/11.0 to release/11.0

* commit '48c77bea248447999eb0fcede944bc0f4c7494cb':
  REPORT-96966 fix: 手动提到release
newui
Sky.Luo-罗鹏乾 1 year ago
parent
commit
772a80391f
  1. 13
      designer-base/src/main/java/com/fr/design/mainframe/widget/editors/DataBindingEditor.java
  2. 20
      designer-base/src/main/java/com/fr/design/mainframe/widget/editors/WidgetValueEditor.java
  3. 2
      designer-form/src/main/java/com/fr/design/widget/ui/designer/component/FormWidgetValuePane.java

13
designer-base/src/main/java/com/fr/design/mainframe/widget/editors/DataBindingEditor.java

@ -29,8 +29,8 @@ public class DataBindingEditor extends Editor<DataBinding> {
private final static int HORI_GAP = 1; private final static int HORI_GAP = 1;
private final static int VER_GAP = 7; private final static int VER_GAP = 7;
private TableDataComboBox tableDataComboBox; protected TableDataComboBox tableDataComboBox;
private LazyComboBox columnNameComboBox; protected LazyComboBox columnNameComboBox;
private ItemListener tableDataComboBoxListener = new ItemListener() { private ItemListener tableDataComboBoxListener = new ItemListener() {
public void itemStateChanged(ItemEvent evt) { public void itemStateChanged(ItemEvent evt) {
boolean isInit = columnNameComboBox.getSelectedIndex() == -1; boolean isInit = columnNameComboBox.getSelectedIndex() == -1;
@ -87,9 +87,16 @@ public class DataBindingEditor extends Editor<DataBinding> {
} }
}); });
columnNameComboBox.setEditable(true); columnNameComboBox.setEditable(true);
addComboBoxesAndSetPosition();
columnNameComboBox.addItemListener(columnNameComboboxListener);
}
/**
* 根据需求不同调整下拉框的位置
*/
protected void addComboBoxesAndSetPosition() {
this.add(tableDataComboBox, BorderLayout.NORTH); this.add(tableDataComboBox, BorderLayout.NORTH);
this.add(columnNameComboBox, BorderLayout.CENTER); this.add(columnNameComboBox, BorderLayout.CENTER);
columnNameComboBox.addItemListener(columnNameComboboxListener);
} }
protected TableDataSource getTableDataSource() { protected TableDataSource getTableDataSource() {

20
designer-base/src/main/java/com/fr/design/mainframe/widget/editors/WidgetValueEditor.java

@ -5,6 +5,7 @@
package com.fr.design.mainframe.widget.editors; package com.fr.design.mainframe.widget.editors;
import java.awt.Component; import java.awt.Component;
import java.awt.BorderLayout;
import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener; import java.beans.PropertyChangeListener;
@ -30,6 +31,7 @@ public class WidgetValueEditor extends AbstractPropertyEditor {
/** /**
* 根据类型创建 * 根据类型创建
* 服务器 - 控件管理
* @param type 类型 * @param type 类型
* @param onlyServer 是否是服务器 * @param onlyServer 是否是服务器
* @return 编辑器 * @return 编辑器
@ -41,7 +43,7 @@ public class WidgetValueEditor extends AbstractPropertyEditor {
case DataControl.TYPE_FORMULA: case DataControl.TYPE_FORMULA:
return new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Parameter_Formula")); return new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Parameter_Formula"));
case DataControl.TYPE_DATABINDING: case DataControl.TYPE_DATABINDING:
return onlyServer ? new ServerDataBindingEditor() : new DataBindingEditor(); return onlyServer ? new WidgetValueServerDataBindingEditor() : new WidgetValueDataBindingEditor();
case DataControl.TYPE_STRING: case DataControl.TYPE_STRING:
return new TextEditor(); return new TextEditor();
case DataControl.TYPE_BOOLEAN: case DataControl.TYPE_BOOLEAN:
@ -71,6 +73,22 @@ public class WidgetValueEditor extends AbstractPropertyEditor {
return editor; return editor;
} }
private static class WidgetValueDataBindingEditor extends DataBindingEditor {
@Override
protected void addComboBoxesAndSetPosition() {
this.add(tableDataComboBox, BorderLayout.CENTER);
this.add(columnNameComboBox, BorderLayout.EAST);
}
}
private static class WidgetValueServerDataBindingEditor extends ServerDataBindingEditor {
@Override
protected void addComboBoxesAndSetPosition() {
this.add(tableDataComboBox, BorderLayout.CENTER);
this.add(columnNameComboBox, BorderLayout.EAST);
}
}
public WidgetValueEditor(Object o) { public WidgetValueEditor(Object o) {
this(o, false); this(o, false);
} }

2
designer-form/src/main/java/com/fr/design/widget/ui/designer/component/FormWidgetValuePane.java

@ -63,7 +63,7 @@ public class FormWidgetValuePane extends JPanel {
/** /**
* 根据类型创建 * 根据类型创建
* * 设计器右侧控件设置 - 属性
* @param type 类型 * @param type 类型
* @param onlyServer 是否是服务器 * @param onlyServer 是否是服务器
* @return 编辑器 * @return 编辑器

Loading…
Cancel
Save