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