Browse Source

Pull request #2077: REPORT-37353&&REPORT-37054【frm设计界面支持缩放】缩放过程中,如果进行图表编辑,拖动滚动条,就会重叠

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

* commit '44339dd3815a820690c6eebb8e72d28892ae6260':
  问题修复
  REPORT-37353【frm设计界面支持缩放】缩放过程中,如果进行图表编辑,拖动滚动条,就会重叠
feature/big-screen
kerry 4 years ago
parent
commit
ec083560ed
  1. 4
      designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java
  2. 16
      designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java

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

@ -685,8 +685,8 @@ public class EditingMouseListener extends MouseInputAdapter {
Rectangle rect = ComponentUtils.getRelativeBounds(currentXCreator);
Rectangle bounds = new Rectangle(1, 1, currentXCreator.getWidth() - 2, currentXCreator.getHeight() - 2);
bounds.x += (rect.x - designer.getArea().getHorizontalValue());
bounds.y += (rect.y - designer.getArea().getVerticalValue());
bounds.x += (rect.x - designer.getHorizontalScaleValue());
bounds.y += (rect.y - designer.getVerticalScaleValue());
if (currentXCreator instanceof XEditorHolder) {
ToolTipEditor.getInstance().resetBounds((XEditorHolder) currentXCreator, bounds, currentEditor.getEditorTarget().getBounds());
}

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

@ -177,13 +177,13 @@ public class FormDesignerUI extends ComponentUI {
if (k == 1 || k == 2) {
x1 = 0;
x2 = 6;
y2 = y1 = bounds.y - designer.getArea().getVerticalValue() + (k == 1 ? 0 : bounds.height);
text = Utils.objectToString(y1 + designer.getArea().getVerticalValue());
y2 = y1 = bounds.y - designer.getVerticalScaleValue() + (k == 1 ? 0 : bounds.height);
text = Utils.objectToString(bounds.y);
} else {
y1 = 0;
y2 = 6;
x1 = x2 = bounds.x - designer.getArea().getHorizontalValue() + (k == 3 ? 0 : bounds.width);
text = Utils.objectToString(x1 + designer.getArea().getHorizontalValue());
x1 = x2 = bounds.x - designer.getHorizontalScaleValue()+ (k == 3 ? 0 : bounds.width);
text = Utils.objectToString(bounds.x);
}
text += com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Indent_Pixel");
g2d.setColor(XCreatorConstants.RESIZE_BOX_BORDER_COLOR);
@ -409,8 +409,8 @@ public class FormDesignerUI extends ComponentUI {
clipg = g.create(
-designer.getHorizontalScaleValue(),
-designer.getVerticalScaleValue() + designer.getParaHeight(),
parent.getSize().width + designer.getArea().getHorizontalValue(),
parent.getSize().height + designer.getArea().getVerticalValue());
(int) ((parent.getSize().width + designer.getArea().getHorizontalValue()) / designer.getScale()),
(int) ((parent.getSize().height + designer.getArea().getVerticalValue()) / designer.getScale()));
designer.paintContent(clipg);
paintWatermark((Graphics2D) clipg);
@ -435,8 +435,8 @@ public class FormDesignerUI extends ComponentUI {
Graphics clipg1;
clipg1 = g.create(-designer.getHorizontalScaleValue(),
-designer.getVerticalScaleValue(),
parent.getSize().width + designer.getArea().getHorizontalValue(),
designer.getParaHeight() + designer.getArea().getVerticalValue());
(int) ((parent.getSize().width + designer.getArea().getHorizontalValue()) / designer.getScale()),
(int) ((designer.getParaHeight() + designer.getArea().getVerticalValue()) / designer.getScale()));
designer.paintPara(clipg1);
clipg1.dispose();

Loading…
Cancel
Save