Browse Source

Pull request #5638: REPORT-50784 单元格文本包含生僻字情况下,双击单元格进入编辑状态后字符无法用默认字体绘制 && 无jira 忽略异常

Merge in DESIGN/design from ~HADES/design:release/10.0 to release/11.0

* commit 'cdbac0ac9f8253772beb6a279e507ec2da36eca5':
  REPORT-50784 单元格文本包含生僻字情况下,双击单元格进入编辑状态后字符无法用默认字体绘制
  无jira 忽略异常
persist/11.0
Hades 3 years ago
parent
commit
291abc4d01
  1. 8
      designer-base/src/main/java/com/fr/design/gui/itextfield/EditTextField.java
  2. 11
      designer-form/src/main/java/com/fr/design/designer/creator/XCreator.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);
}
}

11
designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java

@ -799,10 +799,13 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
popup.setLocation(designer.getLocationOnScreen().x + designer.getPaintX() + extraX, designer.getLocationOnScreen().y + designer.getPaintY() + extraY);
popup.updatePane(designer);
popup.setVisible(selected && accept && popup.hasVisibleButtons() && popup.isCanVisible() && !isShowPluginDialog());
popup.setRelativeBounds(bounds);
try {
popup.setLocation(designer.getLocationOnScreen().x + designer.getPaintX() + extraX, designer.getLocationOnScreen().y + designer.getPaintY() + extraY);
popup.updatePane(designer);
popup.setVisible(selected && accept && popup.hasVisibleButtons() && popup.isCanVisible() && !isShowPluginDialog());
popup.setRelativeBounds(bounds);
} catch (Exception ignored) {
}
}
});
}

Loading…
Cancel
Save