Browse Source

REPORT-3348 自定义值公式输入框触发保存

master
yaoh.wu 7 years ago
parent
commit
fb6f0d20c4
  1. 18
      designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java

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

@ -429,6 +429,14 @@ public class CellDSColumnEditor extends CellQuickEditor {
); );
//自定义值显示 //自定义值显示
valuePane = new CustomValuePane(); valuePane = new CustomValuePane();
valuePane.addListener(new UIObserverListener() {
@Override
public void doChange() {
valuePane.update(cellElement);
fireTargetModified();
}
});
//可扩展性 //可扩展性
JPanel extendableDirectionPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); JPanel extendableDirectionPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
extendableDirectionPane.add(horizontalExtendableCheckBox = new UICheckBox(Inter.getLocText("ExpandD-Horizontal_Extendable"))); extendableDirectionPane.add(horizontalExtendableCheckBox = new UICheckBox(Inter.getLocText("ExpandD-Horizontal_Extendable")));
@ -854,7 +862,6 @@ public class CellDSColumnEditor extends CellQuickEditor {
private JFormulaField formulaField; private JFormulaField formulaField;
public CustomValuePane() { public CustomValuePane() {
this.setLayout(FRGUIPaneFactory.createBoxFlowLayout()); this.setLayout(FRGUIPaneFactory.createBoxFlowLayout());
UILabel customValueLabel = new UILabel("显示值"); UILabel customValueLabel = new UILabel("显示值");
formulaField = new JFormulaField("$$$"); formulaField = new JFormulaField("$$$");
@ -890,6 +897,15 @@ public class CellDSColumnEditor extends CellQuickEditor {
} }
} }
} }
/**
* 添加事件监听器
*
* @param formulaListener 公式输入框改动事件监听器
*/
public void addListener(UIObserverListener formulaListener) {
this.formulaField.addListener(formulaListener);
}
} }
} }
} }
Loading…
Cancel
Save