Browse Source

REPORT-99740 FRM报表块,get (-1,-1)类型的ColumnRow报错

new-design
Coral.Chen 1 year ago
parent
commit
ee7d91a269
  1. 20
      designer-realize/src/main/java/com/fr/design/sort/common/SortColumnRowPane.java

20
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.EssentialUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.Icon;
import java.awt.*; 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.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator;
import java.util.Map; import java.util.Map;
public class SortColumnRowPane extends JPanel implements UIObserver { public class SortColumnRowPane extends JPanel implements UIObserver {
@ -260,8 +263,10 @@ public class SortColumnRowPane extends JPanel implements UIObserver {
disableHeaderCellsStyleMap = new HashMap<>(); disableHeaderCellsStyleMap = new HashMap<>();
tempHeaderCells = new ArrayList<>(); tempHeaderCells = new ArrayList<>();
for (ColumnRow columnRow : notSelectables) { for (ColumnRow columnRow : notSelectables) {
TemplateCellElement templateCellElement TemplateCellElement templateCellElement = null;
= elementCase.getTemplateCellElement(columnRow.column, columnRow.row); if (columnRow != ColumnRow.ERROR) {
templateCellElement = elementCase.getTemplateCellElement(columnRow.column, columnRow.row);
}
if (templateCellElement == null) { if (templateCellElement == null) {
templateCellElement = new DefaultTemplateCellElement(columnRow.column, columnRow.row); templateCellElement = new DefaultTemplateCellElement(columnRow.column, columnRow.row);
elementCase.addCellElement(templateCellElement); elementCase.addCellElement(templateCellElement);
@ -280,8 +285,11 @@ public class SortColumnRowPane extends JPanel implements UIObserver {
if (cellSelectionManager != null) { if (cellSelectionManager != null) {
try { try {
for (ColumnRow headerColumnRow : disableHeaderCellsStyleMap.keySet()) { for (ColumnRow headerColumnRow : disableHeaderCellsStyleMap.keySet()) {
TemplateCellElement headerTemplateCellElement TemplateCellElement headerTemplateCellElement = null;
if (headerColumnRow != ColumnRow.ERROR) {
headerTemplateCellElement
= elementCase.getTemplateCellElement(headerColumnRow.column, headerColumnRow.row); = elementCase.getTemplateCellElement(headerColumnRow.column, headerColumnRow.row);
}
if (headerTemplateCellElement != null) { if (headerTemplateCellElement != null) {
headerTemplateCellElement.setStyle(disableHeaderCellsStyleMap.get(headerColumnRow)); headerTemplateCellElement.setStyle(disableHeaderCellsStyleMap.get(headerColumnRow));
} }

Loading…
Cancel
Save