From 20452f96e5bc2a55856ac3158e82a4d38e0d9498 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Thu, 9 Dec 2021 22:56:03 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-62440=20=E8=A1=A8=E5=A4=B4=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E5=86=85=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sort/celldscolumn/CellDSColumnSortGroupPane.java | 2 -- .../sort/celldscolumn/CellDSColumnSortItemPane.java | 2 -- .../fr/design/sort/celldscolumn/CellDSColumnSortPane.java | 7 +------ .../design/sort/cellexpand/CellExpandSortGroupPane.java | 1 - .../fr/design/sort/cellexpand/CellExpandSortItemPane.java | 1 - .../com/fr/design/sort/cellexpand/CellExpandSortPane.java | 1 - .../com/fr/design/sort/common/AbstractSortItemPane.java | 5 ----- .../java/com/fr/design/sort/common/AbstractSortPane.java | 5 ----- .../java/com/fr/design/sort/common/SortColumnRowPane.java | 1 - .../com/fr/design/sort/common/SortUIExpandablePane.java | 1 - .../sort/expressionpane/CellSortExpressionPane.java | 1 - .../sort/expressionpane/CustomSequenceEditPane.java | 1 - .../fr/design/sort/expressionpane/CustomSequencePane.java | 8 ++------ .../expressionpane/CustomSequenceSortExpressionPane.java | 2 -- .../java/com/fr/design/sort/header/HeaderAreaPane.java | 3 --- .../java/com/fr/design/sort/header/HeaderSettingPane.java | 1 - .../com/fr/design/sort/header/HeaderSortRulePane.java | 6 ------ .../java/com/fr/design/sort/header/SortHeaderPane.java | 6 +----- 18 files changed, 4 insertions(+), 50 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/sort/celldscolumn/CellDSColumnSortGroupPane.java b/designer-realize/src/main/java/com/fr/design/sort/celldscolumn/CellDSColumnSortGroupPane.java index f5cdd0a8d9..c74c3c9e3e 100644 --- a/designer-realize/src/main/java/com/fr/design/sort/celldscolumn/CellDSColumnSortGroupPane.java +++ b/designer-realize/src/main/java/com/fr/design/sort/celldscolumn/CellDSColumnSortGroupPane.java @@ -11,7 +11,6 @@ import com.fr.report.core.sort.sortexpression.SortExpression; public class CellDSColumnSortGroupPane extends AbstractSortGroupPane { DSColumn dsColumn; - public CellDSColumnSortGroupPane(int sortGroupPaneWidth, int sortGroupPaneRightWidth) { super(sortGroupPaneWidth, sortGroupPaneRightWidth); } @@ -20,7 +19,6 @@ public class CellDSColumnSortGroupPane extends AbstractSortGroupPane { this.dsColumn = dsColumn; } - @Override protected AbstractSortItemPane refreshSortItemPane(int sortItemPaneWidth, int sortItemPaneRightWidth, SortExpression sortExpression) { CellDSColumnSortItemPane cellDSColumnSortItemPane = new CellDSColumnSortItemPane( sortItemPaneWidth, sortItemPaneRightWidth); diff --git a/designer-realize/src/main/java/com/fr/design/sort/celldscolumn/CellDSColumnSortItemPane.java b/designer-realize/src/main/java/com/fr/design/sort/celldscolumn/CellDSColumnSortItemPane.java index c87b729e65..cd7b33ee02 100644 --- a/designer-realize/src/main/java/com/fr/design/sort/celldscolumn/CellDSColumnSortItemPane.java +++ b/designer-realize/src/main/java/com/fr/design/sort/celldscolumn/CellDSColumnSortItemPane.java @@ -12,7 +12,6 @@ import java.awt.*; public class CellDSColumnSortItemPane extends AbstractSortItemPane { - UIComboBox sortAreaUiComboBox; public CellDSColumnSortItemPane(int sortItemPaneWidth, int sortItemPaneRightWidth) { @@ -44,7 +43,6 @@ public class CellDSColumnSortItemPane extends AbstractSortItemPane { sortAreaUiComboBox.registerChangeListener(uiObserverListener); } - public void removeListener(UIObserverListener uiObserverListener) { super.removeListener(uiObserverListener); sortAreaUiComboBox.removeChangeListener(); diff --git a/designer-realize/src/main/java/com/fr/design/sort/celldscolumn/CellDSColumnSortPane.java b/designer-realize/src/main/java/com/fr/design/sort/celldscolumn/CellDSColumnSortPane.java index 20c65cb801..c215ab1507 100644 --- a/designer-realize/src/main/java/com/fr/design/sort/celldscolumn/CellDSColumnSortPane.java +++ b/designer-realize/src/main/java/com/fr/design/sort/celldscolumn/CellDSColumnSortPane.java @@ -9,20 +9,16 @@ import com.fr.report.core.sort.common.CellSortAttr; public class CellDSColumnSortPane extends AbstractSortPane { - public CellDSColumnSortPane() { super(220, 150); - } - @Override protected void initSortGroupPane() { sortGroupPane = new CellDSColumnSortGroupPane(sortPaneWidth, sortPaneRightWidth); this.add(sortGroupPane); } - @Override protected CellSortAttr getCellSortAttr(TemplateCellElement cellElement) { if (cellElement.getValue() instanceof DSColumn) { @@ -40,13 +36,12 @@ public class CellDSColumnSortPane extends AbstractSortPane { if (cellElement.getValue() instanceof DSColumn) { DSColumn dsColumn = ((DSColumn) cellElement.getValue()); TableDataColumn tableDataColumn = dsColumn.getColumn(); - if (tableDataColumn instanceof TableDataColumn.ColumnName) { + if (tableDataColumn instanceof TableDataColumn) { selfSortArea = TableDataColumn.getColumnName(tableDataColumn); } } } - public void populateBean(TemplateCellElement cellElement) { if (cellElement.getValue() instanceof DSColumn) { DSColumn dsColumn = ((DSColumn) cellElement.getValue()); diff --git a/designer-realize/src/main/java/com/fr/design/sort/cellexpand/CellExpandSortGroupPane.java b/designer-realize/src/main/java/com/fr/design/sort/cellexpand/CellExpandSortGroupPane.java index 330b43d739..62cb37e91f 100644 --- a/designer-realize/src/main/java/com/fr/design/sort/cellexpand/CellExpandSortGroupPane.java +++ b/designer-realize/src/main/java/com/fr/design/sort/cellexpand/CellExpandSortGroupPane.java @@ -6,7 +6,6 @@ import com.fr.report.core.sort.sortexpression.SortExpression; public class CellExpandSortGroupPane extends AbstractSortGroupPane { - public CellExpandSortGroupPane(int sortGroupPaneWidth, int sortGroupPaneRightWidth) { super(sortGroupPaneWidth, sortGroupPaneRightWidth); } diff --git a/designer-realize/src/main/java/com/fr/design/sort/cellexpand/CellExpandSortItemPane.java b/designer-realize/src/main/java/com/fr/design/sort/cellexpand/CellExpandSortItemPane.java index 3812fbaf62..12be4ec20d 100644 --- a/designer-realize/src/main/java/com/fr/design/sort/cellexpand/CellExpandSortItemPane.java +++ b/designer-realize/src/main/java/com/fr/design/sort/cellexpand/CellExpandSortItemPane.java @@ -41,7 +41,6 @@ public class CellExpandSortItemPane extends AbstractSortItemPane { columnRowPane.addListener(uiObserverListener); } - public void removeListener(UIObserverListener uiObserverListener) { super.removeListener(uiObserverListener); columnRowPane.removeListener(uiObserverListener); diff --git a/designer-realize/src/main/java/com/fr/design/sort/cellexpand/CellExpandSortPane.java b/designer-realize/src/main/java/com/fr/design/sort/cellexpand/CellExpandSortPane.java index 36243533d3..e230d319dd 100644 --- a/designer-realize/src/main/java/com/fr/design/sort/cellexpand/CellExpandSortPane.java +++ b/designer-realize/src/main/java/com/fr/design/sort/cellexpand/CellExpandSortPane.java @@ -27,7 +27,6 @@ public class CellExpandSortPane extends AbstractSortPane { this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); } - @Override protected void initSortGroupPane() { sortGroupPane = new CellExpandSortGroupPane(sortPaneWidth, sortPaneRightWidth); diff --git a/designer-realize/src/main/java/com/fr/design/sort/common/AbstractSortItemPane.java b/designer-realize/src/main/java/com/fr/design/sort/common/AbstractSortItemPane.java index 8a86813396..0e58985528 100644 --- a/designer-realize/src/main/java/com/fr/design/sort/common/AbstractSortItemPane.java +++ b/designer-realize/src/main/java/com/fr/design/sort/common/AbstractSortItemPane.java @@ -21,7 +21,6 @@ import java.util.ArrayList; import java.util.List; public abstract class AbstractSortItemPane extends JPanel { - protected int sortItemPaneWidth; protected int sortItemPaneRightWidth; List sortExpressionPanes = new ArrayList<>(); @@ -73,7 +72,6 @@ public abstract class AbstractSortItemPane extends JPanel { this.add(sortRulePane); } - void initSortBasisPanel() { sortBasisPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, AbstractSortPane.PANE_COMPONENT_V_GAP)); sortBasisUiComboBox = new UIComboBox(getSortNames()); @@ -90,8 +88,6 @@ public abstract class AbstractSortItemPane extends JPanel { } } }); - - sortBasisPanel.add(new UILabel(Toolkit.i18nText("Fine-Design_Sort_Sort_Basis"), SwingConstants.LEFT)); sortBasisPanel.add(AbstractSortPane.createIntervalUILabel()); sortBasisPanel.add(sortBasisUiComboBox); @@ -124,7 +120,6 @@ public abstract class AbstractSortItemPane extends JPanel { } else if (sortExpression.getSortRule() == SortRule.NO_SORT) { sortRuleUiComboBox.setSelectedIndex(2); } - for (int i = 0; i < sortExpressionPanes.size(); i++) { if (StringUtils.equals(sortExpression.getSortName(), sortExpressionPanes.get(i).getSortName())) { if (currentSortExpressionPane != null) { diff --git a/designer-realize/src/main/java/com/fr/design/sort/common/AbstractSortPane.java b/designer-realize/src/main/java/com/fr/design/sort/common/AbstractSortPane.java index 35e8a3c096..24e1f6bac8 100644 --- a/designer-realize/src/main/java/com/fr/design/sort/common/AbstractSortPane.java +++ b/designer-realize/src/main/java/com/fr/design/sort/common/AbstractSortPane.java @@ -28,7 +28,6 @@ public abstract class AbstractSortPane extends JPanel { protected String selfSortArea; protected String defaultHeaderArea; - public AbstractSortPane(int sortPaneWidth, int sortPaneRightWidth) { this.sortPaneWidth = sortPaneWidth; this.sortPaneRightWidth = sortPaneRightWidth; @@ -36,7 +35,6 @@ public abstract class AbstractSortPane extends JPanel { initComponents(); } - private void initComponents() { initSortGroupPane(); sortHeaderPane = new SortHeaderPane(sortPaneWidth, sortPaneRightWidth + 5); @@ -46,7 +44,6 @@ public abstract class AbstractSortPane extends JPanel { protected abstract void initSortGroupPane(); protected void initUIObserverListener() { - } protected abstract CellSortAttr getCellSortAttr(TemplateCellElement cellElement); @@ -72,7 +69,6 @@ public abstract class AbstractSortPane extends JPanel { refresh(); } - protected void populateSortArea(TemplateCellElement cellElement) { int row = cellElement.getRow(); int column = cellElement.getColumn(); @@ -107,7 +103,6 @@ public abstract class AbstractSortPane extends JPanel { sortHeaderPane.removeListener(uiObserverListener); } - protected void refresh() { validate(); repaint(); diff --git a/designer-realize/src/main/java/com/fr/design/sort/common/SortColumnRowPane.java b/designer-realize/src/main/java/com/fr/design/sort/common/SortColumnRowPane.java index 489f136bee..814651063b 100644 --- a/designer-realize/src/main/java/com/fr/design/sort/common/SortColumnRowPane.java +++ b/designer-realize/src/main/java/com/fr/design/sort/common/SortColumnRowPane.java @@ -61,7 +61,6 @@ public class SortColumnRowPane extends JPanel { return columnRow != null && columnRow.getRow() != -1 && columnRow.getColumn() != -1; } - void initTextField() { colJTextField = new JTextField(); colJTextField.setEditable(false); diff --git a/designer-realize/src/main/java/com/fr/design/sort/common/SortUIExpandablePane.java b/designer-realize/src/main/java/com/fr/design/sort/common/SortUIExpandablePane.java index 47c6c62cc7..88e61a4e34 100644 --- a/designer-realize/src/main/java/com/fr/design/sort/common/SortUIExpandablePane.java +++ b/designer-realize/src/main/java/com/fr/design/sort/common/SortUIExpandablePane.java @@ -13,7 +13,6 @@ import java.awt.event.MouseEvent; public class SortUIExpandablePane extends JPanel { - private static final long serialVersionUID = 1L; private HeaderPane headerPane; private AbstractSortItemPane contentPane; diff --git a/designer-realize/src/main/java/com/fr/design/sort/expressionpane/CellSortExpressionPane.java b/designer-realize/src/main/java/com/fr/design/sort/expressionpane/CellSortExpressionPane.java index 5891cfcf09..1381b92cf2 100644 --- a/designer-realize/src/main/java/com/fr/design/sort/expressionpane/CellSortExpressionPane.java +++ b/designer-realize/src/main/java/com/fr/design/sort/expressionpane/CellSortExpressionPane.java @@ -13,7 +13,6 @@ public class CellSortExpressionPane extends SortExpressionPane customSequence; @@ -28,13 +27,10 @@ public class CustomSequencePane extends JPanel { } protected void initComponents(int width) { - textField = new UITextField(); textField.setEditable(false); textField.setPreferredSize(new Dimension(width - 20, 20)); - - // 添加一公式编辑器按钮 - Icon icon = BaseUtils.readIcon("/com/fr/design/images/control/refresh.png"); + Icon icon = IconUtils.readIcon("/com/fr/design/images/control/refresh.png"); button = new UIButton(icon); button.setBackground(Color.RED); button.setPreferredSize(new Dimension(24, 20)); diff --git a/designer-realize/src/main/java/com/fr/design/sort/expressionpane/CustomSequenceSortExpressionPane.java b/designer-realize/src/main/java/com/fr/design/sort/expressionpane/CustomSequenceSortExpressionPane.java index 6ce23b8e7c..56ccfc511b 100644 --- a/designer-realize/src/main/java/com/fr/design/sort/expressionpane/CustomSequenceSortExpressionPane.java +++ b/designer-realize/src/main/java/com/fr/design/sort/expressionpane/CustomSequenceSortExpressionPane.java @@ -1,7 +1,5 @@ package com.fr.design.sort.expressionpane; - -import com.fr.design.i18n.Toolkit; import com.fr.design.sort.common.AbstractSortPane; import com.fr.locale.InterProviderFactory; import com.fr.report.core.sort.sortexpression.CustomSequenceSortExpression; diff --git a/designer-realize/src/main/java/com/fr/design/sort/header/HeaderAreaPane.java b/designer-realize/src/main/java/com/fr/design/sort/header/HeaderAreaPane.java index 799be4f67a..8a728cae17 100644 --- a/designer-realize/src/main/java/com/fr/design/sort/header/HeaderAreaPane.java +++ b/designer-realize/src/main/java/com/fr/design/sort/header/HeaderAreaPane.java @@ -33,7 +33,6 @@ public class HeaderAreaPane extends JPanel { initLayeredPane(); } - void initUILabel() { UILabel uiLabel = new UILabel(Toolkit.i18nText("Fine-Design_Sort_Header_Area"), SwingConstants.LEFT); this.add(uiLabel); @@ -45,7 +44,6 @@ public class HeaderAreaPane extends JPanel { this.add(areaJLayeredPane); } - public void populateBean(ColumnRow columnRow) { areaJLayeredPane.populateBean(columnRow); } @@ -142,7 +140,6 @@ public class HeaderAreaPane extends JPanel { areaJLayeredPane.addListener(uiObserverListener); } - public void removeListener(UIObserverListener uiObserverListener) { areaJLayeredPane.removeListener(uiObserverListener); } diff --git a/designer-realize/src/main/java/com/fr/design/sort/header/HeaderSettingPane.java b/designer-realize/src/main/java/com/fr/design/sort/header/HeaderSettingPane.java index 7d4f3663cf..38d75e55e5 100644 --- a/designer-realize/src/main/java/com/fr/design/sort/header/HeaderSettingPane.java +++ b/designer-realize/src/main/java/com/fr/design/sort/header/HeaderSettingPane.java @@ -84,7 +84,6 @@ public class HeaderSettingPane extends JPanel { headerSortRulePane.addListener(uiObserverListener); } - public void removeListener(UIObserverListener uiObserverListener) { uiCheckBox.removeChangeListener(); headerSortRulePane.removeListener(uiObserverListener); diff --git a/designer-realize/src/main/java/com/fr/design/sort/header/HeaderSortRulePane.java b/designer-realize/src/main/java/com/fr/design/sort/header/HeaderSortRulePane.java index dc9b4f615c..0bff87af5c 100644 --- a/designer-realize/src/main/java/com/fr/design/sort/header/HeaderSortRulePane.java +++ b/designer-realize/src/main/java/com/fr/design/sort/header/HeaderSortRulePane.java @@ -23,8 +23,6 @@ import java.io.InputStream; import java.util.ArrayList; public class HeaderSortRulePane extends JPanel { - - private static final String ASC_ICON_TEMPLATE_PATH = "/com/fr/design/images/sort/asc.svg"; private static final String DES_ICON_TEMPLATE_PATH = "/com/fr/design/images/sort/des.svg"; private static final String NOSORT_ICON_TEMPLATE_PATH = "/com/fr/design/images/sort/nosort.svg"; @@ -35,7 +33,6 @@ public class HeaderSortRulePane extends JPanel { UICheckBox desUICheckBox; UICheckBox nosortUICheckBox; - HeaderSortRulePane() { initComponents(); initState(); @@ -75,7 +72,6 @@ public class HeaderSortRulePane extends JPanel { nosortIconButton.refreshIconLabelColor(new Color(33, 33, 34)); } - class IconButton extends JPanel { JLayeredPane jLayeredPane; String iconTemplatePath; @@ -195,7 +191,6 @@ public class HeaderSortRulePane extends JPanel { } } - public void populateBean(SortHeader.SortItem[] sortItems) { initState(); if (sortItems != null) { @@ -245,7 +240,6 @@ public class HeaderSortRulePane extends JPanel { nosortUICheckBox.registerChangeListener(uiObserverListener); } - public void removeListener(UIObserverListener uiObserverListener) { ascIconButton.removeListener(uiObserverListener); desIconButton.removeListener(uiObserverListener); diff --git a/designer-realize/src/main/java/com/fr/design/sort/header/SortHeaderPane.java b/designer-realize/src/main/java/com/fr/design/sort/header/SortHeaderPane.java index 2780139338..ff8807d835 100644 --- a/designer-realize/src/main/java/com/fr/design/sort/header/SortHeaderPane.java +++ b/designer-realize/src/main/java/com/fr/design/sort/header/SortHeaderPane.java @@ -22,7 +22,6 @@ public class SortHeaderPane extends JPanel { this.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); } - void initHeaderArea() { this.headerAreaPane = new HeaderAreaPane(sortHeaderPaneWidth, sortHeaderPaneRightWidth); this.add(headerAreaPane); @@ -33,7 +32,6 @@ public class SortHeaderPane extends JPanel { this.add(headerSettingPane); } - public void populateBean(SortHeader sortHeader, String defaultHeaderArea) { this.sortHeader = sortHeader; ColumnRow columnRow = null; @@ -65,10 +63,8 @@ public class SortHeaderPane extends JPanel { headerSettingPane.addListener(uiObserverListener); } - public void removeListener(UIObserverListener uiObserverListener) { headerAreaPane.removeListener(uiObserverListener); headerSettingPane.removeListener(uiObserverListener); } -} - +} \ No newline at end of file