Browse Source

REPORT-119602 fix:韩语设计器鼠标失焦,选不到数据脱敏

final/11.0
obo 3 months ago
parent
commit
79db43c1a6
  1. 42
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/model/DesensitizationCellPane.java

42
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/model/DesensitizationCellPane.java

@ -1,6 +1,5 @@
package com.fr.design.mainframe.cell.settingpane.desensitization.model; package com.fr.design.mainframe.cell.settingpane.desensitization.model;
import com.fr.base.operator.org.OrganizationOperator;
import com.fr.data.desensitize.rule.DesensitizationRuleManager; import com.fr.data.desensitize.rule.DesensitizationRuleManager;
import com.fr.data.desensitize.rule.base.DesensitizationRule; import com.fr.data.desensitize.rule.base.DesensitizationRule;
import com.fr.data.desensitize.rule.base.DesensitizationRuleSource; import com.fr.data.desensitize.rule.base.DesensitizationRuleSource;
@ -10,27 +9,19 @@ import com.fr.design.data.datapane.preview.desensitization.view.rule.Desensitiza
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icombocheckbox.UIComboCheckBox; import com.fr.design.gui.icombocheckbox.UIComboCheckBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.layout.VerticalFlowLayout;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.mainframe.JTemplateActionListener;
import com.fr.report.cell.desensitization.CellDesensitizationBean; import com.fr.report.cell.desensitization.CellDesensitizationBean;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.third.org.apache.commons.collections4.map.HashedMap; import com.fr.third.org.apache.commons.collections4.map.HashedMap;
import com.fr.workspace.WorkContext;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.SwingUtilities; import javax.swing.SwingUtilities;
import javax.swing.SwingWorker;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color; import java.awt.Color;
import java.awt.Component; import java.awt.Component;
@ -43,7 +34,10 @@ import java.util.Map;
import java.util.Objects; import java.util.Objects;
import java.util.Optional; import java.util.Optional;
import java.util.Set; import java.util.Set;
import java.util.concurrent.ExecutionException;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.row;
/** /**
* 单元格脱敏规则设置面板 * 单元格脱敏规则设置面板
@ -78,12 +72,10 @@ public class DesensitizationCellPane extends BasicBeanPane {
} }
private void initComponent() { private void initComponent() {
editPanel = new JPanel(); editPanel = new JPanel(new BorderLayout());
editPanel.setLayout(new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 0, true));
label = new UILabel(); label = new UILabel();
label.setEnabled(false); label.setEnabled(false);
editPanel.add(label);
ruleButton = new UIButton(APOSTROPHE); ruleButton = new UIButton(APOSTROPHE);
@ -102,25 +94,25 @@ public class DesensitizationCellPane extends BasicBeanPane {
emptyTextField.setEnabled(false); emptyTextField.setEnabled(false);
emptyTextField.setOpaque(false); emptyTextField.setOpaque(false);
editPanel.add(initTableCellPanel()); editPanel.add(
column(
row(cell(label)),
cell(initTableCellPanel()).weight(2)
).weight(1).getComponent()
);
} }
/** /**
* 初始化单元格中的panel * 初始化单元格中的panel
*/ */
private JPanel initTableCellPanel() { private Component initTableCellPanel() {
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
double[] rowSize = new double[]{f, f}; return column(
double[] columnSize = new double[]{p, f}; row(cell(ruleButton).weight(1), cell(ruleTextField).weight(4)),
row(cell(emptyTextField).weight(1), cell(rolesComboBox).weight(4))
Component[][] components = new Component[][]{ ).getComponent();
new Component[]{ruleButton, ruleTextField},
new Component[]{emptyTextField, rolesComboBox}
};
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 0, 0);
} }
private void addListener() { private void addListener() {

Loading…
Cancel
Save