Browse Source

REPORT-50784 单元格文本包含生僻字情况下,双击单元格进入编辑状态后字符无法用默认字体绘制

zheng-1641779399395
hades 3 years ago
parent
commit
cdbac0ac9f
  1. 8
      designer-base/src/main/java/com/fr/design/gui/itextfield/EditTextField.java

8
designer-base/src/main/java/com/fr/design/gui/itextfield/EditTextField.java

@ -13,6 +13,9 @@ import javax.swing.text.PlainDocument;
* Number Field.
*/
public class EditTextField extends UIGridTextField {
private static final String I18NProperty = "i18n";
private int maxLength = 24;
public EditTextField() {
@ -39,7 +42,11 @@ public class EditTextField extends UIGridTextField {
}
class TextDocument extends PlainDocument {
private Object defaultI18NProperty;
public TextDocument() {
defaultI18NProperty = getProperty(I18NProperty);
}
@Override
@ -49,6 +56,7 @@ public class EditTextField extends UIGridTextField {
Toolkit.getDefaultToolkit().beep();
return;
}
putProperty(I18NProperty, defaultI18NProperty);
super.insertString(offset, s, a);
}
}

Loading…
Cancel
Save