Browse Source

Pull request #13336: REPORT-109728 【控件显示增强代码内置】按钮控件-字体配置部分丢失 & REPORT-107652 【最强控件】单元格的按钮控件,设置自定义后关闭开启显示增强,配置项显示异常

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

* commit '8f55f1084b9bbd3c4c7d5ba718ebed366088d48e':
  补充注释
  REPORT-107652 【最强控件】单元格的按钮控件,设置自定义后关闭开启显示增强,配置项显示异常
  REPORT-109728 【控件显示增强代码内置】按钮控件-字体配置部分丢失
release/11.0
Obo-王学仁 12 months ago
parent
commit
883da43e6e
  1. 4
      designer-form/src/main/java/com/fr/design/widgettheme/processor/WidgetThemeParaCreatorPaneAdder.java
  2. 19
      designer-realize/src/main/java/com/fr/design/widget/ui/btn/FreeButtonDetailPane.java

4
designer-form/src/main/java/com/fr/design/widgettheme/processor/WidgetThemeParaCreatorPaneAdder.java

@ -1,5 +1,6 @@
package com.fr.design.widgettheme.processor; package com.fr.design.widgettheme.processor;
import com.fr.design.widgettheme.ParaNormalButtonSettingPane;
import com.fr.design.widgettheme.ParaSelectEditorSettingPane; import com.fr.design.widgettheme.ParaSelectEditorSettingPane;
import com.fr.widgettheme.util.WidgetThemeDesignerUtils; import com.fr.widgettheme.util.WidgetThemeDesignerUtils;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
@ -21,7 +22,6 @@ import com.fr.design.widgettheme.ParaButtonSettingPane;
import com.fr.design.widgettheme.ParaEditorSettingPane; import com.fr.design.widgettheme.ParaEditorSettingPane;
import com.fr.design.widgettheme.ParaTreeEditorSettingPane; import com.fr.design.widgettheme.ParaTreeEditorSettingPane;
import com.fr.widgettheme.ParameterBackgroundStyleSettingPane; import com.fr.widgettheme.ParameterBackgroundStyleSettingPane;
import com.fr.design.widgettheme.common.NormalButtonSettingPane;
import com.fr.widgettheme.utils.WidgetThemeServerUtils; import com.fr.widgettheme.utils.WidgetThemeServerUtils;
import java.util.List; import java.util.List;
@ -102,7 +102,7 @@ public class WidgetThemeParaCreatorPaneAdder {
private static <T> void acceptNormal(XCreator creator, List<BasicBeanPane<T>> extraPaneList) { private static <T> void acceptNormal(XCreator creator, List<BasicBeanPane<T>> extraPaneList) {
boolean accept = creator instanceof XButton; boolean accept = creator instanceof XButton;
if (accept) { if (accept) {
insertShortCut(extraPaneList, new NormalButtonSettingPane<>()); insertShortCut(extraPaneList, new ParaNormalButtonSettingPane<>());
} }
} }

19
designer-realize/src/main/java/com/fr/design/widget/ui/btn/FreeButtonDetailPane.java

@ -3,6 +3,7 @@ package com.fr.design.widget.ui.btn;
import java.awt.Component; import java.awt.Component;
import com.fr.form.ui.FreeButton; import com.fr.form.ui.FreeButton;
import com.fr.widgettheme.util.WidgetThemeDesignerUtils;
/** /**
* 自定义按钮 * 自定义按钮
@ -16,7 +17,7 @@ public class FreeButtonDetailPane extends AbstractExtraButtonPane<FreeButton> {
@Override @Override
protected Component createCenterPane() { protected Component createCenterPane() {
buttonSytleDefinedPane = new ButtonSytleDefinedPane(); buttonSytleDefinedPane = creatButtonSytleDefinedPane();
return createExtraPane(buttonSytleDefinedPane); return createExtraPane(buttonSytleDefinedPane);
} }
@ -25,15 +26,22 @@ public class FreeButtonDetailPane extends AbstractExtraButtonPane<FreeButton> {
return new FreeButton(); return new FreeButton();
} }
/**
* 填充button配置面板
*/
public void populate(FreeButton button) { public void populate(FreeButton button) {
super.populate(button); super.populate(button);
if (buttonSytleDefinedPane != null) {
buttonSytleDefinedPane.populate(button); buttonSytleDefinedPane.populate(button);
} }
}
@Override @Override
public FreeButton update() { public FreeButton update() {
FreeButton button = super.update(); FreeButton button = super.update();
if (buttonSytleDefinedPane != null) {
buttonSytleDefinedPane.update(button); buttonSytleDefinedPane.update(button);
}
return button; return button;
} }
@ -41,4 +49,13 @@ public class FreeButtonDetailPane extends AbstractExtraButtonPane<FreeButton> {
public Class classType() { public Class classType() {
return FreeButton.class; return FreeButton.class;
} }
/**
* 自定义按钮控件开启控件显示增强时原有的buttonSytleDefinedPane会被保留
* 内容和控件增强的pane重复且不生效其他控件目前不存在这种情况因此要在实现这里做个判断
* 如果开启控件增强原有的ButtonSytleDefinedPane不展示创建时返回null
*/
private ButtonSytleDefinedPane creatButtonSytleDefinedPane() {
return WidgetThemeDesignerUtils.enableWidgetEnhance() ? null : new ButtonSytleDefinedPane();
}
} }
Loading…
Cancel
Save