Browse Source

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

release/11.0
obo 1 year ago
parent
commit
cdf1c3c1a6
  1. 9
      designer-form/src/main/java/com/fr/design/widgettheme/ParaSelectEditorSettingPane.java
  2. 9
      designer-form/src/main/java/com/fr/design/widgettheme/common/EditorSettingPane.java
  3. 5
      designer-form/src/main/java/com/fr/design/widgettheme/common/SelectEditorSettingPane.java

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

@ -1,7 +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;
@ -30,17 +29,17 @@ public class ParaSelectEditorSettingPane<T extends Widget> extends ParaEditorSet
@Override
protected void populateEditorBean(EditorTheme editorTheme) {
ParaSelectEditorTheme paraSelectEditorTheme= new ParaSelectEditorTheme(editorTheme);
if (!editorTheme.isFollowTheme()) {
if (!paraSelectEditorTheme.isFollowTheme()) {
selectBgColorBox.setSelectObject(paraSelectEditorTheme.getSelectBoxBgColor());
}
super.populateEditorBean(editorTheme);
super.populateEditorBean(paraSelectEditorTheme);
}
@Override
protected void updateEditorStyleBean(EditorTheme editorTheme) {
protected EditorTheme updateEditorStyleBean(EditorTheme editorTheme) {
ParaSelectEditorTheme paraSelectEditorTheme= new ParaSelectEditorTheme(editorTheme);
paraSelectEditorTheme.setSelectBoxBgColor(selectBgColorBox.getSelectObject());
super.updateEditorStyleBean(editorTheme);
return super.updateEditorStyleBean(paraSelectEditorTheme);
}
@Override

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

@ -95,21 +95,22 @@ public class EditorSettingPane<T extends Widget> extends BaseStyleSettingPane<T>
@Override
public void updateBean(T t) {
EditorTheme widgetTheme = initEditorTheme(t);
updateEditorBean(widgetTheme);
t.setWidgetTheme(updateEditorBean(widgetTheme));
}
protected void updateEditorBean(EditorTheme editorTheme) {
protected EditorTheme updateEditorBean(EditorTheme editorTheme) {
int selectIndex = styleSettingHead.getSelectedIndex();
editorTheme.setFollowTheme(selectIndex == 0);
updateEditorStyleBean(editorTheme);
return updateEditorStyleBean(editorTheme);
}
protected void updateEditorStyleBean(EditorTheme editorTheme) {
protected EditorTheme updateEditorStyleBean(EditorTheme editorTheme) {
editorTheme.setThemeColor(colorSelectBox.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;
}
}

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

@ -6,7 +6,6 @@ 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;
/**
* 单元格下拉框编辑控件配置面板
@ -48,9 +47,9 @@ public class SelectEditorSettingPane <T extends Widget> extends EditorSettingPan
}
@Override
protected void updateEditorStyleBean(EditorTheme editorTheme) {
protected EditorTheme updateEditorStyleBean(EditorTheme editorTheme) {
SelectEditTheme selectEditTheme = new SelectEditTheme(editorTheme);
selectEditTheme.setSelectBoxBgColor(selectBgColorBox.getSelectObject());
super.updateEditorStyleBean(selectEditTheme);
return super.updateEditorStyleBean(selectEditTheme);
}
}

Loading…
Cancel
Save