Browse Source

REPORT-43198 预定义样式功能优化代码回退遗漏部分

feature/big-screen
kerry 4 years ago
parent
commit
c8019d174d
  1. 8
      designer-base/src/main/java/com/fr/design/mainframe/predefined/PatternStyle.java
  2. 30
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/style/CellPredefinedStyleSettingPane.java

8
designer-base/src/main/java/com/fr/design/mainframe/predefined/PatternStyle.java

@ -1,7 +1,7 @@
package com.fr.design.mainframe.predefined;
import com.fr.config.predefined.PredefinedStyle;
import com.fr.predefined.PredefinedPatternStyleManager;
//import com.fr.predefined.PredefinedPatternStyleManager;
/**
@ -11,13 +11,15 @@ public enum PatternStyle {
DARK_STYLE(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Predefined_Dark_Pattern")) {
@Override
public PredefinedStyle getPredefinedStyle() {
return PredefinedPatternStyleManager.INSTANCE.getDarkMode();
// return PredefinedPatternStyleManager.INSTANCE.getDarkMode();
return new PredefinedStyle();
}
},
LIGHT_STYLE(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Predefined_Light_Pattern")) {
@Override
public PredefinedStyle getPredefinedStyle() {
return PredefinedPatternStyleManager.INSTANCE.getLightMode();
// return PredefinedPatternStyleManager.INSTANCE.getLightMode();
return new PredefinedStyle();
}
};

30
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/style/CellPredefinedStyleSettingPane.java

@ -25,7 +25,7 @@ import com.fr.design.mainframe.JTemplate;
import com.fr.design.mainframe.predefined.ui.PredefinedStyleSettingPane;
import com.fr.design.mainframe.predefined.ui.preview.StyleSettingPreviewPane;
import com.fr.design.style.BorderUtils;
import com.fr.predefined.PredefinedPatternStyleManager;
//import com.fr.predefined.PredefinedPatternStyleManager;
import com.fr.stable.Constants;
import com.fr.stable.StringUtils;
import com.fr.third.javax.annotation.Nonnull;
@ -85,20 +85,20 @@ public class CellPredefinedStyleSettingPane extends PredefinedStyleSettingPane<N
public void populateBean(NameStyle ob) {
this.setPopulating(true);
// super.populate(ob);
PredefinedStyle currentStyle = PredefinedPatternStyleManager.INSTANCE.getStyleFromName(getPredefinedStyleName());
PredefinedCellStyleConfig config = currentStyle.getCellStyleConfig();
Map<String, PredefinedCellStyle> allStyle = config.getAllStyles();
this.applicationFormat.clearBoxItems();
for (String name : allStyle.keySet()) {
this.applicationFormat.addItem(name);
}
if (allStyle.containsKey(ob.getName())) {
this.applicationFormat.setSelectedItem(ob.getName());
}else {
this.applicationFormat.setSelectedItem(config.getDefaultStyleName());
}
this.customPredefinedStylePane.populateBean(ob);
this.setPopulating(false);
// PredefinedStyle currentStyle = PredefinedPatternStyleManager.INSTANCE.getStyleFromName(getPredefinedStyleName());
// PredefinedCellStyleConfig config = currentStyle.getCellStyleConfig();
// Map<String, PredefinedCellStyle> allStyle = config.getAllStyles();
// this.applicationFormat.clearBoxItems();
// for (String name : allStyle.keySet()) {
// this.applicationFormat.addItem(name);
// }
// if (allStyle.containsKey(ob.getName())) {
// this.applicationFormat.setSelectedItem(ob.getName());
// }else {
// this.applicationFormat.setSelectedItem(config.getDefaultStyleName());
// }
// this.customPredefinedStylePane.populateBean(ob);
// this.setPopulating(false);
}

Loading…
Cancel
Save