|
|
|
@ -1,5 +1,7 @@
|
|
|
|
|
package com.fr.design.data.datapane.preview.desensitization.view.rule; |
|
|
|
|
|
|
|
|
|
import com.fine.swing.ui.layout.Column; |
|
|
|
|
import com.fine.swing.ui.layout.Layouts; |
|
|
|
|
import com.fr.data.desensitize.rule.base.DesensitizationCondition; |
|
|
|
|
import com.fr.data.desensitize.rule.base.DesensitizationRule; |
|
|
|
|
import com.fr.data.desensitize.rule.base.DesensitizationRuleSource; |
|
|
|
@ -28,6 +30,10 @@ import java.awt.event.FocusListener;
|
|
|
|
|
import java.util.Arrays; |
|
|
|
|
import java.util.Set; |
|
|
|
|
|
|
|
|
|
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; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 脱敏规则编辑页 |
|
|
|
|
* |
|
|
|
@ -157,26 +163,29 @@ public class DesensitizationRuleEditPane extends BasicBeanPane<DesensitizationRu
|
|
|
|
|
JPanel panel = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
|
cardLayout = new CardLayout(); |
|
|
|
|
ruleConditionPane = new JPanel(cardLayout); |
|
|
|
|
// 字符替换
|
|
|
|
|
JPanel characterReplacePane = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane(); |
|
|
|
|
UILabel retainFrontLabel = new UILabel(Toolkit.i18nText("Fine-Design_Report_Desensitization_Part_One") + StringUtils.BLANK); |
|
|
|
|
retainFrontTextField = new UINumberField(5); |
|
|
|
|
retainFrontTextField.addFocusListener(retainFrontListener); |
|
|
|
|
|
|
|
|
|
UILabel retainBackLabel = new UILabel(StringUtils.BLANK + Toolkit.i18nText("Fine-Design_Report_Desensitization_Part_Two") + StringUtils.BLANK); |
|
|
|
|
retainBackTextField = new UINumberField(5); |
|
|
|
|
retainBackTextField.addFocusListener(retainBackListener); |
|
|
|
|
|
|
|
|
|
UILabel replaceLabel = new UILabel(StringUtils.BLANK + Toolkit.i18nText("Fine-Design_Report_Desensitization_Part_Three") + StringUtils.BLANK); |
|
|
|
|
firstSymbolTextField = new UITextField(10); |
|
|
|
|
firstSymbolTextField.addFocusListener(firstSymbolListener); |
|
|
|
|
|
|
|
|
|
characterReplacePane.add(retainFrontLabel); |
|
|
|
|
characterReplacePane.add(retainFrontTextField); |
|
|
|
|
characterReplacePane.add(retainBackLabel); |
|
|
|
|
characterReplacePane.add(retainBackTextField); |
|
|
|
|
characterReplacePane.add(replaceLabel); |
|
|
|
|
characterReplacePane.add(firstSymbolTextField); |
|
|
|
|
// 字符替换
|
|
|
|
|
Layouts.Cell<Column> column = column( |
|
|
|
|
4, |
|
|
|
|
row( |
|
|
|
|
cell(new UILabel(Toolkit.i18nText("Fine-Design_Report_Desensitization_Part_One") + StringUtils.BLANK)), |
|
|
|
|
cell(retainFrontTextField), |
|
|
|
|
cell(new UILabel(StringUtils.BLANK + Toolkit.i18nText("Fine-Design_Report_Desensitization_Part_Two") + StringUtils.BLANK)), |
|
|
|
|
cell(retainBackTextField), |
|
|
|
|
cell(new UILabel(StringUtils.BLANK + Toolkit.i18nText("Fine-Design_Report_Desensitization_Part_Four") + StringUtils.BLANK)) |
|
|
|
|
), |
|
|
|
|
row( |
|
|
|
|
cell(new UILabel(Toolkit.i18nText("Fine-Design_Report_Desensitization_Part_Three") + StringUtils.BLANK)), |
|
|
|
|
cell(firstSymbolTextField) |
|
|
|
|
) |
|
|
|
|
); |
|
|
|
|
// 整体替换
|
|
|
|
|
JPanel characterAllReplacePane = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane(); |
|
|
|
|
UILabel allReplaceLabel = new UILabel(Toolkit.i18nText("Fine-Design_Report_Desensitization_All_Character_Replace_By") + StringUtils.BLANK); |
|
|
|
@ -186,7 +195,7 @@ public class DesensitizationRuleEditPane extends BasicBeanPane<DesensitizationRu
|
|
|
|
|
characterAllReplacePane.add(allReplaceLabel); |
|
|
|
|
characterAllReplacePane.add(secondSymbolTextField); |
|
|
|
|
|
|
|
|
|
ruleConditionPane.add(characterReplacePane, DesensitizationRuleType.CHARACTER_REPLACE.getRuleTypeName()); |
|
|
|
|
ruleConditionPane.add(column.getComponent(), DesensitizationRuleType.CHARACTER_REPLACE.getRuleTypeName()); |
|
|
|
|
ruleConditionPane.add(characterAllReplacePane, DesensitizationRuleType.ALL_CHARACTERS_REPLACE.getRuleTypeName()); |
|
|
|
|
// 初始化状态为字符替换
|
|
|
|
|
switchRuleConditionPane(DesensitizationRuleType.CHARACTER_REPLACE); |
|
|
|
|