From ee7d91a269f46867481be4cc8de8a1ffd004e766 Mon Sep 17 00:00:00 2001 From: "Coral.Chen" Date: Thu, 27 Jul 2023 13:57:03 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-99740=20FRM=E6=8A=A5=E8=A1=A8=E5=9D=97?= =?UTF-8?q?=EF=BC=8Cget=20(-1,-1)=E7=B1=BB=E5=9E=8B=E7=9A=84ColumnRow?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/sort/common/SortColumnRowPane.java | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) 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 19b8ad50ad..0db7af4a12 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 @@ -24,13 +24,16 @@ import com.fr.stable.ColumnRow; import com.fr.stable.EssentialUtils; import com.fr.stable.StringUtils; -import javax.swing.*; -import java.awt.*; +import javax.swing.Icon; +import javax.swing.JPanel; +import javax.swing.JTextField; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.FlowLayout; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.util.ArrayList; import java.util.HashMap; -import java.util.Iterator; import java.util.Map; public class SortColumnRowPane extends JPanel implements UIObserver { @@ -260,8 +263,10 @@ public class SortColumnRowPane extends JPanel implements UIObserver { disableHeaderCellsStyleMap = new HashMap<>(); tempHeaderCells = new ArrayList<>(); for (ColumnRow columnRow : notSelectables) { - TemplateCellElement templateCellElement - = elementCase.getTemplateCellElement(columnRow.column, columnRow.row); + TemplateCellElement templateCellElement = null; + if (columnRow != ColumnRow.ERROR) { + templateCellElement = elementCase.getTemplateCellElement(columnRow.column, columnRow.row); + } if (templateCellElement == null) { templateCellElement = new DefaultTemplateCellElement(columnRow.column, columnRow.row); elementCase.addCellElement(templateCellElement); @@ -280,8 +285,11 @@ public class SortColumnRowPane extends JPanel implements UIObserver { if (cellSelectionManager != null) { try { for (ColumnRow headerColumnRow : disableHeaderCellsStyleMap.keySet()) { - TemplateCellElement headerTemplateCellElement - = elementCase.getTemplateCellElement(headerColumnRow.column, headerColumnRow.row); + TemplateCellElement headerTemplateCellElement = null; + if (headerColumnRow != ColumnRow.ERROR) { + headerTemplateCellElement + = elementCase.getTemplateCellElement(headerColumnRow.column, headerColumnRow.row); + } if (headerTemplateCellElement != null) { headerTemplateCellElement.setStyle(disableHeaderCellsStyleMap.get(headerColumnRow)); }