Browse Source

Pull request #12077: REPORT-94379 控件显示增强插件安装启用后,部分控件的样式设置有问题

Merge in DESIGN/design from ~JOHN.YING/design:release/11.0 to release/11.0

* commit '988d95b631f31212f71a59b66056a37763952fac':
  REPORT-94379 控件显示增强插件安装启用后,部分控件的样式设置有问题
  REPORT-94379 控件显示增强插件安装启用后,部分控件的样式设置有问题
newui
John.Ying-应志浩 2 years ago
parent
commit
f540d91a47
  1. 3
      designer-form/src/main/java/com/fr/design/widget/ui/designer/ButtonDefinePane.java
  2. 19
      designer-form/src/main/java/com/fr/design/widget/ui/designer/FreeButtonDefinePane.java

3
designer-form/src/main/java/com/fr/design/widget/ui/designer/ButtonDefinePane.java

@ -35,6 +35,7 @@ public abstract class ButtonDefinePane<T extends Button> extends AbstractDataMod
protected UITextField labelNameTextField; protected UITextField labelNameTextField;
private final List<BasicBeanPane<T>> extraPaneList = new ArrayList<>(); private final List<BasicBeanPane<T>> extraPaneList = new ArrayList<>();
private JPanel extraPane; private JPanel extraPane;
protected boolean containsExtraPane;
public ButtonDefinePane(XCreator creator){ public ButtonDefinePane(XCreator creator){
super(creator); super(creator);
@ -63,7 +64,7 @@ public abstract class ButtonDefinePane<T extends Button> extends AbstractDataMod
private void refreshAdvancedPane() { private void refreshAdvancedPane() {
extraPaneList.clear(); extraPaneList.clear();
boolean containsExtraPane = false; containsExtraPane = false;
Set<WidgetAdvancedPaneProvider<T>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG); Set<WidgetAdvancedPaneProvider<T>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG);
for (WidgetAdvancedPaneProvider<T> provider : providers) { for (WidgetAdvancedPaneProvider<T> provider : providers) {
if (!provider.accept(creator)) { if (!provider.accept(creator)) {

19
designer-form/src/main/java/com/fr/design/widget/ui/designer/FreeButtonDefinePane.java

@ -41,10 +41,13 @@ public class FreeButtonDefinePane extends ButtonDefinePane<FreeButton> {
} }
public void populateSubButtonPane(FreeButton e) { public void populateSubButtonPane(FreeButton e) {
if (containsExtraPane) {
return;
}
backgroundCompPane.populate(e); backgroundCompPane.populate(e);
frFontPane.setVisible(e.isCustomStyle()); frFontPane.setVisible(e.isCustomStyle());
fontLabel.setVisible(e.isCustomStyle()); fontLabel.setVisible(e.isCustomStyle());
if(e.isCustomStyle()){ if (e.isCustomStyle()) {
FRFont frFont = e.getFont(); FRFont frFont = e.getFont();
if (frFont != null) { if (frFont != null) {
frFontPane.populateBean(e.getFont()); frFontPane.populateBean(e.getFont());
@ -54,12 +57,14 @@ public class FreeButtonDefinePane extends ButtonDefinePane<FreeButton> {
public FreeButton updateSubButtonPane() { public FreeButton updateSubButtonPane() {
FreeButton freeButton = (FreeButton) creator.toData(); FreeButton freeButton = (FreeButton) creator.toData();
backgroundCompPane.update(freeButton); if (!containsExtraPane) {
frFontPane.setVisible(freeButton.isCustomStyle()); backgroundCompPane.update(freeButton);
fontLabel.setVisible(freeButton.isCustomStyle()); frFontPane.setVisible(freeButton.isCustomStyle());
if(freeButton.isCustomStyle()){ fontLabel.setVisible(freeButton.isCustomStyle());
FRFont frFont = freeButton.getFont() == null ? FRFont.getInstance() : freeButton.getFont(); if (freeButton.isCustomStyle()) {
freeButton.setFont(frFontPane.update(frFont)); FRFont frFont = freeButton.getFont() == null ? FRFont.getInstance() : freeButton.getFont();
freeButton.setFont(frFontPane.update(frFont));
}
} }
return freeButton; return freeButton;
} }

Loading…
Cancel
Save