Browse Source

代码修改

final/10.0
kerry 4 years ago
parent
commit
a66a183f2f
  1. 38
      designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java

38
designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java

@ -363,7 +363,7 @@ public class EditingMouseListener extends MouseInputAdapter {
designer.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
} // component.getParent() 是报表块所在的XWTitleLayout
int minX = button.getX() + getParentPositionX(component, 0) - designer.getHorizontalScaleValue();
int minY = button.getY() + getParentPositionY(component, 0) - designer.getVerticalScaleValue() + xElementCase.getY();
int minY = button.getY() + getParentPositionY(component, 0) - designer.getVerticalScaleValue();
if (e.getX() + GAP - xElementCase.getInsets().left > minX && e.getX() - GAP - xElementCase.getInsets().left < minX + button.getWidth()) {
if (e.getY() + GAP - xElementCase.getInsets().top > minY && e.getY() - GAP - xElementCase.getInsets().top < minY + button.getHeight()) {
designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
@ -405,7 +405,16 @@ public class EditingMouseListener extends MouseInputAdapter {
}
private void setCoverPaneNotDisplay(XCreator component, MouseEvent e, boolean isLinkedHelpDialog) {
if (xElementCase != null) {
int x = getParentPositionX(xElementCase, 0) - designer.getArea().getHorizontalValue();
int y = getParentPositionY(xElementCase, 0) - designer.getArea().getVerticalValue();
Rectangle rect = new Rectangle(x, y, xElementCase.getWidth(), xElementCase.getHeight());
if (rect.contains(e.getPoint())) {
return;
}
xElementCase.displayCoverPane(false);
}
if (xChartEditor != null) {
xChartEditor.displayCoverPane(false);
}
@ -416,15 +425,6 @@ public class EditingMouseListener extends MouseInputAdapter {
if (xTopLayoutContainer != null) {
xTopLayoutContainer.setMouseEnter(false);
}
//不知道为什么要对XElementCase进行判断,但是直接return会有bug,所以把他放在最后
if (xElementCase != null) {
int x = getParentPositionX(xElementCase, 0) - designer.getArea().getHorizontalValue();
int y = getParentPositionY(xElementCase, 0) - designer.getArea().getVerticalValue();
Rectangle rect = new Rectangle(x, y, xElementCase.getWidth(), xElementCase.getHeight());
if (!rect.contains(e.getPoint())) {
xElementCase.displayCoverPane(false);
}
}
designer.repaint();
}
@ -462,7 +462,7 @@ public class EditingMouseListener extends MouseInputAdapter {
designer.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}
int minX = button.getX() + getParentPositionX(component, 0) - designer.getHorizontalScaleValue();
int minY = button.getY() + getParentPositionY(component, 0) - designer.getVerticalScaleValue() + xChartEditor.getY();
int minY = button.getY() + getParentPositionY(component, 0) - designer.getVerticalScaleValue();
if (e.getX() + GAP > minX && e.getX() - GAP < minX + button.getWidth()) {
if (e.getY() + GAP > minY && e.getY() - GAP < minY + button.getHeight()) {
designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
@ -700,7 +700,6 @@ public class EditingMouseListener extends MouseInputAdapter {
currentXCreator.stopEditing();
currentXCreator = null;
currentEditor = null;
refreshTopXCreator();
return true;
}
return true;
@ -728,19 +727,4 @@ public class EditingMouseListener extends MouseInputAdapter {
}
currentEditor.getEditorTarget().setBounds(bounds);
}
/**
* 刷新顶层组件
* */
public void refreshTopXCreator(boolean isEditing){
designer.refreshTopXCreator(isEditing);
}
/**
* 刷新顶层组件
* */
public void refreshTopXCreator(){
refreshTopXCreator(false);
}
}

Loading…
Cancel
Save