diff --git a/designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/DesktopWidgetStyleEditPane.java b/designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/DesktopWidgetStyleEditPane.java index 4af7b9b6d1..f57b995186 100644 --- a/designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/DesktopWidgetStyleEditPane.java +++ b/designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/DesktopWidgetStyleEditPane.java @@ -63,7 +63,7 @@ public class DesktopWidgetStyleEditPane extends WidgetS new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Border_Radius")), borderRadiusSpinner}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Icon_Color")), iconColorSelectBox}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Text_Style")), fontNameSelectBox}, - new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Text_Style")), WidgetStyleComponentCombiner.combineTextStyleComponent(fontSizePane, fontColorButton, italic, bold)}, + new Component[]{new UILabel(), WidgetStyleComponentCombiner.combineTextStyleComponent(fontSizePane, fontColorButton, italic, bold)}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Background_Select_Box")), selectBackgroundColorBox} }; } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/model/DesensitizationCellPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/model/DesensitizationCellPane.java index 818a26205d..c65a7eee73 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/model/DesensitizationCellPane.java +++ b/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() {