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