From 62c14cfe072e138ee0874d651b7b1520f78d6f6d Mon Sep 17 00:00:00 2001 From: "Mata.Li" Date: Mon, 17 Dec 2018 14:51:11 +0800 Subject: [PATCH] REPORT-13629 & REPORT-13572 --- .../src/main/java/com/fr/design/mainframe/JForm.java | 5 +++-- .../main/java/com/fr/design/mainframe/SheetNameTabPane.java | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java index cc3ba96f5..fb58e21ef 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java @@ -5,6 +5,7 @@ import com.fr.base.PaperSize; import com.fr.base.Parameter; import com.fr.base.vcs.DesignerMode; import com.fr.design.DesignState; +import com.fr.design.actions.FormMobileAttrAction; import com.fr.design.actions.TemplateParameterAction; import com.fr.design.actions.core.WorkBookSupportable; import com.fr.design.actions.file.export.EmbeddedFormExportExportAction; @@ -496,9 +497,9 @@ public class JForm extends JTemplate implements BaseJForm { @Override public ShortCut[] shortcut4TemplateMenu() { if (this.index == FORM_TAB) { - return ArrayUtils.addAll(new ShortCut[]{new TemplateParameterAction(this), new ReportFitAttrAction(this)}, new ShortCut[0]); + return ArrayUtils.addAll(new ShortCut[]{new TemplateParameterAction(this), new FormMobileAttrAction(this), new ReportFitAttrAction(this)}, new ShortCut[0]); } else { - return ArrayUtils.addAll(new ShortCut[]{new TemplateParameterAction(this), new ReportFitAttrAction(this)}, this.elementCaseDesign.shortcut4TemplateMenu()); + return ArrayUtils.addAll(new ShortCut[]{new TemplateParameterAction(this), new FormMobileAttrAction(this), new ReportFitAttrAction(this)}, this.elementCaseDesign.shortcut4TemplateMenu()); } } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java index 3ecd2caf4..09f1ff9e1 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java @@ -335,7 +335,8 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse checkButton(showCount < widthArray.length); // richie:当linearray不为空时,说明有了鼠标拖动,下面画由于鼠标拖动产生的效果. - if (!lineArray.isEmpty()) { + //REPORT-13572 点击切换会出现重影,保证:此时鼠标点击是没有放开的,才会绘制轨迹 + if (!lineArray.isEmpty() && !isReleased) { paintDragTab(g2d, textHeight, charWidth, textAscent); } @@ -568,6 +569,7 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse * @param evt 鼠标事件 */ public void mousePressed(MouseEvent evt) { + isReleased = false; int reportcount = reportComposite.getEditingWorkBook().getReportCount(); if (scrollIndex < 0 || scrollIndex >= reportcount) { return; @@ -749,7 +751,7 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse /** * exchange workSheet * - * @param workBook + * @param * @param index1 * @param index2 * @return workBook