@ -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 WidgetValue ServerDataBindingEditor( ) : new WidgetValue DataBindingEditor( ) ;
case DataControl . TYPE_STRING :
case DataControl . TYPE_STRING :
return new TextEditor ( ) ;
return new TextEditor ( ) ;
case DataControl . TYPE_BOOLEAN :
case DataControl . TYPE_BOOLEAN :
@ -70,6 +72,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 ) ;