From 2b2728247684d7a04636dabfafb8fb8adf222eee Mon Sep 17 00:00:00 2001 From: kuangshuai Date: Wed, 25 Aug 2021 18:15:54 +0800 Subject: [PATCH 1/4] =?UTF-8?q?REPORT-57590=20=E9=80=89=E4=B8=AD=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E9=9D=A2=E6=9D=BF=E6=A8=A1=E5=90=8E=E6=9D=BF=E4=B8=8A?= =?UTF-8?q?=E6=96=B9=E7=9A=84=E5=B7=A5=E5=85=B7=E6=A0=8F=E4=B9=9F=E8=A6=81?= =?UTF-8?q?=E7=A6=81=E7=94=A8=E5=89=AA=E5=88=87=E5=A4=8D=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/mainframe/FormDesigner.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java b/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java index bb05796dd..73085231a 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java @@ -109,6 +109,10 @@ public class FormDesigner extends TargetComponent
implements TreeSelection Arrays.asList(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_M_Edit_Cut"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_M_Edit_Copy"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_M_Edit_Delete")}) ); + protected static final ArrayList PARAMETER_TOOLAR_BAN_LIST = new ArrayList( + Arrays.asList(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_M_Edit_Cut"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_M_Edit_Copy")}) + ); + private double scale = 1.0D; //底层容器的默认大小 @@ -1304,6 +1308,10 @@ public class FormDesigner extends TargetComponent implements TreeSelection protected void setToolbarButtons() { //自适应布局和底层都不能删除 DesignerContext.getDesignerFrame().checkCombineUp(!isRootSelected(), NAME_ARRAY_LIST); + + if (isParameterSelected()) { + DesignerContext.getDesignerFrame().checkCombineUp(false, PARAMETER_TOOLAR_BAN_LIST); + } } private void invalidateLayout() { From 064605878511be06c3af4f058a277ccfb7879d4f Mon Sep 17 00:00:00 2001 From: kuangshuai Date: Thu, 26 Aug 2021 14:56:50 +0800 Subject: [PATCH 2/4] =?UTF-8?q?REPORT-58159=20=E6=97=A5=E5=BF=97=E6=A0=8F?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E6=97=A5=E5=BF=97=E7=AA=97=E5=8F=A3=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=9C=A8=E4=B8=8A=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/mainframe/loghandler/LogMessageBar.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogMessageBar.java b/designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogMessageBar.java index dc10d8883..9f10ba829 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogMessageBar.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogMessageBar.java @@ -48,6 +48,7 @@ public class LogMessageBar extends JPanel { public void mouseClicked(MouseEvent e) { if (dlg != null && dlg.isVisible()) { dlg.setExtendedState(JFrame.NORMAL); + dlg.requestFocus(); return; } dlg = new LogDetailPane().showDialog(); From ef5917765f1faa805a5ce4897f803bd2046258df Mon Sep 17 00:00:00 2001 From: kerry Date: Thu, 26 Aug 2021 16:43:03 +0800 Subject: [PATCH 3/4] =?UTF-8?q?REPORT-56602=20=E9=A1=B5=E9=9D=A2=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E7=9A=84=E7=BA=B8=E5=BC=A0=E5=A4=A7=E5=B0=8F=E4=B8=8E?= =?UTF-8?q?=E5=AE=9E=E9=99=85=E5=88=86=E9=A1=B5=E7=B2=BE=E5=BA=A6=E4=B8=8D?= =?UTF-8?q?=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/grid/GridUI.java | 62 ++++++++++--------- 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/grid/GridUI.java b/designer-realize/src/main/java/com/fr/grid/GridUI.java index 10934a7cc..af640c94f 100644 --- a/designer-realize/src/main/java/com/fr/grid/GridUI.java +++ b/designer-realize/src/main/java/com/fr/grid/GridUI.java @@ -10,12 +10,15 @@ import com.fr.base.background.ColorBackground; import com.fr.base.background.ImageFileBackground; import com.fr.base.iofile.attr.WatermarkAttr; import com.fr.base.vcs.DesignerMode; +import com.fr.design.DesignerEnvManager; import com.fr.design.constants.UIConstants; import com.fr.design.file.HistoryTemplateListPane; +import com.fr.design.fun.ReportLengthUNITProvider; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.JTemplate; import com.fr.design.roleAuthority.ReportAndFSManagePane; +import com.fr.design.unit.UnitConvertUtil; import com.fr.general.Background; import com.fr.general.ComparatorUtils; import com.fr.grid.selection.CellSelection; @@ -48,6 +51,7 @@ import com.fr.stable.Constants; import com.fr.stable.script.CalculatorUtils; import com.fr.stable.unit.FU; import com.fr.stable.AssistUtils; +import com.fr.stable.unit.UNIT; import com.fr.third.antlr.ANTLRException; import com.fr.third.guava.collect.HashMultimap; @@ -372,41 +376,41 @@ public class GridUI extends ComponentUI { @Override protected void iterateStart2End(Graphics2D g2d) { - float rowHeight, paperYAxisSumSize = 0, yAxisSumSize = 0; + UNIT rowHeight, paperYAxisSumSize = FU.getInstance(0), yAxisSumSize = FU.getInstance(0); for (int i = 0; i <= gridRange.yEndIndex; i++) { if (i == 0) { i = gridRange.yBeginIndex; for (int k = 0; k < gridRange.yBeginIndex; k++) { - rowHeight = gridRange.rowHeightList.get(k).toPixF(resolution); - - paperYAxisSumSize += rowHeight; - if (paperYAxisSumSize >= paperPaintSize) { + rowHeight = gridRange.rowHeightList.get(k); + paperYAxisSumSize = paperYAxisSumSize.add(rowHeight); + if (paperYAxisSumSize.toPixF(resolution) >= paperPaintSize) { paperYAxisSumSize = rowHeight; } } } - rowHeight = gridRange.rowHeightList.get(i).toPixF(resolution); - paperYAxisSumSize += rowHeight; + + rowHeight = gridRange.rowHeightList.get(i); + paperYAxisSumSize = paperYAxisSumSize.add(rowHeight); if (showGridLine) { - float columnWidth, xAxisSumSize = 0; + UNIT columnWidth, xAxisSumSize = FU.getInstance(0); for (int j = gridRange.xBeginIndex; j <= gridRange.xEndIndex; j++) { - columnWidth = gridRange.columnWidthList.get(j).toPixF(resolution); + columnWidth = gridRange.columnWidthList.get(j); if (!mergeCellElementTable.get(CellPosition.value(i - 1, j)).contains(CellPosition.BOTTOM)) { - tmpLine2D.setLine(xAxisSumSize, yAxisSumSize, xAxisSumSize + columnWidth, yAxisSumSize); + tmpLine2D.setLine(xAxisSumSize.toPixF(resolution), yAxisSumSize.toPixF(resolution), xAxisSumSize.add(columnWidth).toPixF(resolution), yAxisSumSize.toPixF(resolution)); g2d.draw(tmpLine2D); } - xAxisSumSize += columnWidth; + xAxisSumSize = xAxisSumSize.add(columnWidth); } } - if (showPaginateLine && paperYAxisSumSize - paperPaintSize > THRESHOLD) { - paginateLineList.add(getPaginateLine2D((int) yAxisSumSize)); + if (showPaginateLine && paperYAxisSumSize.toPixF(resolution) - paperPaintSize > THRESHOLD) { + paginateLineList.add(getPaginateLine2D((int) yAxisSumSize.toPixF(resolution))); paperYAxisSumSize = rowHeight; } - yAxisSumSize += rowHeight; + yAxisSumSize = yAxisSumSize.add(rowHeight); } // paint 最后一个横线.. if (showGridLine) { - drawLastLine(g2d, (int) yAxisSumSize); + drawLastLine(g2d, (int) yAxisSumSize.toPixF(resolution)); } } } @@ -432,40 +436,40 @@ public class GridUI extends ComponentUI { @Override protected void iterateStart2End(Graphics2D g2d) { - float columnWidth, paperXAxisSumSize = 0, xAxisSumSize = 0; + UNIT columnWidth, paperXAxisSumSize = FU.getInstance(0), xAxisSumSize = FU.getInstance(0); for (int i = 0; i <= gridRange.xEndIndex; i++) { if (i == 0) { i = gridRange.xBeginIndex; for (int k = 0; k < gridRange.xBeginIndex; k++) { - columnWidth = gridRange.columnWidthList.get(k).toPixF(resolution); - paperXAxisSumSize += columnWidth; - if (paperXAxisSumSize >= paperPaintSize) { + columnWidth = gridRange.columnWidthList.get(k); + paperXAxisSumSize = paperXAxisSumSize.add(columnWidth); + if (paperXAxisSumSize.toPixF(resolution) >= paperPaintSize) { paperXAxisSumSize = columnWidth; } } } - columnWidth = gridRange.columnWidthList.get(i).toPixF(resolution); - paperXAxisSumSize += columnWidth; + columnWidth = gridRange.columnWidthList.get(i); + paperXAxisSumSize = paperXAxisSumSize.add(columnWidth); if (showGridLine) { - float rowHeight, yAxisSumSize = 0; + UNIT rowHeight, yAxisSumSize = FU.getInstance(0); for (int j = gridRange.yBeginIndex; j <= gridRange.yEndIndex; j++) { - rowHeight = gridRange.rowHeightList.get(j).toPixF(resolution); + rowHeight = gridRange.rowHeightList.get(j); if (!mergeCellElementTable.get(CellPosition.value(j, i - 1)).contains(CellPosition.RIGHT)) { - tmpLine2D.setLine(xAxisSumSize, yAxisSumSize, xAxisSumSize, yAxisSumSize + rowHeight); + tmpLine2D.setLine(xAxisSumSize.toPixF(resolution), yAxisSumSize.toPixF(resolution), xAxisSumSize.toPixF(resolution), yAxisSumSize.add(rowHeight).toPixF(resolution)); g2d.draw(tmpLine2D); } - yAxisSumSize += rowHeight; + yAxisSumSize = yAxisSumSize.add(rowHeight); } } - if (showPaginateLine && paperXAxisSumSize - paperPaintSize > THRESHOLD) { - paginateLineList.add(getPaginateLine2D((int) xAxisSumSize)); + if (showPaginateLine && paperXAxisSumSize.toPixF(resolution) - paperPaintSize > THRESHOLD) { + paginateLineList.add(getPaginateLine2D((int) xAxisSumSize.toPixF(resolution))); paperXAxisSumSize = columnWidth; } - xAxisSumSize += columnWidth; + xAxisSumSize = xAxisSumSize.add(columnWidth); } // paint 最后一个横线.. if (showGridLine) { - drawLastLine(g2d, (int) xAxisSumSize); + drawLastLine(g2d, (int) xAxisSumSize.toPixF(resolution)); } } } From 630a3195e0f027ee2248408f56cfac71d135a1ce Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 26 Aug 2021 19:10:16 +0800 Subject: [PATCH 4/4] =?UTF-8?q?REPORT-56147=20=E5=86=B3=E7=AD=96=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8-=E7=94=B5=E8=84=91200%=E7=BC=A9=E6=94=BE=E4=B8=8B?= =?UTF-8?q?=E5=86=B3=E7=AD=96=E6=8A=A5=E8=A1=A8=E4=B8=8B=E6=96=B9=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=8D=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/mainframe/FormArea.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java b/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java index ca3aa13f3..23e08e5cf 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java @@ -177,14 +177,12 @@ public class FormArea extends JComponent implements ScrollRulerComponent { double[] rowSize = {f}; double[] columnSize = {p, f, p, p, p, p, p, f, p}; UILabel tipsPane = new UILabel("form"); - tipsPane.setPreferredSize(new Dimension(265, 0)); widthPane = new UINumberField(); widthPane.setPreferredSize(new Dimension(60, 0)); heightPane = new UINumberField(); heightPane.setPreferredSize(new Dimension(60, 0)); slidePane = JFormSliderPane.getInstance(); - slidePane.setPreferredSize(new Dimension(326, 20)); JPanel resizePane = TableLayoutHelper.createCommonTableLayoutPane( new JComponent[][]{{tipsPane, new UILabel(), widthPane,