Browse Source

代码修改

feature/big-screen
kerry 4 years ago
parent
commit
b0f6f123f3
  1. 4
      designer-form/src/main/java/com/fr/design/designer/creator/XTextArea.java
  2. 4
      designer-form/src/main/java/com/fr/design/designer/creator/XTextEditor.java

4
designer-form/src/main/java/com/fr/design/designer/creator/XTextArea.java

@ -59,8 +59,10 @@ public class XTextArea extends XFieldEditor {
TextArea area = (TextArea) data;
if (area.getWidgetValue() != null) {
Graphics2D g2d = (Graphics2D) g.create();
FRFont font = FRFont.getInstance();
float fontsize = (float) (font.getSize() * this.getScale());
BaseUtils.drawStringStyleInRotation(g2d, this.getWidth(), this.getHeight(), area.getWidgetValue()
.toString(), Style.getInstance(FRFont.getInstance()).deriveHorizontalAlignment(Constants.LEFT)
.toString(), Style.getInstance(font.applySize(fontsize)).deriveHorizontalAlignment(Constants.LEFT)
.deriveVerticalAlignment(SwingConstants.TOP)
.deriveTextStyle(Style.TEXTSTYLE_WRAPTEXT), ScreenResolution.getScreenResolution());
}

4
designer-form/src/main/java/com/fr/design/designer/creator/XTextEditor.java

@ -67,8 +67,10 @@ public class XTextEditor extends XWrapperedFieldEditor {
TextEditor area = (TextEditor) data;
if (area.getWidgetValue() != null) {
Graphics2D g2d = (Graphics2D) g.create();
FRFont font = FRFont.getInstance();
float fontsize = (float) (font.getSize() * this.getScale());
BaseUtils.drawStringStyleInRotation(g2d, this.getWidth(), this.getHeight(), area.getWidgetValue()
.toString(), Style.getInstance(FRFont.getInstance()).deriveHorizontalAlignment(Constants.LEFT)
.toString(), Style.getInstance(font.applySize(fontsize)).deriveHorizontalAlignment(Constants.LEFT)
.deriveTextStyle(Style.TEXTSTYLE_SINGLELINE), ScreenResolution.getScreenResolution());
}
}

Loading…
Cancel
Save