Browse Source

Pull request #2411: REPORT-38618 【回归】表单-下方缩放缩小之后,拖入tab块,查看右侧边框线消失

Merge in DESIGN/design from ~KERRY/design_10.0:release/10.0 to release/10.0

* commit '31f74c939267b32f710b70f200b075b77ffd9e68':
  REPORT-38618 【回归】表单-下方缩放缩小之后,拖入tab块,查看右侧边框线消失
  REPORT-39601 在单元格中插入 富文本。 字体设置为14的时候,自动给我变成13了
feature/big-screen
kerry 4 years ago
parent
commit
2101c7b9ea
  1. 19
      designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java

19
designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java

@ -22,10 +22,12 @@ import com.fr.form.main.parameter.FormParameterUI;
import com.fr.page.WatermarkPainter; import com.fr.page.WatermarkPainter;
import com.fr.report.core.ReportUtils; import com.fr.report.core.ReportUtils;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.Constants;
import javax.swing.*; import javax.swing.*;
import javax.swing.plaf.ComponentUI; import javax.swing.plaf.ComponentUI;
import java.awt.AlphaComposite; import java.awt.AlphaComposite;
import java.awt.Color;
import java.awt.Component; import java.awt.Component;
import java.awt.Graphics; import java.awt.Graphics;
import java.awt.Graphics2D; import java.awt.Graphics2D;
@ -41,6 +43,8 @@ import java.util.ArrayList;
*/ */
public class FormDesignerUI extends ComponentUI { public class FormDesignerUI extends ComponentUI {
private static final Color DESIGNER_BORDER_COLOR = new Color(198, 198, 198);
// 当前的设计器 // 当前的设计器
private FormDesigner designer; private FormDesigner designer;
private SelectionModel selectionModel; private SelectionModel selectionModel;
@ -90,7 +94,7 @@ public class FormDesignerUI extends ComponentUI {
designer.getDrawLineHelper().drawAuxiliaryLine(g); designer.getDrawLineHelper().drawAuxiliaryLine(g);
return; return;
} }
paintBorder(g);
paintSelection(g); paintSelection(g);
if (DesignerMode.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
@ -275,6 +279,19 @@ public class FormDesignerUI extends ComponentUI {
clipg.dispose(); clipg.dispose();
} }
public void paintBorder(Graphics g) {
Rectangle bounds = designer.getTopContainer().getBounds();
bounds.x = -designer.getHorizontalScaleValue();
bounds.y = -designer.getVerticalScaleValue();
Graphics clipg = g.create();
clipg.clipRect(bounds.x, bounds.y, bounds.width, bounds.height);
Color oldColor = g.getColor();
g.setColor(DESIGNER_BORDER_COLOR);
GraphHelper.draw(g, bounds, Constants.LINE_THIN);
clipg.dispose();
g.setColor(oldColor);
}
/** /**
* 画出当前选择拖拽状态框 * 画出当前选择拖拽状态框
* *

Loading…
Cancel
Save