Browse Source

Pull request #2086: REPORT-37460 && REPORT-37526 【frm设计界面支持缩放】模板放大后,点击报表块编辑,双击才能生效,缩小模板100%,单击就可以

Merge in DESIGN/design from ~KERRY/design_10.0:release/10.0 to release/10.0

* commit '7cc9abc8586ea9cd6226447572aec980d0b3c2aa':
  REPORT-37460 && REPORT-37526 【frm设计界面支持缩放】模板放大后,点击报表块编辑,双击才能生效,缩小模板100%,单击就可以
feature/big-screen
kerry 4 years ago
parent
commit
057f0070c9
  1. 16
      designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java
  2. 2
      designer-form/src/main/java/com/fr/design/mainframe/FormArea.java

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

@ -327,8 +327,8 @@ public class EditingMouseListener extends MouseInputAdapter {
if (designer.getCursor().getType() == Cursor.HAND_CURSOR) {
designer.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
} // component.getParent() 是报表块所在的XWTitleLayout
int minX = button.getX() + getParentPositionX(component, 0) - designer.getArea().getHorizontalValue();
int minY = button.getY() + getParentPositionY(component, 0) - designer.getArea().getVerticalValue();
int minX = button.getX() + getParentPositionX(component, 0) - designer.getHorizontalScaleValue();
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));
@ -342,8 +342,8 @@ public class EditingMouseListener extends MouseInputAdapter {
if (component.getCoverPane() != null) {
if (component.getCoverPane().getComponentCount() > 1) {
JComponent button1 = (JComponent) component.getCoverPane().getComponent(1);
int minX1 = button1.getX() + getParentPositionX(component, 0) - designer.getArea().getHorizontalValue();
int minY1 = button1.getY() + getParentPositionY(component, 0) - designer.getArea().getVerticalValue();
int minX1 = button1.getX() + getParentPositionX(component, 0) - designer.getHorizontalScaleValue();
int minY1 = button1.getY() + getParentPositionY(component, 0) - designer.getVerticalScaleValue();
if (e.getX() + GAP - component.getInsets().left > minX1 && e.getX() - GAP - component.getInsets().left < minX1 + button1.getWidth()) {
if (e.getY() + GAP - component.getInsets().top > minY1 && e.getY() - GAP - component.getInsets().top < minY1 + button1.getHeight()) {
designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
@ -358,8 +358,8 @@ public class EditingMouseListener extends MouseInputAdapter {
if (StringUtils.isEmpty(component.toData().getDescription())) {
return;
}
int minX1 = getParentPositionX(component, component.getX()) + component.getWidth() - ShareConstants.SHARE_EL_CONTROL_BUTTON_HW - designer.getArea().getHorizontalValue();
int minY1 = getParentPositionY(component, component.getY()) - designer.getArea().getVerticalValue();
int minX1 = getParentPositionX(component, component.getX()) + component.getWidth() - ShareConstants.SHARE_EL_CONTROL_BUTTON_HW - designer.getHorizontalScaleValue();
int minY1 = getParentPositionY(component, component.getY()) - designer.getVerticalScaleValue();
if (e.getX() + GAP - component.getInsets().left > minX1 && e.getX() - GAP - component.getInsets().left < minX1 + ShareConstants.SHARE_EL_CONTROL_BUTTON_HW) {
if (e.getY() + GAP - component.getInsets().top > minY1 && e.getY() - GAP - component.getInsets().top < minY1 + ShareConstants.SHARE_EL_CONTROL_BUTTON_HW) {
designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
@ -426,8 +426,8 @@ public class EditingMouseListener extends MouseInputAdapter {
if (designer.getCursor().getType() == Cursor.HAND_CURSOR) {
designer.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}
int minX = button.getX() + getParentPositionX(component, 0) - designer.getArea().getHorizontalValue();
int minY = button.getY() + getParentPositionY(component, 0) - designer.getArea().getVerticalValue();
int minX = button.getX() + getParentPositionX(component, 0) - designer.getHorizontalScaleValue();
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));

2
designer-form/src/main/java/com/fr/design/mainframe/FormArea.java

@ -773,7 +773,7 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
heightPane.setValue(height);
reCalculateHeight((int) height);
}
if (designer.getRootComponent().acceptType(XWFitLayout.class) && AssistUtils.equals(slide, DEFAULT_SLIDER) ) {
if (designer.getRootComponent().acceptType(XWFitLayout.class) && AssistUtils.equals(screenValue, DEFAULT_SLIDER) ) {
XWFitLayout layout = (XWFitLayout) designer.getRootComponent();
// 撤销时先refreshRoot了,此处去掉内边距再增加间隔
layout.moveContainerMargin();

Loading…
Cancel
Save