diff --git a/designer-form/src/main/java/com/fr/design/widgettheme/ParaSelectEditorSettingPane.java b/designer-form/src/main/java/com/fr/design/widgettheme/ParaSelectEditorSettingPane.java index cb59df6cc6..f7cd1eb93e 100644 --- a/designer-form/src/main/java/com/fr/design/widgettheme/ParaSelectEditorSettingPane.java +++ b/designer-form/src/main/java/com/fr/design/widgettheme/ParaSelectEditorSettingPane.java @@ -1,8 +1,6 @@ package com.fr.design.widgettheme; import com.fr.form.ui.Widget; -import com.fr.widgettheme.theme.widget.theme.ParaSelectEditorTheme; -import com.fr.widgettheme.theme.widget.theme.cell.EditorTheme; import java.util.Arrays; @@ -27,23 +25,7 @@ public class ParaSelectEditorSettingPane extends ParaEditorSet } @Override - protected void populateEditorBean(EditorTheme editorTheme) { - ParaSelectEditorTheme paraSelectEditorTheme= new ParaSelectEditorTheme(editorTheme); - if (!paraSelectEditorTheme.isFollowTheme()) { - selectBgColorBox.setSelectObject(paraSelectEditorTheme.getSelectBoxBgColor()); - } - super.populateEditorBean(paraSelectEditorTheme); - } - - @Override - protected EditorTheme updateEditorStyleBean(EditorTheme editorTheme) { - ParaSelectEditorTheme paraSelectEditorTheme= new ParaSelectEditorTheme(editorTheme); - paraSelectEditorTheme.setSelectBoxBgColor(selectBgColorBox.getSelectObject()); - return super.updateEditorStyleBean(paraSelectEditorTheme); - } - - @Override - protected EditorTheme getEditorTheme() { - return new ParaSelectEditorTheme(); + protected String title4PopupWindow() { + return "paraSelectEditorSetting"; } } diff --git a/designer-form/src/main/java/com/fr/design/widgettheme/common/EditorSettingPane.java b/designer-form/src/main/java/com/fr/design/widgettheme/common/EditorSettingPane.java index 3ab7d6136c..c4816e3331 100644 --- a/designer-form/src/main/java/com/fr/design/widgettheme/common/EditorSettingPane.java +++ b/designer-form/src/main/java/com/fr/design/widgettheme/common/EditorSettingPane.java @@ -81,6 +81,9 @@ public class EditorSettingPane extends BaseStyleSettingPane } lineComboBox.setSelectedLineStyle(editorTheme.getBorderStyle().getLineType()); borderRadiusSpinner.setValue(editorTheme.getBorderStyle().getRadius()); + if(selectBgColorBox != null) { + selectBgColorBox.setSelectObject(editorTheme.getSelectBoxBgColor()); + } assignFontSizePane(editorTheme); } switchCard(); @@ -94,23 +97,26 @@ public class EditorSettingPane extends BaseStyleSettingPane @Override public void updateBean(T t) { + EditorTheme widgetTheme = initEditorTheme(t); - t.setWidgetTheme(updateEditorBean(widgetTheme)); + updateEditorBean(widgetTheme); } - protected EditorTheme updateEditorBean(EditorTheme editorTheme) { + protected void updateEditorBean(EditorTheme editorTheme) { int selectIndex = styleSettingHead.getSelectedIndex(); editorTheme.setFollowTheme(selectIndex == 0); - return updateEditorStyleBean(editorTheme); + updateEditorStyleBean(editorTheme); } - protected EditorTheme updateEditorStyleBean(EditorTheme editorTheme) { + protected void updateEditorStyleBean(EditorTheme editorTheme) { editorTheme.setThemeColor(colorSelectBox.getSelectObject()); + if(selectBgColorBox != null) { + editorTheme.setSelectBoxBgColor(selectBgColorBox.getSelectObject()); + } editorTheme.setStyleType(style1.isSelected() ? WidgetThemeDisplayConstants.STYLE_1 : WidgetThemeDisplayConstants.STYLE_2); editorTheme.setBorderStyle(new BorderStyle((int) borderRadiusSpinner.getValue(), lineComboBox.getSelectedLineStyle())); assignFontSizeStyle(editorTheme); switchCard(); - return editorTheme; } } diff --git a/designer-form/src/main/java/com/fr/design/widgettheme/common/SelectEditorSettingPane.java b/designer-form/src/main/java/com/fr/design/widgettheme/common/SelectEditorSettingPane.java index 2ae07a3cd8..c226852bad 100644 --- a/designer-form/src/main/java/com/fr/design/widgettheme/common/SelectEditorSettingPane.java +++ b/designer-form/src/main/java/com/fr/design/widgettheme/common/SelectEditorSettingPane.java @@ -2,8 +2,6 @@ package com.fr.design.widgettheme.common; import com.fr.design.widgettheme.StyleSetting; import com.fr.form.ui.Widget; -import com.fr.widgettheme.theme.widget.theme.cell.EditorTheme; -import com.fr.widgettheme.theme.widget.theme.cell.SelectEditTheme; import java.util.Arrays; @@ -31,25 +29,4 @@ public class SelectEditorSettingPane extends EditorSettingPan protected String title4PopupWindow() { return "selectEditorSetting"; } - - @Override - protected EditorTheme getEditorTheme() { - return new SelectEditTheme(); - } - - @Override - protected void populateEditorBean(EditorTheme editorTheme) { - SelectEditTheme selectEditTheme = new SelectEditTheme(editorTheme); - if (!selectEditTheme.isFollowTheme()) { - selectBgColorBox.setSelectObject(selectEditTheme.getSelectBoxBgColor()); - } - super.populateEditorBean(selectEditTheme); - } - - @Override - protected EditorTheme updateEditorStyleBean(EditorTheme editorTheme) { - SelectEditTheme selectEditTheme = new SelectEditTheme(editorTheme); - selectEditTheme.setSelectBoxBgColor(selectBgColorBox.getSelectObject()); - return super.updateEditorStyleBean(selectEditTheme); - } }