From 1c773e2944ba63c776dbffe6fd8f2e1c0c24b828 Mon Sep 17 00:00:00 2001 From: kerry Date: Thu, 6 Aug 2020 16:39:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/mainframe/FormDesigner.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java b/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java index aae1b5ef0..b7d8a9a4c 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java @@ -170,7 +170,6 @@ public class FormDesigner extends TargetComponent
implements TreeSelection setFocusTraversalKeysEnabled(false); this.setOpaque(true); this.setBackground(Color.WHITE); - // 初始化 edit = new CreatorEventListenerTable(); selectionModel = new SelectionModel(this); @@ -188,6 +187,11 @@ public class FormDesigner extends TargetComponent implements TreeSelection populateParameterPropertyPane(); } + + public void paintBorder(Graphics g){ + //不绘制designer的边框 + } + /** * 刷新控件树面板 */ @@ -990,6 +994,9 @@ public class FormDesigner extends TargetComponent implements TreeSelection @Nullable public XCreator getComponentAt(int x, int y, XCreator[] except) { XLayoutContainer container = y + this.getPaintY() < paraHeight - formArea.getVerticalValue() ? paraComponent : rootComponent; + if (container == null) { + container = rootComponent; + } XCreator comp = xCreatorAt(x + (int)(formArea.getHorizontalValue()/scale), (int)(y + formArea.getVerticalValue()/scale), container, except); return comp == null ? container : comp; @@ -1580,6 +1587,7 @@ public class FormDesigner extends TargetComponent implements TreeSelection return Math.max(y, 0); } + public int getRelativeX(int x) { return (int) ((x - this.getPaintX()) / this.getScale()); }