|
|
@ -83,10 +83,12 @@ import java.awt.Component; |
|
|
|
import java.awt.Container; |
|
|
|
import java.awt.Container; |
|
|
|
import java.awt.Dimension; |
|
|
|
import java.awt.Dimension; |
|
|
|
import java.awt.Graphics; |
|
|
|
import java.awt.Graphics; |
|
|
|
|
|
|
|
import java.awt.Graphics2D; |
|
|
|
import java.awt.Insets; |
|
|
|
import java.awt.Insets; |
|
|
|
import java.awt.Point; |
|
|
|
import java.awt.Point; |
|
|
|
import java.awt.Rectangle; |
|
|
|
import java.awt.Rectangle; |
|
|
|
import java.awt.event.MouseEvent; |
|
|
|
import java.awt.event.MouseEvent; |
|
|
|
|
|
|
|
import java.awt.geom.AffineTransform; |
|
|
|
import java.awt.image.BufferedImage; |
|
|
|
import java.awt.image.BufferedImage; |
|
|
|
import java.lang.reflect.InvocationHandler; |
|
|
|
import java.lang.reflect.InvocationHandler; |
|
|
|
import java.lang.reflect.Method; |
|
|
|
import java.lang.reflect.Method; |
|
|
@ -993,7 +995,7 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection |
|
|
|
|
|
|
|
|
|
|
|
@Nullable |
|
|
|
@Nullable |
|
|
|
public XCreator getComponentAt(int x, int y, XCreator[] except) { |
|
|
|
public XCreator getComponentAt(int x, int y, XCreator[] except) { |
|
|
|
XLayoutContainer container = y + this.getPaintY() < paraHeight - formArea.getVerticalValue() ? paraComponent : rootComponent; |
|
|
|
XLayoutContainer container = y < paraHeight - formArea.getVerticalValue() ? paraComponent : rootComponent; |
|
|
|
if (container == null) { |
|
|
|
if (container == null) { |
|
|
|
container = rootComponent; |
|
|
|
container = rootComponent; |
|
|
|
} |
|
|
|
} |
|
|
@ -1281,6 +1283,21 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection |
|
|
|
this.formArea = formArea; |
|
|
|
this.formArea = formArea; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void paint(Graphics g){ |
|
|
|
|
|
|
|
//重新设置下绘制的起点和缩放幅度
|
|
|
|
|
|
|
|
AffineTransform at = new AffineTransform(); |
|
|
|
|
|
|
|
if (rootComponent.getParent() != null) { |
|
|
|
|
|
|
|
at.translate(this.getPaintX(), this.getPaintY()); |
|
|
|
|
|
|
|
at.scale(this.getScale(), this.getScale()); |
|
|
|
|
|
|
|
Graphics2D g2 = (Graphics2D) g; |
|
|
|
|
|
|
|
g2.transform(at); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
super.paint(g); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 绘制组件根节点 |
|
|
|
* 绘制组件根节点 |
|
|
|
* |
|
|
|
* |
|
|
|