|
|
|
@ -106,10 +106,15 @@ public class CellFormulaQuickEditor extends CellQuickEditor {
|
|
|
|
|
formulaButton.addActionListener(new ActionListener() { |
|
|
|
|
public void actionPerformed(ActionEvent evt) { |
|
|
|
|
final UIFormula formulaPane = FormulaFactory.createFormulaPaneWhenReserveFormula(); |
|
|
|
|
CellSelection cellSelection = (CellSelection)tc.getSelection(); |
|
|
|
|
editingCellElement = tc.getEditingElementCase().getTemplateCellElement(cellSelection.getColumn(),cellSelection.getRow()); |
|
|
|
|
BaseFormula baseFormula = (BaseFormula) editingCellElement.getValue(); |
|
|
|
|
formulaPane.populate(baseFormula); |
|
|
|
|
CellSelection cellSelection = (CellSelection) tc.getSelection(); |
|
|
|
|
editingCellElement = tc.getEditingElementCase().getTemplateCellElement(cellSelection.getColumn(), cellSelection.getRow()); |
|
|
|
|
Object object = editingCellElement.getValue(); |
|
|
|
|
if (object instanceof BaseFormula) { |
|
|
|
|
formulaPane.populate((BaseFormula) object); |
|
|
|
|
} else { |
|
|
|
|
String text = formulaTextField.getText(); |
|
|
|
|
formulaPane.populate(BaseFormula.createFormulaBuilder().build(text)); |
|
|
|
|
} |
|
|
|
|
formulaPane.showLargeWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() { |
|
|
|
|
@Override |
|
|
|
|
public void doOk() { |
|
|
|
|