Browse Source

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

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

44
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;
import com.fr.base.operator.org.OrganizationOperator;
import com.fr.data.desensitize.rule.DesensitizationRuleManager;
import com.fr.data.desensitize.rule.base.DesensitizationRule;
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.DialogActionAdapter;
import com.fr.design.event.UIObserverListener;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icombocheckbox.UIComboCheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit;
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.stable.StringUtils;
import com.fr.third.org.apache.commons.collections4.map.HashedMap;
import com.fr.workspace.WorkContext;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.SwingWorker;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
@ -43,7 +34,10 @@ import java.util.Map;
import java.util.Objects;
import java.util.Optional;
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() {
editPanel = new JPanel();
editPanel.setLayout(new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 0, true));
editPanel = new JPanel(new BorderLayout());
label = new UILabel();
label.setEnabled(false);
editPanel.add(label);
ruleButton = new UIButton(APOSTROPHE);
@ -102,25 +94,25 @@ public class DesensitizationCellPane extends BasicBeanPane {
emptyTextField.setEnabled(false);
emptyTextField.setOpaque(false);
editPanel.add(initTableCellPanel());
editPanel.add(
column(
row(cell(label)),
cell(initTableCellPanel()).weight(2)
).weight(1).getComponent()
);
}
/**
* 初始化单元格中的panel
*/
private JPanel initTableCellPanel() {
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
double[] rowSize = new double[]{f, f};
double[] columnSize = new double[]{p, f};
Component[][] components = new Component[][]{
new Component[]{ruleButton, ruleTextField},
new Component[]{emptyTextField, rolesComboBox}
};
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 0, 0);
private Component initTableCellPanel() {
return column(
row(cell(ruleButton).weight(1), cell(ruleTextField).weight(4)),
row(cell(emptyTextField).weight(1), cell(rolesComboBox).weight(4))
).getComponent();
}
private void addListener() {

Loading…
Cancel
Save