|
|
|
@ -867,8 +867,12 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
|
|
|
|
|
if (checkResult.isValid()) { |
|
|
|
|
showMessageDialog(checkResult.getTips(), checkResult.isValid()); |
|
|
|
|
} else { |
|
|
|
|
String position = Toolkit.i18nText("Fine-Design_Basic_Formula_The") + (checkResult.getFormulaCoordinates().getColumns()) |
|
|
|
|
+ Toolkit.i18nText("Fine-Design_Basic_Formula_Error_Position") + " "; |
|
|
|
|
int columns = checkResult.getFormulaCoordinates().getColumns(); |
|
|
|
|
String position = StringUtils.EMPTY; |
|
|
|
|
if (columns >= 0) { |
|
|
|
|
position = Toolkit.i18nText("Fine-Design_Basic_Formula_The") + columns |
|
|
|
|
+ Toolkit.i18nText("Fine-Design_Basic_Formula_Error_Position") + " "; |
|
|
|
|
} |
|
|
|
|
int confirmDialog = FineJOptionPane.showConfirmDialog( |
|
|
|
|
FormulaPane.this, |
|
|
|
|
position + messageTips, |
|
|
|
@ -879,7 +883,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
|
|
|
|
|
new String[]{Toolkit.i18nText("Fine-Design_Basic_Formula_Check_Result"), Toolkit.i18nText("Fine-Design_Basic_Formula_Continue")}, |
|
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Formula_Check_Result")); |
|
|
|
|
if (confirmDialog == 0) { |
|
|
|
|
formulaTextArea.setCaretPosition(checkResult.getFormulaCoordinates().getColumns()); |
|
|
|
|
formulaTextArea.setCaretPosition(Math.max(columns, 0)); |
|
|
|
|
formulaTextArea.requestFocus(); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|