|
|
|
@ -12,7 +12,6 @@ import com.fr.design.gui.ibutton.UIButtonGroup;
|
|
|
|
|
import com.fr.design.gui.ibutton.UIRadioButton; |
|
|
|
|
import com.fr.design.gui.icheckbox.UICheckBox; |
|
|
|
|
import com.fr.design.gui.icombobox.UIComboBox; |
|
|
|
|
import com.fr.design.gui.ilable.MultilineLabel; |
|
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
|
import com.fr.design.gui.ispinner.UISpinner; |
|
|
|
|
import com.fr.design.gui.itextfield.UITextField; |
|
|
|
@ -129,8 +128,8 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
|
|
|
|
|
private UIRadioButton previewAndExportButton; |
|
|
|
|
private UIRadioButton[] desensitizationButtons; |
|
|
|
|
private CellDesensitizationGroupsPane groupsPane; |
|
|
|
|
private final int EXPORT_SCOPE = 0; |
|
|
|
|
private final int PREVIEW_AND_EXPORT_SCOPE = 1; |
|
|
|
|
private final int EXPORT_SCOPE = CellDesensitizationAttr.EXPORT_SCOPE; |
|
|
|
|
private final int PREVIEW_AND_EXPORT_SCOPE = CellDesensitizationAttr.PREVIEW_AND_EXPORT_SCOPE; |
|
|
|
|
|
|
|
|
|
private static final Color TIPS_FONT_COLOR = new Color(0x8f8f92); |
|
|
|
|
|
|
|
|
@ -695,11 +694,11 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void populateDesensitizationBean(TemplateCellElement cellElement) { |
|
|
|
|
CellDesensitizationAttr cellDesensitizationAttr = cellElement.getCellDesensitizationAttr(); |
|
|
|
|
CellDesensitizationAttr cellDesensitizationAttr = cellElement.getCellAttr(CellDesensitizationAttr.ATTR_TAG); |
|
|
|
|
if (cellDesensitizationAttr == null) { |
|
|
|
|
cellDesensitizationAttr = new CellDesensitizationAttr(); |
|
|
|
|
} |
|
|
|
|
boolean exportSelected = cellDesensitizationAttr.getScope() == 0; |
|
|
|
|
boolean exportSelected = cellDesensitizationAttr.getScope() == EXPORT_SCOPE; |
|
|
|
|
exportButton.setSelected(exportSelected); |
|
|
|
|
previewAndExportButton.setSelected(!exportSelected); |
|
|
|
|
groupsPane.populate(cellDesensitizationAttr.getDesensitizationBeans()); |
|
|
|
@ -805,13 +804,14 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
|
|
|
|
|
* @param cellElement |
|
|
|
|
*/ |
|
|
|
|
private void updateDesensitizationAttr(TemplateCellElement cellElement) { |
|
|
|
|
CellDesensitizationAttr cellDesensitizationAttr = cellElement.getCellDesensitizationAttr(); |
|
|
|
|
|
|
|
|
|
CellDesensitizationAttr cellDesensitizationAttr = cellElement.getCellAttr(CellDesensitizationAttr.XML_TAG); |
|
|
|
|
if (cellDesensitizationAttr == null) { |
|
|
|
|
cellDesensitizationAttr = new CellDesensitizationAttr(); |
|
|
|
|
} |
|
|
|
|
cellDesensitizationAttr.setScope(exportButton.isSelected() ? EXPORT_SCOPE : PREVIEW_AND_EXPORT_SCOPE); |
|
|
|
|
cellDesensitizationAttr.setDesensitizationBeans(new ArrayList<>(groupsPane.update())); |
|
|
|
|
cellElement.setCellDesensitizationAttr(cellDesensitizationAttr); |
|
|
|
|
cellElement.addCellAttr(cellDesensitizationAttr); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|