From 7456d860fb8450619aea6453a20598c6a4e46174 Mon Sep 17 00:00:00 2001 From: obo Date: Wed, 15 May 2024 10:46:01 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-119405=20=E8=A7=A3=E5=86=B3=E6=89=93?= =?UTF-8?q?=E5=8C=85=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../view/rule/DesensitizationRuleChoosePane.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/rule/DesensitizationRuleChoosePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/rule/DesensitizationRuleChoosePane.java index 0cd81e32fa..54b139a3dd 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/rule/DesensitizationRuleChoosePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/rule/DesensitizationRuleChoosePane.java @@ -16,14 +16,15 @@ import com.fr.design.i18n.DesignSizeI18nManager; import com.fr.design.i18n.Toolkit; import com.fr.stable.StringUtils; import com.fr.stable.collections.CollectionUtils; -import sun.swing.table.DefaultTableCellHeaderRenderer; import javax.swing.AbstractCellEditor; import javax.swing.BorderFactory; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTable; +import javax.swing.SwingConstants; import javax.swing.SwingUtilities; +import javax.swing.table.DefaultTableCellRenderer; import javax.swing.table.TableCellEditor; import javax.swing.table.TableCellRenderer; import java.awt.CardLayout; @@ -135,12 +136,12 @@ public class DesensitizationRuleChoosePane extends JPanel { this.setDefaultRenderer(DesensitizationRuleStatusPane.class, new DesensitizationRuleStatusPane()); this.createTable().getColumnModel().getColumn(0).setMaxWidth(20); this.createTable().getColumnModel().getColumn(3).setMaxWidth(60); - this.createTable().getColumnModel().getColumn(3).setHeaderRenderer(new DefaultTableCellHeaderRenderer() { + this.createTable().getColumnModel().getColumn(3).setHeaderRenderer(new DefaultTableCellRenderer() { @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { JLabel headerLabel = new JLabel(value != null ? value.toString() : ""); headerLabel.setToolTipText((String) value); - headerLabel.setHorizontalAlignment(JLabel.CENTER); + headerLabel.setHorizontalAlignment(SwingConstants.CENTER); headerLabel.setBorder(BorderFactory.createMatteBorder(0, 0, 3, 0, new Color(216, 216, 216, 175))); return headerLabel; }