Browse Source

代码修改

feature/big-screen
kerry 4 years ago
parent
commit
1c773e2944
  1. 10
      designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java

10
designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java

@ -170,7 +170,6 @@ public class FormDesigner extends TargetComponent<Form> 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<Form> implements TreeSelection
populateParameterPropertyPane();
}
public void paintBorder(Graphics g){
//不绘制designer的边框
}
/**
* 刷新控件树面板
*/
@ -990,6 +994,9 @@ public class FormDesigner extends TargetComponent<Form> 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<Form> implements TreeSelection
return Math.max(y, 0);
}
public int getRelativeX(int x) {
return (int) ((x - this.getPaintX()) / this.getScale());
}

Loading…
Cancel
Save