Browse Source

Pull request #13337: REPORT-111562 【控件显示增强】下拉面板色-自定义配置无法持久化

Merge in DESIGN/design from ~OBO/design1:release/11.0 to release/11.0

* commit 'a0e17ab422bdfaa7bbf906112549c5f8fb7e8789':
  格式化,优化import
  去掉背景色配置面板判空,用不着
  调整实现,使用组合代替之前的继承,更新的方法签名退回
  REPORT-111562 【控件显示增强】下拉面板色-自定义配置无法持久化
release/11.0
Obo-王学仁 11 months ago
parent
commit
18f5f19e85
  1. 23
      designer-form/src/main/java/com/fr/design/widgettheme/ParaSelectEditorSettingPane.java
  2. 2
      designer-form/src/main/java/com/fr/design/widgettheme/common/EditorSettingPane.java
  3. 24
      designer-form/src/main/java/com/fr/design/widgettheme/common/SelectEditorSettingPane.java

23
designer-form/src/main/java/com/fr/design/widgettheme/ParaSelectEditorSettingPane.java

@ -1,9 +1,6 @@
package com.fr.design.widgettheme;
import com.fr.form.ui.Widget;
import com.fr.widgettheme.theme.widget.theme.ParaEditorTheme;
import com.fr.widgettheme.theme.widget.theme.ParaSelectEditorTheme;
import com.fr.widgettheme.theme.widget.theme.cell.EditorTheme;
import java.util.Arrays;
@ -28,23 +25,7 @@ public class ParaSelectEditorSettingPane<T extends Widget> extends ParaEditorSet
}
@Override
protected void populateEditorBean(EditorTheme editorTheme) {
ParaSelectEditorTheme paraSelectEditorTheme= new ParaSelectEditorTheme(editorTheme);
if (!editorTheme.isFollowTheme()) {
selectBgColorBox.setSelectObject(paraSelectEditorTheme.getSelectBoxBgColor());
}
super.populateEditorBean(editorTheme);
}
@Override
protected void updateEditorStyleBean(EditorTheme editorTheme) {
ParaSelectEditorTheme paraSelectEditorTheme= new ParaSelectEditorTheme(editorTheme);
paraSelectEditorTheme.setSelectBoxBgColor(selectBgColorBox.getSelectObject());
super.updateEditorStyleBean(editorTheme);
}
@Override
protected EditorTheme getEditorTheme() {
return new ParaSelectEditorTheme();
protected String title4PopupWindow() {
return "paraSelectEditorSetting";
}
}

2
designer-form/src/main/java/com/fr/design/widgettheme/common/EditorSettingPane.java

@ -81,6 +81,7 @@ public class EditorSettingPane<T extends Widget> extends BaseStyleSettingPane<T>
}
lineComboBox.setSelectedLineStyle(editorTheme.getBorderStyle().getLineType());
borderRadiusSpinner.setValue(editorTheme.getBorderStyle().getRadius());
selectBgColorBox.setSelectObject(editorTheme.getSelectBoxBgColor());
assignFontSizePane(editorTheme);
}
switchCard();
@ -106,6 +107,7 @@ public class EditorSettingPane<T extends Widget> extends BaseStyleSettingPane<T>
protected void updateEditorStyleBean(EditorTheme editorTheme) {
editorTheme.setThemeColor(colorSelectBox.getSelectObject());
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);

24
designer-form/src/main/java/com/fr/design/widgettheme/common/SelectEditorSettingPane.java

@ -2,11 +2,8 @@ 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;
import java.util.List;
/**
* 单元格下拉框编辑控件配置面板
@ -32,25 +29,4 @@ public class SelectEditorSettingPane <T extends Widget> 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 void updateEditorStyleBean(EditorTheme editorTheme) {
SelectEditTheme selectEditTheme = new SelectEditTheme(editorTheme);
selectEditTheme.setSelectBoxBgColor(selectBgColorBox.getSelectObject());
super.updateEditorStyleBean(selectEditTheme);
}
}

Loading…
Cancel
Save