Browse Source

Merge pull request #5658 in DESIGN/design from release/11.0 to feature/x

* commit '291abc4d0136552006f5e69b86aa73d384c05d6b':
  REPORT-50784 单元格文本包含生僻字情况下,双击单元格进入编辑状态后字符无法用默认字体绘制
  无jira 忽略异常
research/11.0
superman 3 years ago
parent
commit
d00ea3f7bd
  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. * Number Field.
*/ */
public class EditTextField extends UIGridTextField { public class EditTextField extends UIGridTextField {
private static final String I18NProperty = "i18n";
private int maxLength = 24; private int maxLength = 24;
public EditTextField() { public EditTextField() {
@ -39,7 +42,11 @@ public class EditTextField extends UIGridTextField {
} }
class TextDocument extends PlainDocument { class TextDocument extends PlainDocument {
private Object defaultI18NProperty;
public TextDocument() { public TextDocument() {
defaultI18NProperty = getProperty(I18NProperty);
} }
@Override @Override
@ -49,6 +56,7 @@ public class EditTextField extends UIGridTextField {
Toolkit.getDefaultToolkit().beep(); Toolkit.getDefaultToolkit().beep();
return; return;
} }
putProperty(I18NProperty, defaultI18NProperty);
super.insertString(offset, s, a); 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() { SwingUtilities.invokeLater(new Runnable() {
@Override @Override
public void run() { public void run() {
popup.setLocation(designer.getLocationOnScreen().x + designer.getPaintX() + extraX, designer.getLocationOnScreen().y + designer.getPaintY() + extraY); try {
popup.updatePane(designer); popup.setLocation(designer.getLocationOnScreen().x + designer.getPaintX() + extraX, designer.getLocationOnScreen().y + designer.getPaintY() + extraY);
popup.setVisible(selected && accept && popup.hasVisibleButtons() && popup.isCanVisible() && !isShowPluginDialog()); popup.updatePane(designer);
popup.setRelativeBounds(bounds); popup.setVisible(selected && accept && popup.hasVisibleButtons() && popup.isCanVisible() && !isShowPluginDialog());
popup.setRelativeBounds(bounds);
} catch (Exception ignored) {
}
} }
}); });
} }

Loading…
Cancel
Save