|
|
|
@ -177,6 +177,7 @@ public class EditingMouseListener extends MouseInputAdapter {
|
|
|
|
|
if (designer.isDrawLineMode()) { |
|
|
|
|
designer.updateDrawLineMode(e); |
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
if (selectionModel.hasSelectionComponent() |
|
|
|
|
&& selectionModel.getSelection().getRelativeBounds().contains( |
|
|
|
|
designer.getHorizontalScaleValue() + e.getX(), |
|
|
|
@ -360,7 +361,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)); |
|
|
|
@ -402,7 +403,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); |
|
|
|
|
} |
|
|
|
@ -413,15 +423,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(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -459,7 +460,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)); |
|
|
|
@ -697,7 +698,6 @@ public class EditingMouseListener extends MouseInputAdapter {
|
|
|
|
|
currentXCreator.stopEditing(); |
|
|
|
|
currentXCreator = null; |
|
|
|
|
currentEditor = null; |
|
|
|
|
refreshTopXCreator(); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
return true; |
|
|
|
@ -725,19 +725,4 @@ public class EditingMouseListener extends MouseInputAdapter {
|
|
|
|
|
} |
|
|
|
|
currentEditor.getEditorTarget().setBounds(bounds); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 刷新顶层组件 |
|
|
|
|
* */ |
|
|
|
|
public void refreshTopXCreator(boolean isEditing){ |
|
|
|
|
designer.refreshTopXCreator(isEditing); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 刷新顶层组件 |
|
|
|
|
* */ |
|
|
|
|
public void refreshTopXCreator(){ |
|
|
|
|
refreshTopXCreator(false); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|