Browse Source

REPORT-3348 结果集筛选 公式输入框触发保存

master
yaoh.wu 7 years ago
parent
commit
8ccc9e0696
  1. 39
      designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java
  2. 8
      designer_base/src/com/fr/design/selection/QuickEditor.java

39
designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java

@ -409,16 +409,24 @@ public class CellDSColumnEditor extends CellQuickEditor {
sortPane.update(cellElement);
fireTargetModified();
}
});
}
);
//结果筛选
filterPane = new ResultSetFilterConfigPane();
filterPane.addListener(new ActionListener() {
filterPane.addListener(new UIObserverListener() {
@Override
public void doChange() {
filterPane.update(cellElement);
fireTargetModified();
}
}, new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
filterPane.update(cellElement);
fireTargetModified();
}
});
}
);
//自定义值显示
valuePane = new CustomValuePane();
//可扩展性
@ -564,6 +572,12 @@ public class CellDSColumnEditor extends CellQuickEditor {
}
}
/**
* 添加事件监听器
*
* @param formulaChangeListener 公式输入框改动事件监听器
* @param changeListener 排序类型下拉框改动事件监听器
*/
public void addListener(UIObserverListener formulaChangeListener, ChangeListener changeListener) {
tinyFormulaPane.registerChangeListener(formulaChangeListener);
sortTypePane.addChangeListener(changeListener);
@ -729,7 +743,15 @@ public class CellDSColumnEditor extends CellQuickEditor {
}
}
public void addListener(ActionListener actionListener) {
/**
* 添加事件监听器
*
* @param formulaListener 公式输入框改动事件监听器
* @param actionListener 筛选类型下拉框改动事件监听器
*/
public void addListener(UIObserverListener formulaListener, ActionListener actionListener) {
topFormulaPane.addListener(formulaListener);
bottomFormulaPane.addListener(formulaListener);
rsComboBox.addActionListener(actionListener);
}
}
@ -781,6 +803,15 @@ public class CellDSColumnEditor extends CellQuickEditor {
return this.formulaTextField.getText();
}
/**
* 添加事件监听器
*
* @param listener 公式文本输入框改动事件监听器
*/
public void addListener(UIObserverListener listener) {
this.formulaTextField.registerChangeListener(listener);
}
private ActionListener formulaButtonActionListener = new ActionListener() {
public void actionPerformed(ActionEvent evt) {
Formula valueFormula = new Formula();

8
designer_base/src/com/fr/design/selection/QuickEditor.java

@ -1,9 +1,9 @@
package com.fr.design.selection;
import javax.swing.JComponent;
import com.fr.design.designer.TargetComponent;
import javax.swing.*;
/**
* 快速编辑区域
*
@ -33,7 +33,7 @@ public abstract class QuickEditor<T extends TargetComponent> extends JComponent
* 触发保存一定要用这个
*/
protected void fireTargetModified() {
if(!isEditing) {
if (!isEditing) {
return;
}
tc.fireTargetModified();
@ -45,7 +45,7 @@ public abstract class QuickEditor<T extends TargetComponent> extends JComponent
/**
* for 关闭时候释放
*/
public void release () {
public void release() {
tc = null;
}

Loading…
Cancel
Save