From 7550b934e7bec0d10f4eef29f184932c06d7df99 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Thu, 10 Nov 2016 14:36:41 +0800 Subject: [PATCH 1/3] rt --- designer_form/src/com/fr/design/mainframe/JForm.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/mainframe/JForm.java b/designer_form/src/com/fr/design/mainframe/JForm.java index bbc1706d9b..ddaf79e5b7 100644 --- a/designer_form/src/com/fr/design/mainframe/JForm.java +++ b/designer_form/src/com/fr/design/mainframe/JForm.java @@ -609,15 +609,16 @@ public class JForm extends JTemplate implements BaseJForm { EastRegionContainerPane.getInstance().replaceDownPane(RolesAlreadyEditedPane.getInstance()); return; } + if (formDesign.isReportBlockEditing()) { if (elementCaseDesign != null) { + EastRegionContainerPane.getInstance().removeParameterPane(); EastRegionContainerPane.getInstance().replaceDownPane(elementCaseDesign.getEastDownPane()); EastRegionContainerPane.getInstance().replaceUpPane(elementCaseDesign.getEastUpPane()); return; } } - EastRegionContainerPane.getInstance().replaceUpPane(WidgetPropertyPane.getInstance(formDesign)); EastRegionContainerPane.getInstance().addParameterPane(ParameterPropertyPane.getInstance(formDesign)); if (EastRegionContainerPane.getInstance().getDownPane() == null) { From 9b969909a264ff2e8d74f2042cd7b780cc676fcf Mon Sep 17 00:00:00 2001 From: zhouping Date: Thu, 10 Nov 2016 17:38:18 +0800 Subject: [PATCH 2/3] =?UTF-8?q?REPORT-750=20=E8=A1=A8=E5=8D=95=E5=85=B1?= =?UTF-8?q?=E5=88=9B=E5=86=85=E6=B5=8B=E9=97=AE=E9=A2=98=20bugfix5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/designer/creator/XCreator.java | 16 ++++++++++ .../designer/creator/XWAbsoluteLayout.java | 32 +++++++++++++++++++ .../design/designer/creator/XWFitLayout.java | 2 ++ 3 files changed, 50 insertions(+) diff --git a/designer_form/src/com/fr/design/designer/creator/XCreator.java b/designer_form/src/com/fr/design/designer/creator/XCreator.java index d47009ff95..ed692cd428 100644 --- a/designer_form/src/com/fr/design/designer/creator/XCreator.java +++ b/designer_form/src/com/fr/design/designer/creator/XCreator.java @@ -601,4 +601,20 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo } } + + /** + * 按照比例调整组件的宽度 + * @param percent 比例 + */ + public void adjustCompWidth(double percent){ + return; + } + + /** + * 按照比例调整组件的高度 + * @param percent 比例 + */ + public void adjustCompHeight(double percent) { + return; + } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/XWAbsoluteLayout.java b/designer_form/src/com/fr/design/designer/creator/XWAbsoluteLayout.java index 210343f8ed..df28759393 100644 --- a/designer_form/src/com/fr/design/designer/creator/XWAbsoluteLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/XWAbsoluteLayout.java @@ -444,4 +444,36 @@ public class XWAbsoluteLayout extends XLayoutContainer { } } } + + /** + * body大小手动调整的时候 + * 按照比例调整组件的宽度 + * @param percent 比例 + */ + @Override + public void adjustCompWidth(double percent) { + for (int i = 0; i < getComponentCount(); i++) { + XCreator xCreator = (XCreator) getComponent(i); + Rectangle rectangle = xCreator.getBounds(); + xCreator.setBounds((int) (rectangle.x * percent), rectangle.y, (int) (rectangle.width * percent), rectangle.height); + BoundsWidget widget = toData().getBoundsWidget(xCreator.toData()); + widget.setBounds(xCreator.getBounds()); + } + } + + /** + * body大小手动调整的时候 + * 按照比例调整组件的高度 + * @param percent 比例 + */ + @Override + public void adjustCompHeight(double percent) { + for (int i = 0; i < getComponentCount(); i++) { + XCreator xCreator = (XCreator) getComponent(i); + Rectangle rectangle = xCreator.getBounds(); + xCreator.setBounds(rectangle.x, (int) (rectangle.y * percent), rectangle.width, (int) (rectangle.height * percent)); + BoundsWidget widget = toData().getBoundsWidget(xCreator.toData()); + widget.setBounds(xCreator.getBounds()); + } + } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/XWFitLayout.java b/designer_form/src/com/fr/design/designer/creator/XWFitLayout.java index 50fa38db93..04904a7238 100644 --- a/designer_form/src/com/fr/design/designer/creator/XWFitLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/XWFitLayout.java @@ -381,6 +381,7 @@ public class XWFitLayout extends XLayoutContainer { needAddWidth = Math.max(needAddWidth, MIN_WIDTH-width); } } + creator.adjustCompWidth((double) creator.getBounds().width / rec.width); toData().setBounds(creator.toData(), creator.getBounds()); } @@ -504,6 +505,7 @@ public class XWFitLayout extends XLayoutContainer { needAddHeight = Math.max(needAddHeight, MIN_HEIGHT-h); } } + creator.adjustCompHeight((double) creator.getBounds().height / rec.height); toData().setBounds(creator.toData(), creator.getBounds()); } From 7a96cd7b0d5122d37773b20ca885edd88b7e19f4 Mon Sep 17 00:00:00 2001 From: zack Date: Fri, 11 Nov 2016 13:04:39 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20=20?= =?UTF-8?q?=E4=B8=8B=E6=A0=87=E8=B6=8A=E7=95=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/EditingMouseListener.java | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/EditingMouseListener.java b/designer_form/src/com/fr/design/mainframe/EditingMouseListener.java index 869ec2077f..0f916dd1de 100644 --- a/designer_form/src/com/fr/design/mainframe/EditingMouseListener.java +++ b/designer_form/src/com/fr/design/mainframe/EditingMouseListener.java @@ -288,24 +288,26 @@ public class EditingMouseListener extends MouseInputAdapter { if (component.isReport()) { xElementCase = (XElementCase)component; UIButton button = (UIButton)xElementCase.getCoverPane().getComponent(0); - JComponent button1= (JComponent) xElementCase.getCoverPane().getComponent(1); 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 minX1 = button1.getX() + getParentPositionX(component, 0) - designer.getArea().getHorizontalValue(); - int minY = button.getY() + getParentPositionY(component, 0) - designer.getArea().getVerticalValue(); - int minY1 = button1.getY() + getParentPositionY(component, 0) - designer.getArea().getVerticalValue(); + 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(); 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)); } } xElementCase.setHelpBtnOnFocus(false); - if (e.getX() + GAP - xElementCase.getInsets().left > minX1 && e.getX() - GAP - xElementCase.getInsets().left < minX1 + button1.getWidth()) { - if (e.getY() + GAP - xElementCase.getInsets().top > minY1 && e.getY() - GAP - xElementCase.getInsets().top < minY1 + button1.getHeight()) { - designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); - xElementCase.setHelpBtnOnFocus(true); + if (xElementCase.getCoverPane().getComponentCount() > 1) { + JComponent button1 = (JComponent) xElementCase.getCoverPane().getComponent(1); + int minX1 = button1.getX() + getParentPositionX(component, 0) - designer.getArea().getHorizontalValue(); + int minY1 = button1.getY() + getParentPositionY(component, 0) - designer.getArea().getVerticalValue(); + if (e.getX() + GAP - xElementCase.getInsets().left > minX1 && e.getX() - GAP - xElementCase.getInsets().left < minX1 + button1.getWidth()) { + if (e.getY() + GAP - xElementCase.getInsets().top > minY1 && e.getY() - GAP - xElementCase.getInsets().top < minY1 + button1.getHeight()) { + designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); + xElementCase.setHelpBtnOnFocus(true); + } } } xElementCase.displayCoverPane(true);