From b8f32bf0a061df0bcd591c602b0f415d63fdddbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Sat, 10 Jul 2021 21:20:46 +0800 Subject: [PATCH 01/10] =?UTF-8?q?REPORT-54998=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E5=8D=95=E5=85=83=E6=A0=BC=E5=8F=B3=E4=B8=8B=E8=A7=92?= =?UTF-8?q?=E2=80=98=E5=8D=81=E2=80=99=E6=8B=96=E5=8A=A8=EF=BC=8C=E5=90=91?= =?UTF-8?q?=E5=8F=B3=E5=90=91=E4=B8=8B=E6=AD=A3=E5=B8=B8=EF=BC=8C=E5=90=91?= =?UTF-8?q?=E5=B7=A6=E6=97=A0=E6=B3=95=E9=80=92=E5=87=8F=EF=BC=8C=E5=90=91?= =?UTF-8?q?=E4=B8=8A=E6=97=A0=E6=B3=95=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/grid/GridMouseAdapter.java | 2 +- .../java/com/fr/grid/IntelliElements.java | 128 +++++++++++------- 2 files changed, 82 insertions(+), 48 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java b/designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java index b0f91a9029..55bbcfed30 100644 --- a/designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java +++ b/designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java @@ -474,7 +474,7 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous grid.getDragRectangle().y = cellRectangle.y; grid.getDragRectangle().height = cellRectangle.height; } else { - grid.getDragRectangle().y = cellRectangle.y; + grid.getDragRectangle().y = selectedCellPoint.getRow(); grid.getDragRectangle().height = cellRectangle.y - selectedCellPoint.getRow() + cellRectangle.height; } } diff --git a/designer-realize/src/main/java/com/fr/grid/IntelliElements.java b/designer-realize/src/main/java/com/fr/grid/IntelliElements.java index ca1ed55d8a..8234485539 100644 --- a/designer-realize/src/main/java/com/fr/grid/IntelliElements.java +++ b/designer-realize/src/main/java/com/fr/grid/IntelliElements.java @@ -183,42 +183,40 @@ public class IntelliElements { } - public void doIntelliAction() { - for (int colIndex = getStartColumnIndex(), colEnd = getEndColumnIndex(); colIndex < colEnd; colIndex++) { - for (int rowIndex = getStartRowIndex(), rowEnd = getEndRowIndex(); rowIndex < rowEnd; rowIndex++) { - TemplateCellElement sourceCellElement = getSourceCellElementByColumnRow(colIndex, rowIndex); + public abstract void doIntelliAction(); - if (sourceCellElement == null) { - sourceCellElement = new DefaultTemplateCellElement(); - } - TemplateCellElement newCellElement = new DefaultTemplateCellElement(colIndex, rowIndex); - applyStyle(newCellElement, sourceCellElement);//style - if (sourceCellElement.getValue() instanceof DSColumn) { - try{ - DSColumn dsColumn = (DSColumn)((DSColumn) sourceCellElement.getValue()).clone(); - newCellElement.setValue(dsColumn); - }catch (CloneNotSupportedException e){ - FineLoggerFactory.getLogger().error(e.getMessage(), e); - } - newCellElement.setCellExpandAttr(sourceCellElement.getCellExpandAttr()); - } else if (sourceCellElement.getValue() instanceof Number) { - newCellElement.setValue(processNumber((Number) sourceCellElement.getValue())); - } else if (sourceCellElement.getValue() instanceof BaseFormula) { - BaseFormula formula = (BaseFormula) sourceCellElement.getValue(); - formula = this.generateSimpleFormula(formula, 1); - newCellElement.setValue(formula); - } else { - try { - //richer:不改变原单元格 - newCellElement.setValue(BaseUtils.cloneObject(sourceCellElement.getValue())); - } catch (CloneNotSupportedException e) { - FineLoggerFactory.getLogger().error(e.getMessage(), e); - } - } + public void expandCellValue(int colIndex, int rowIndex) { + TemplateCellElement sourceCellElement = getSourceCellElementByColumnRow(colIndex, rowIndex); - report.addCellElement(newCellElement); + if (sourceCellElement == null) { + sourceCellElement = new DefaultTemplateCellElement(); + } + TemplateCellElement newCellElement = new DefaultTemplateCellElement(colIndex, rowIndex); + applyStyle(newCellElement, sourceCellElement);//style + if (sourceCellElement.getValue() instanceof DSColumn) { + try{ + DSColumn dsColumn = (DSColumn)((DSColumn) sourceCellElement.getValue()).clone(); + newCellElement.setValue(dsColumn); + }catch (CloneNotSupportedException e){ + FineLoggerFactory.getLogger().error(e.getMessage(), e); + } + newCellElement.setCellExpandAttr(sourceCellElement.getCellExpandAttr()); + } else if (sourceCellElement.getValue() instanceof Number) { + newCellElement.setValue(processNumber((Number) sourceCellElement.getValue())); + } else if (sourceCellElement.getValue() instanceof BaseFormula) { + BaseFormula formula = (BaseFormula) sourceCellElement.getValue(); + formula = this.generateSimpleFormula(formula, 1); + newCellElement.setValue(formula); + } else { + try { + //richer:不改变原单元格 + newCellElement.setValue(BaseUtils.cloneObject(sourceCellElement.getValue())); + } catch (CloneNotSupportedException e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } + + report.addCellElement(newCellElement); } protected abstract int getStartColumnIndex(); @@ -328,6 +326,15 @@ public class IntelliElements { }; } + @Override + public void doIntelliAction() { + for (int colIndex = getStartColumnIndex(), colEnd = getEndColumnIndex(); colIndex < colEnd; colIndex ++) { + for (int rowIndex = getStartRowIndex(), rowEnd = getEndRowIndex(); rowIndex < rowEnd; rowIndex ++) { + expandCellValue(colIndex, rowIndex); + } + } + } + @Override public boolean havetoModify() { return IntelliElements.this.dragCellRectangle.width > IntelliElements.this.oldCellRectangle.width; @@ -397,34 +404,43 @@ public class IntelliElements { }; } + @Override + public void doIntelliAction() { + for (int colIndex = getStartColumnIndex(), colEnd = getEndColumnIndex(); colIndex > colEnd; colIndex --) { + for (int rowIndex = getStartRowIndex(), rowEnd = getEndRowIndex(); rowIndex < rowEnd; rowIndex ++) { + expandCellValue(colIndex, rowIndex); + } + } + } + @Override public boolean havetoModify() { return true; } @Override - public int getStartRowIndex() { + public int getStartRowIndex() { return IntelliElements.this.oldCellRectangle.y; } @Override - public int getEndRowIndex() { + public int getEndRowIndex() { return IntelliElements.this.oldCellRectangle.y + IntelliElements.this.oldCellRectangle.height; } @Override - public int getStartColumnIndex() { - return IntelliElements.this.dragCellRectangle.x; + public int getStartColumnIndex() { + return IntelliElements.this.oldCellRectangle.x - 1; } @Override - public int getEndColumnIndex() { - return IntelliElements.this.oldCellRectangle.x; + public int getEndColumnIndex() { + return IntelliElements.this.dragCellRectangle.x - 1; } @Override public TemplateCellElement getSourceCellElementByColumnRow(int columnIndex, int rowIndex) { - return report.getTemplateCellElement(IntelliElements.this.oldCellRectangle.x + (columnIndex - IntelliElements.this.dragCellRectangle.x) % (IntelliElements.this.oldCellRectangle.width), rowIndex); + return report.getTemplateCellElement(columnIndex + IntelliElements.this.oldCellRectangle.width, rowIndex); } @Override @@ -465,6 +481,15 @@ public class IntelliElements { }; } + @Override + public void doIntelliAction() { + for (int colIndex = getStartColumnIndex(), colEnd = getEndColumnIndex(); colIndex < colEnd; colIndex ++) { + for (int rowIndex = getStartRowIndex(), rowEnd = getEndRowIndex(); rowIndex < rowEnd; rowIndex ++) { + expandCellValue(colIndex, rowIndex); + } + } + } + @Override public boolean havetoModify() { return IntelliElements.this.dragCellRectangle.height > IntelliElements.this.oldCellRectangle.height; @@ -534,33 +559,42 @@ public class IntelliElements { } @Override - public boolean havetoModify() { + public void doIntelliAction() { + for (int colIndex = getStartColumnIndex(), colEnd = getEndColumnIndex(); colIndex < colEnd; colIndex++) { + for (int rowIndex = getStartRowIndex(), rowEnd = getEndRowIndex(); rowIndex > rowEnd; rowIndex--) { + expandCellValue(colIndex, rowIndex); + } + } + } + + @Override + public boolean havetoModify() { return true; } @Override - public int getStartRowIndex() { - return IntelliElements.this.dragCellRectangle.y; + public int getStartRowIndex() { + return IntelliElements.this.oldCellRectangle.y - 1; } @Override - public int getEndRowIndex() { - return IntelliElements.this.oldCellRectangle.y; + public int getEndRowIndex() { + return IntelliElements.this.dragCellRectangle.y - 1; } @Override - public int getStartColumnIndex() { + public int getStartColumnIndex() { return IntelliElements.this.oldCellRectangle.x; } @Override - public int getEndColumnIndex() { + public int getEndColumnIndex() { return IntelliElements.this.oldCellRectangle.x + IntelliElements.this.oldCellRectangle.width; } @Override public TemplateCellElement getSourceCellElementByColumnRow(int columnIndex, int rowIndex) { - return report.getTemplateCellElement(columnIndex, IntelliElements.this.oldCellRectangle.y + (rowIndex - IntelliElements.this.dragCellRectangle.y) % (IntelliElements.this.oldCellRectangle.height)); + return report.getTemplateCellElement(columnIndex, rowIndex + IntelliElements.this.oldCellRectangle.height); } @Override From 783f0b7043e7bc41e680456d82573d5a833f6a0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Mon, 12 Jul 2021 14:00:53 +0800 Subject: [PATCH 02/10] =?UTF-8?q?REPORT-54998=20=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E6=95=B0=E5=AD=97=E6=8B=93=E5=B1=95=E4=B8=8D=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/grid/IntelliElements.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/grid/IntelliElements.java b/designer-realize/src/main/java/com/fr/grid/IntelliElements.java index 8234485539..e53e8b9522 100644 --- a/designer-realize/src/main/java/com/fr/grid/IntelliElements.java +++ b/designer-realize/src/main/java/com/fr/grid/IntelliElements.java @@ -445,7 +445,7 @@ public class IntelliElements { @Override protected Number processNumber(Number i) { - return i; + return FunctionHelper.asNumber(i.doubleValue() - 1); } @Override @@ -599,7 +599,7 @@ public class IntelliElements { @Override protected Number processNumber(Number i) { - return i; + return FunctionHelper.asNumber(i.doubleValue() - 1); } @Override From e4fe8267847615ecd0549f4b1691ce9a35c0db55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Mon, 12 Jul 2021 18:06:54 +0800 Subject: [PATCH 03/10] =?UTF-8?q?REPORT-54998=20=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E4=B8=80=E4=B8=8B=E8=BF=99=E8=BE=B9=E7=9A=84=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E9=80=BB=E8=BE=91=EF=BC=8C=E4=BD=BF=E5=85=B6=E6=9B=B4=E5=8A=A0?= =?UTF-8?q?=E6=B8=85=E6=99=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/grid/GridMouseAdapter.java | 153 ++++++++++++++---- 1 file changed, 118 insertions(+), 35 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java b/designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java index 55bbcfed30..da2f6f1743 100644 --- a/designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java +++ b/designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java @@ -46,6 +46,10 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous private static final int TOOLTIP_X_Y_FIX = 4; private static final double COPY_CROSS_INNER_DISTANCE = 1.5; private static final double COPY_CROSS_OUTER_DISTANCE = 2.5; + private static final int DIRECTION_UP = 1; + private static final int DIRECTION_DOWN = 2; + private static final int DIRECTION_LEFT = 3; + private static final int DIRECTION_RIGHT = 4; /** * 拖拽时候刷新时间间隔 */ @@ -457,48 +461,127 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous if (cellRectangle.contains(selectedCellPoint.getColumn(), selectedCellPoint.getRow())) { grid.getDragRectangle().setBounds(cellRectangle); } else { + if (isOutECBlockPane(evtX, evtY)) { + return; + } int xDistance = evtX - this.oldEvtX; int yDistance = evtY - this.oldEvtY; - if (Math.abs(yDistance) > Math.abs(xDistance)) { - grid.getDragRectangle().x = cellRectangle.x; - grid.getDragRectangle().width = cellRectangle.width; - if (yDistance >= 0) { - // 聚合报表要求拖拽的时候要在本块的内部进行 不能无限往下拖 - if (reportPane instanceof ECBlockPane && evtY > reportPane.getBounds().height - ECBlockGap) { - return; - } - grid.getDragRectangle().y = cellRectangle.y; - grid.getDragRectangle().height = selectedCellPoint.getRow() - cellRectangle.y + 1; + int dragDirection = calculateDragDirection(xDistance, yDistance); + grid.getDragRectangle().x = calculateDragRectangleX(selectedCellPoint, cellRectangle, dragDirection); + grid.getDragRectangle().y = calculateDragRectangleY(selectedCellPoint, cellRectangle, dragDirection); + grid.getDragRectangle().width = calculateDragRectangleWidth(selectedCellPoint, cellRectangle, dragDirection); + grid.getDragRectangle().height = calculateDragRectangleHeight(selectedCellPoint, cellRectangle, dragDirection); + } + reportPane.ensureColumnRowVisible(selectedCellPoint.getColumn() + 1, selectedCellPoint.getRow() + 1); + } + + private int calculateDragDirection(int xDistance, int yDistance) { + if (Math.abs(yDistance) > Math.abs(xDistance)) { + if (yDistance >= 0) { + return DIRECTION_DOWN; + } else { + return DIRECTION_UP; + } + } else { + if (xDistance >= 0) { + return DIRECTION_RIGHT; + } else { + return DIRECTION_LEFT; + } + } + } + + private int calculateDragRectangleX(ColumnRow currentMouseCell, Rectangle startRec, int direction) { + int result = 0; + switch(direction) { + case DIRECTION_DOWN: + case DIRECTION_UP: + case DIRECTION_RIGHT: + result = startRec.x; + break; + case DIRECTION_LEFT: + if (isInsideSelectedCell(currentMouseCell, startRec, direction)) { + result = startRec.x; } else { - if (selectedCellPoint.getRow() >= cellRectangle.y && selectedCellPoint.getRow() < cellRectangle.y + cellRectangle.height) { - grid.getDragRectangle().y = cellRectangle.y; - grid.getDragRectangle().height = cellRectangle.height; - } else { - grid.getDragRectangle().y = selectedCellPoint.getRow(); - grid.getDragRectangle().height = cellRectangle.y - selectedCellPoint.getRow() + cellRectangle.height; - } + result = currentMouseCell.getColumn(); } - } else { - grid.getDragRectangle().y = cellRectangle.y; - grid.getDragRectangle().height = cellRectangle.height; - if (xDistance >= 0) { - if (reportPane instanceof ECBlockPane && evtX > reportPane.getBounds().width - ECBlockGap) { - return; - } - grid.getDragRectangle().x = cellRectangle.x; - grid.getDragRectangle().width = selectedCellPoint.getColumn() - cellRectangle.x + 1; + break; + } + return result; + } + + private int calculateDragRectangleY(ColumnRow currentMouseCell, Rectangle startRec, int direction) { + int result = 0; + switch(direction) { + case DIRECTION_RIGHT: + case DIRECTION_LEFT: + case DIRECTION_DOWN: + result = startRec.y; + break; + case DIRECTION_UP: + if (isInsideSelectedCell(currentMouseCell, startRec, direction)) { + result = startRec.y; } else { - if (selectedCellPoint.getColumn() >= cellRectangle.x && selectedCellPoint.getColumn() < cellRectangle.x + cellRectangle.width) { - grid.getDragRectangle().x = cellRectangle.x; - grid.getDragRectangle().width = cellRectangle.width; - } else { - grid.getDragRectangle().x = selectedCellPoint.getColumn(); - grid.getDragRectangle().width = cellRectangle.x - selectedCellPoint.getColumn() + cellRectangle.width; - } + result = currentMouseCell.getRow(); } - } + break; } - reportPane.ensureColumnRowVisible(selectedCellPoint.getColumn() + 1, selectedCellPoint.getRow() + 1); + return result; + } + + private int calculateDragRectangleWidth(ColumnRow currentMouseCell, Rectangle startRec, int direction) { + int result = 0; + switch(direction) { + case DIRECTION_DOWN: + case DIRECTION_UP: + result = startRec.width; + break; + case DIRECTION_RIGHT: + result = currentMouseCell.getColumn() - startRec.x + 1; + break; + case DIRECTION_LEFT: + if (isInsideSelectedCell(currentMouseCell, startRec, direction)) { + result = startRec.width; + } else { + result = startRec.x - currentMouseCell.getColumn() + startRec.width; + } + break; + } + return result; + } + + private int calculateDragRectangleHeight(ColumnRow currentMouseCell, Rectangle startRec, int direction) { + int result = 0; + switch(direction) { + case DIRECTION_DOWN: + result = currentMouseCell.getRow() - startRec.y + 1; + break; + case DIRECTION_UP: + if (isInsideSelectedCell(currentMouseCell, startRec, direction)) { + result = startRec.y - currentMouseCell.getRow() + startRec.height; + } else { + result = startRec.height; + } + break; + case DIRECTION_RIGHT: + case DIRECTION_LEFT: + result = startRec.height; + break; + } + return result; + } + + private boolean isOutECBlockPane(int evtX, int evtY) { + ElementCasePane reportPane = grid.getElementCasePane(); + if (reportPane instanceof ECBlockPane) { + return (evtY > reportPane.getBounds().height - ECBlockGap) || (evtX > reportPane.getBounds().width - ECBlockGap); + } + return true; + } + + private boolean isInsideSelectedCell(ColumnRow currentMouseCell, Rectangle startRec, int direction) { + return (direction == DIRECTION_UP && currentMouseCell.getRow() >= startRec.y && currentMouseCell.getRow() < startRec.y + startRec.height) || + (direction == DIRECTION_LEFT && currentMouseCell.getColumn() >= startRec.x && currentMouseCell.getColumn() < startRec.x + startRec.width); } private void doShiftSelectCell(double evtX, double evtY) { From 3f195ec59136ec51606f6502b7300cc1a5043f0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Mon, 12 Jul 2021 18:42:59 +0800 Subject: [PATCH 04/10] =?UTF-8?q?REPORT-54998=20=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E4=B8=80=E4=B8=8B=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/grid/GridMouseAdapter.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java b/designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java index da2f6f1743..f09c34b07f 100644 --- a/designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java +++ b/designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java @@ -455,11 +455,11 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous private void doWithCellElementDragged(int evtX, int evtY, CellSelection cs) { ElementCasePane reportPane = grid.getElementCasePane(); - java.awt.Rectangle cellRectangle = cs.toRectangle(); + java.awt.Rectangle startRec = cs.toRectangle(); - ColumnRow selectedCellPoint = GridUtils.getAdjustEventColumnRow_withresolution(reportPane, evtX, evtY, resolution); - if (cellRectangle.contains(selectedCellPoint.getColumn(), selectedCellPoint.getRow())) { - grid.getDragRectangle().setBounds(cellRectangle); + ColumnRow currentMouseCell = GridUtils.getAdjustEventColumnRow_withresolution(reportPane, evtX, evtY, resolution); + if (startRec.contains(currentMouseCell.getColumn(), currentMouseCell.getRow())) { + grid.getDragRectangle().setBounds(startRec); } else { if (isOutECBlockPane(evtX, evtY)) { return; @@ -467,12 +467,12 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous int xDistance = evtX - this.oldEvtX; int yDistance = evtY - this.oldEvtY; int dragDirection = calculateDragDirection(xDistance, yDistance); - grid.getDragRectangle().x = calculateDragRectangleX(selectedCellPoint, cellRectangle, dragDirection); - grid.getDragRectangle().y = calculateDragRectangleY(selectedCellPoint, cellRectangle, dragDirection); - grid.getDragRectangle().width = calculateDragRectangleWidth(selectedCellPoint, cellRectangle, dragDirection); - grid.getDragRectangle().height = calculateDragRectangleHeight(selectedCellPoint, cellRectangle, dragDirection); + grid.getDragRectangle().x = calculateDragRectangleX(currentMouseCell, startRec, dragDirection); + grid.getDragRectangle().y = calculateDragRectangleY(currentMouseCell, startRec, dragDirection); + grid.getDragRectangle().width = calculateDragRectangleWidth(currentMouseCell, startRec, dragDirection); + grid.getDragRectangle().height = calculateDragRectangleHeight(currentMouseCell, startRec, dragDirection); } - reportPane.ensureColumnRowVisible(selectedCellPoint.getColumn() + 1, selectedCellPoint.getRow() + 1); + reportPane.ensureColumnRowVisible(currentMouseCell.getColumn() + 1, currentMouseCell.getRow() + 1); } private int calculateDragDirection(int xDistance, int yDistance) { From c64c4b7a5ff352d9eb3cf3db71bd8047973f1178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Tue, 13 Jul 2021 15:46:34 +0800 Subject: [PATCH 05/10] =?UTF-8?q?REPORT-55034=20=E8=81=9A=E5=90=88?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=EF=BC=8C=E5=8D=95=E5=85=83=E6=A0=BC=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E8=AE=BE=E7=BD=AE=E9=9D=A2=E6=9D=BF=EF=BC=8C=E5=9C=A8?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=8F=82=E6=95=B0=E9=9D=A2=E6=9D=BF=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=90=8E=EF=BC=8C=E9=9D=A2=E6=9D=BF=E6=9C=AA=E5=88=B7?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/mainframe/JWorkBook.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java b/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java index 0f1ced3797..d43926e6a5 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java @@ -1019,6 +1019,9 @@ public class JWorkBook extends JTemplate { // EastRegionContainerPane.getInstance().replaceDownPane(new JPanel()); QuickEditorRegion.getInstance().populate(QuickEditor.DEFAULT_EDITOR); } else { + if (polyDesigner.getSelectionType() == PolyDesigner.SelectionType.INNER) { + EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT); + } EastRegionContainerPane.getInstance().replaceDownPane(CellElementPropertyPane.getInstance()); } EastRegionContainerPane.getInstance().replaceUpPane(QuickEditorRegion.getInstance()); From 0e7d4a92517a5a81753ceb9bbbe5a4757da86578 Mon Sep 17 00:00:00 2001 From: Starryi Date: Tue, 13 Jul 2021 18:43:32 +0800 Subject: [PATCH 06/10] =?UTF-8?q?REPORT-54410:=20=E5=86=B3=E7=AD=96?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=EF=BC=8C=E6=A8=A1=E6=9D=BF=E4=B8=AD=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E7=BB=84=E4=BB=B6=E7=9A=84=E5=AE=BD=E9=AB=98=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=BC=9A=E5=BD=B1=E5=93=8D=E7=BB=9D=E5=AF=B9=E7=94=BB?= =?UTF-8?q?=E5=B8=83=E5=9D=97=E4=B8=AD=E7=BB=84=E4=BB=B6=E7=9A=84=E5=AE=BD?= =?UTF-8?q?=E9=AB=98=E5=92=8C=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 自适应布局下的绝对画布块,在缩放内部组件时的时机不对,导致绝对布局计算自己的 缩放比例时,实际计算的是: (currentHeight + GAP / 2) / backupHeight, 然后把这个比例用在了自己的子组件上,导致绝对画布块内部组件的尺寸缩放比例与 外界不一致 【改动思路】 在addCompInterval调用后,此时XWAbsolute.getBounds中年返回的尺寸 是不包含gap的,进行绝对画布块内部组件尺寸调整 --- .../fr/design/designer/creator/XWFitLayout.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java b/designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java index 6d7aa5d9ff..896cbe37c5 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java @@ -780,6 +780,17 @@ public class XWFitLayout extends XLayoutContainer { tabLayout.updateBoundsWidget(); } } + } + layout.setContainerHeight(containerHeight); + layout.setContainerWidth(containerWidth); + addCompInterval(getAcualInterval()); + + // REPORT-54410: 决策报表,模板中其他组件的宽高修改会影响绝对画布块中组件的宽高和位置 + // 绝对布局内的组件尺寸调整需要在绝对布局的bound排除GAP后进行,否则计算出的 + // 组件尺寸缩放比例会有问题 + for (int index = 0, n = this.getComponentCount(); index < n; index++) { + XCreator creator = (XCreator) this.getComponent(index); + BoundsWidget wgt = (BoundsWidget) layout.getBoundsWidget(creator.toData()); //如果子组件是绝对布局,则内部的widget也要更新 if (creator.acceptType(XWAbsoluteLayout.class)){ //更新的时候一定要带上backupBound @@ -790,9 +801,6 @@ public class XWFitLayout extends XLayoutContainer { creator.setBackupBound(creator.getBounds()); } } - layout.setContainerHeight(containerHeight); - layout.setContainerWidth(containerWidth); - addCompInterval(getAcualInterval()); } private Rectangle recalculateWidgetBounds(Rectangle rec, int[] hors, int[] veris) { From ce0437869c2a858fa6c05159281eeb0f999767ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Tue, 13 Jul 2021 19:00:14 +0800 Subject: [PATCH 07/10] =?UTF-8?q?REPORT-54998=20=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/grid/GridMouseAdapter.java | 160 ++++++++---------- 1 file changed, 74 insertions(+), 86 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java b/designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java index f09c34b07f..7fb4af3293 100644 --- a/designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java +++ b/designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java @@ -458,20 +458,15 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous java.awt.Rectangle startRec = cs.toRectangle(); ColumnRow currentMouseCell = GridUtils.getAdjustEventColumnRow_withresolution(reportPane, evtX, evtY, resolution); - if (startRec.contains(currentMouseCell.getColumn(), currentMouseCell.getRow())) { - grid.getDragRectangle().setBounds(startRec); - } else { - if (isOutECBlockPane(evtX, evtY)) { - return; - } - int xDistance = evtX - this.oldEvtX; - int yDistance = evtY - this.oldEvtY; - int dragDirection = calculateDragDirection(xDistance, yDistance); - grid.getDragRectangle().x = calculateDragRectangleX(currentMouseCell, startRec, dragDirection); - grid.getDragRectangle().y = calculateDragRectangleY(currentMouseCell, startRec, dragDirection); - grid.getDragRectangle().width = calculateDragRectangleWidth(currentMouseCell, startRec, dragDirection); - grid.getDragRectangle().height = calculateDragRectangleHeight(currentMouseCell, startRec, dragDirection); + if (isOutECBlockPane(evtX, evtY)) { + return; } + int xDistance = evtX - this.oldEvtX; + int yDistance = evtY - this.oldEvtY; + int dragDirection = calculateDragDirection(xDistance, yDistance); + ColumnRow realCell = calculateRealCell(currentMouseCell, startRec, dragDirection); + grid.getDragRectangle().setBounds(calculateDragRectangle(realCell, startRec, dragDirection)); + reportPane.ensureColumnRowVisible(currentMouseCell.getColumn() + 1, currentMouseCell.getRow() + 1); } @@ -491,97 +486,90 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous } } - private int calculateDragRectangleX(ColumnRow currentMouseCell, Rectangle startRec, int direction) { - int result = 0; + /** + * 计算当前十字标所在格子对应的真正参与计算拖拽边框的格子 + * @param currentMouseCell 当前鼠标所在的格子 + * @param startRec 起始格子 + * @param direction 拖拽方向 + * @return 当前十字标所在格子对应的真正参与计算拖拽边框的格子 + */ + private ColumnRow calculateRealCell(ColumnRow currentMouseCell, Rectangle startRec, int direction) { + ColumnRow realCell; switch(direction) { case DIRECTION_DOWN: case DIRECTION_UP: - case DIRECTION_RIGHT: - result = startRec.x; + realCell = ColumnRow.valueOf(startRec.x, currentMouseCell.row); break; - case DIRECTION_LEFT: - if (isInsideSelectedCell(currentMouseCell, startRec, direction)) { - result = startRec.x; - } else { - result = currentMouseCell.getColumn(); - } - break; - } - return result; - } - - private int calculateDragRectangleY(ColumnRow currentMouseCell, Rectangle startRec, int direction) { - int result = 0; - switch(direction) { case DIRECTION_RIGHT: case DIRECTION_LEFT: - case DIRECTION_DOWN: - result = startRec.y; + realCell = ColumnRow.valueOf(currentMouseCell.column, startRec.y); break; - case DIRECTION_UP: - if (isInsideSelectedCell(currentMouseCell, startRec, direction)) { - result = startRec.y; - } else { - result = currentMouseCell.getRow(); - } + default: + realCell = currentMouseCell; break; } - return result; + return realCell; } - private int calculateDragRectangleWidth(ColumnRow currentMouseCell, Rectangle startRec, int direction) { - int result = 0; - switch(direction) { - case DIRECTION_DOWN: - case DIRECTION_UP: - result = startRec.width; - break; - case DIRECTION_RIGHT: - result = currentMouseCell.getColumn() - startRec.x + 1; - break; - case DIRECTION_LEFT: - if (isInsideSelectedCell(currentMouseCell, startRec, direction)) { - result = startRec.width; - } else { - result = startRec.x - currentMouseCell.getColumn() + startRec.width; - } - break; + /** + * 计算拖拽的边框 + * @param realCell 当前十字标所在格子对应的真正参与计算拖拽边框的格子 + * @param startRec 起始格子 + * @param direction 拖拽方向 + * @return 拖拽的边框 + */ + private Rectangle calculateDragRectangle(ColumnRow realCell, Rectangle startRec, int direction) { + Rectangle rectangle = new Rectangle(); + if (startRec.contains(realCell.column, realCell.row)) { + rectangle.setBounds(startRec); + } else { + boolean clockWise = isClockWise(direction); + int x, y, width, height; + if (clockWise) { + x = startRec.x; + y = startRec.y; + width = Math.abs(realCell.column - startRec.x) + 1; // 加一是因为计算顺时针边框宽度或者高度的时候,没把realCell自身高度算进去 + height = Math.abs(realCell.row - startRec.y) + 1; + } else { + x = realCell.column; + y = realCell.row; + width = Math.abs(realCell.column - startRec.x) + startRec.width; + height = Math.abs(realCell.row - startRec.y) + startRec.height; + } + + // 上面的只计算了顺时针和逆时针的width,height,但是还要顺时针里面还要区分从左往右和从上往下,这里是用于修正 + boolean isHorizontal = isHorizontal(direction); + if (isHorizontal) { + height = startRec.height; // 水平方向,绘制的边框肯定就等于起始格子的高度 + } else { + width = startRec.width; // 垂直方向,绘制的边框肯定就等于起始给子的宽度 + } + rectangle.setBounds(x, y, width, height); } - return result; + return rectangle; } - private int calculateDragRectangleHeight(ColumnRow currentMouseCell, Rectangle startRec, int direction) { - int result = 0; - switch(direction) { - case DIRECTION_DOWN: - result = currentMouseCell.getRow() - startRec.y + 1; - break; - case DIRECTION_UP: - if (isInsideSelectedCell(currentMouseCell, startRec, direction)) { - result = startRec.y - currentMouseCell.getRow() + startRec.height; - } else { - result = startRec.height; - } - break; - case DIRECTION_RIGHT: - case DIRECTION_LEFT: - result = startRec.height; - break; - } - return result; + /** + * 判断拖拽方向是否是顺时针 从左往右,从上往下为顺时针,从右往左,从下往上为逆时针 + * @param direction 方向 + * @return 是否是顺时针 + */ + private boolean isClockWise(int direction) { + return direction == DIRECTION_DOWN || direction == DIRECTION_RIGHT; } - private boolean isOutECBlockPane(int evtX, int evtY) { - ElementCasePane reportPane = grid.getElementCasePane(); - if (reportPane instanceof ECBlockPane) { - return (evtY > reportPane.getBounds().height - ECBlockGap) || (evtX > reportPane.getBounds().width - ECBlockGap); - } - return true; + /** + * 判断拖拽方向是否为水平还是垂直 + * @param direction 方向 + * @return 是否为水平 + */ + private boolean isHorizontal(int direction) { + return direction == DIRECTION_RIGHT || direction == DIRECTION_LEFT; } - private boolean isInsideSelectedCell(ColumnRow currentMouseCell, Rectangle startRec, int direction) { - return (direction == DIRECTION_UP && currentMouseCell.getRow() >= startRec.y && currentMouseCell.getRow() < startRec.y + startRec.height) || - (direction == DIRECTION_LEFT && currentMouseCell.getColumn() >= startRec.x && currentMouseCell.getColumn() < startRec.x + startRec.width); + private boolean isOutECBlockPane(int evtX, int evtY) { + ElementCasePane reportPane = grid.getElementCasePane(); + return reportPane instanceof ECBlockPane && ((evtY > reportPane.getBounds().height - ECBlockGap) || (evtX > reportPane.getBounds().width - ECBlockGap)); } private void doShiftSelectCell(double evtX, double evtY) { From 34fd37a8780a2e4e82699bf5abec54a4a520de37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Tue, 13 Jul 2021 19:59:30 +0800 Subject: [PATCH 08/10] =?UTF-8?q?REPORT-54998=20=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/grid/GridMouseAdapter.java | 78 +++++-------------- 1 file changed, 19 insertions(+), 59 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java b/designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java index 7fb4af3293..b0f8fff467 100644 --- a/designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java +++ b/designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java @@ -464,8 +464,8 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous int xDistance = evtX - this.oldEvtX; int yDistance = evtY - this.oldEvtY; int dragDirection = calculateDragDirection(xDistance, yDistance); - ColumnRow realCell = calculateRealCell(currentMouseCell, startRec, dragDirection); - grid.getDragRectangle().setBounds(calculateDragRectangle(realCell, startRec, dragDirection)); + Rectangle endRec = calculateEndRec(currentMouseCell, startRec, dragDirection); + grid.getDragRectangle().setBounds(calculateDragRectangle(startRec, endRec)); reportPane.ensureColumnRowVisible(currentMouseCell.getColumn() + 1, currentMouseCell.getRow() + 1); } @@ -487,86 +487,46 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous } /** - * 计算当前十字标所在格子对应的真正参与计算拖拽边框的格子 + * 计算拖拽的结尾矩形 * @param currentMouseCell 当前鼠标所在的格子 * @param startRec 起始格子 * @param direction 拖拽方向 - * @return 当前十字标所在格子对应的真正参与计算拖拽边框的格子 + * @return 计算拖拽的结尾矩形 */ - private ColumnRow calculateRealCell(ColumnRow currentMouseCell, Rectangle startRec, int direction) { - ColumnRow realCell; + private Rectangle calculateEndRec(ColumnRow currentMouseCell, Rectangle startRec, int direction) { + Rectangle rec; switch(direction) { case DIRECTION_DOWN: case DIRECTION_UP: - realCell = ColumnRow.valueOf(startRec.x, currentMouseCell.row); + rec = new Rectangle(startRec.x, currentMouseCell.row, 1, 1); break; case DIRECTION_RIGHT: case DIRECTION_LEFT: - realCell = ColumnRow.valueOf(currentMouseCell.column, startRec.y); + rec = new Rectangle(currentMouseCell.column, startRec.y, 1, 1); break; default: - realCell = currentMouseCell; + rec = new Rectangle(); break; } - return realCell; + return rec; } /** - * 计算拖拽的边框 - * @param realCell 当前十字标所在格子对应的真正参与计算拖拽边框的格子 - * @param startRec 起始格子 - * @param direction 拖拽方向 + * 计算拖拽的边框,传俩矩形确认出一个大矩形,就是所要的结果 + * @param startRec 起始格子矩形 + * @param endRec 结尾格子矩形 * @return 拖拽的边框 */ - private Rectangle calculateDragRectangle(ColumnRow realCell, Rectangle startRec, int direction) { + private Rectangle calculateDragRectangle(Rectangle startRec, Rectangle endRec) { Rectangle rectangle = new Rectangle(); - if (startRec.contains(realCell.column, realCell.row)) { - rectangle.setBounds(startRec); - } else { - boolean clockWise = isClockWise(direction); - int x, y, width, height; - if (clockWise) { - x = startRec.x; - y = startRec.y; - width = Math.abs(realCell.column - startRec.x) + 1; // 加一是因为计算顺时针边框宽度或者高度的时候,没把realCell自身高度算进去 - height = Math.abs(realCell.row - startRec.y) + 1; - } else { - x = realCell.column; - y = realCell.row; - width = Math.abs(realCell.column - startRec.x) + startRec.width; - height = Math.abs(realCell.row - startRec.y) + startRec.height; - } - - // 上面的只计算了顺时针和逆时针的width,height,但是还要顺时针里面还要区分从左往右和从上往下,这里是用于修正 - boolean isHorizontal = isHorizontal(direction); - if (isHorizontal) { - height = startRec.height; // 水平方向,绘制的边框肯定就等于起始格子的高度 - } else { - width = startRec.width; // 垂直方向,绘制的边框肯定就等于起始给子的宽度 - } - rectangle.setBounds(x, y, width, height); - } + int x = Math.min(startRec.x, endRec.x); + int y = Math.min(startRec.y, endRec.y); + int rightBottomX = Math.max(startRec.x + startRec.width, endRec.x + endRec.width); + int rightBottomY = Math.max(startRec.y + startRec.height, endRec.y + endRec.height); + rectangle.setBounds(x, y, rightBottomX - x, rightBottomY - y); return rectangle; } - /** - * 判断拖拽方向是否是顺时针 从左往右,从上往下为顺时针,从右往左,从下往上为逆时针 - * @param direction 方向 - * @return 是否是顺时针 - */ - private boolean isClockWise(int direction) { - return direction == DIRECTION_DOWN || direction == DIRECTION_RIGHT; - } - - /** - * 判断拖拽方向是否为水平还是垂直 - * @param direction 方向 - * @return 是否为水平 - */ - private boolean isHorizontal(int direction) { - return direction == DIRECTION_RIGHT || direction == DIRECTION_LEFT; - } - private boolean isOutECBlockPane(int evtX, int evtY) { ElementCasePane reportPane = grid.getElementCasePane(); return reportPane instanceof ECBlockPane && ((evtY > reportPane.getBounds().height - ECBlockGap) || (evtX > reportPane.getBounds().width - ECBlockGap)); From bdad7f09e27485894ce414b1444d6a7eab1dbf56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Tue, 13 Jul 2021 20:15:42 +0800 Subject: [PATCH 09/10] =?UTF-8?q?REPORT-54998=20=E8=BF=9B=E4=B8=80?= =?UTF-8?q?=E6=AD=A5=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=EF=BC=8C=E5=8E=BB?= =?UTF-8?q?=E9=99=A4=E5=85=B7=E4=BD=93=E7=9A=84=E6=96=B9=E5=90=91=E5=88=A4?= =?UTF-8?q?=E6=96=AD=EF=BC=8C=E5=8F=AA=E7=95=99=E6=B0=B4=E5=B9=B3=E6=88=96?= =?UTF-8?q?=E8=80=85=E5=9E=82=E7=9B=B4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/grid/GridMouseAdapter.java | 44 +++++-------------- 1 file changed, 11 insertions(+), 33 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java b/designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java index b0f8fff467..0a6ba50421 100644 --- a/designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java +++ b/designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java @@ -463,52 +463,30 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous } int xDistance = evtX - this.oldEvtX; int yDistance = evtY - this.oldEvtY; - int dragDirection = calculateDragDirection(xDistance, yDistance); - Rectangle endRec = calculateEndRec(currentMouseCell, startRec, dragDirection); + boolean isHorizontal = isHorizontal(xDistance, yDistance); + Rectangle endRec = calculateEndRec(currentMouseCell, startRec, isHorizontal); grid.getDragRectangle().setBounds(calculateDragRectangle(startRec, endRec)); reportPane.ensureColumnRowVisible(currentMouseCell.getColumn() + 1, currentMouseCell.getRow() + 1); } - private int calculateDragDirection(int xDistance, int yDistance) { - if (Math.abs(yDistance) > Math.abs(xDistance)) { - if (yDistance >= 0) { - return DIRECTION_DOWN; - } else { - return DIRECTION_UP; - } - } else { - if (xDistance >= 0) { - return DIRECTION_RIGHT; - } else { - return DIRECTION_LEFT; - } - } + private boolean isHorizontal(int xDistance, int yDistance) { + return Math.abs(yDistance) <= Math.abs(xDistance); } /** * 计算拖拽的结尾矩形 * @param currentMouseCell 当前鼠标所在的格子 * @param startRec 起始格子 - * @param direction 拖拽方向 + * @param isHorizontal 拖拽方向 水平or垂直 * @return 计算拖拽的结尾矩形 */ - private Rectangle calculateEndRec(ColumnRow currentMouseCell, Rectangle startRec, int direction) { - Rectangle rec; - switch(direction) { - case DIRECTION_DOWN: - case DIRECTION_UP: - rec = new Rectangle(startRec.x, currentMouseCell.row, 1, 1); - break; - case DIRECTION_RIGHT: - case DIRECTION_LEFT: - rec = new Rectangle(currentMouseCell.column, startRec.y, 1, 1); - break; - default: - rec = new Rectangle(); - break; - } - return rec; + private Rectangle calculateEndRec(ColumnRow currentMouseCell, Rectangle startRec, boolean isHorizontal) { + if (isHorizontal) { + return new Rectangle(currentMouseCell.column, startRec.y, 1, 1); + } else { + return new Rectangle(startRec.x, currentMouseCell.row, 1, 1); + } } /** From b3ca4897870e1e88e3bedfc3491458209ba5aab5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Tue, 13 Jul 2021 20:16:29 +0800 Subject: [PATCH 10/10] =?UTF-8?q?REPORT-54998=20=E5=8E=BB=E9=99=A4?= =?UTF-8?q?=E5=A4=9A=E4=BD=99=E7=9A=84=E5=B8=B8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/grid/GridMouseAdapter.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java b/designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java index 0a6ba50421..dfd7f29fd5 100644 --- a/designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java +++ b/designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java @@ -46,10 +46,6 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous private static final int TOOLTIP_X_Y_FIX = 4; private static final double COPY_CROSS_INNER_DISTANCE = 1.5; private static final double COPY_CROSS_OUTER_DISTANCE = 2.5; - private static final int DIRECTION_UP = 1; - private static final int DIRECTION_DOWN = 2; - private static final int DIRECTION_LEFT = 3; - private static final int DIRECTION_RIGHT = 4; /** * 拖拽时候刷新时间间隔 */