|
|
|
@ -21,6 +21,7 @@ import static com.fine.swing.ui.layout.Layouts.cell;
|
|
|
|
|
import static com.fine.swing.ui.layout.Layouts.row; |
|
|
|
|
|
|
|
|
|
public class FloatStringQuickEditor extends FloatQuickEditor { |
|
|
|
|
private static final char FORMULA_BEGINNING = '='; |
|
|
|
|
private final UITextArea stringTextField; |
|
|
|
|
private final UIButton formulaButton; |
|
|
|
|
|
|
|
|
@ -97,7 +98,7 @@ public class FloatStringQuickEditor extends FloatQuickEditor {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void changeReportPaneCell(String tmpText) { |
|
|
|
|
if (tmpText != null && (!tmpText.isEmpty() && tmpText.charAt(0) == '=')) { |
|
|
|
|
if (isFormula(tmpText)) { |
|
|
|
|
BaseFormula textFormula = BaseFormula.createFormulaBuilder().build(tmpText); |
|
|
|
|
textFormula.setReserveInResult(reserveInResult); |
|
|
|
|
textFormula.setReserveOnWriteOrAnaly(reserveOnWriteOrAnaly); |
|
|
|
@ -113,4 +114,9 @@ public class FloatStringQuickEditor extends FloatQuickEditor {
|
|
|
|
|
fireTargetModified(); |
|
|
|
|
stringTextField.requestFocus(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private static boolean isFormula(String tmpText) { |
|
|
|
|
return StringUtils.isNotEmpty(tmpText) |
|
|
|
|
&& tmpText.charAt(0) == FORMULA_BEGINNING; |
|
|
|
|
} |
|
|
|
|
} |