Browse Source

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

feature/big-screen
kerry 4 years ago
parent
commit
aa971a8b28
  1. 7
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/style/CellPredefinedStyleSettingPane.java
  2. 4
      designer-realize/src/main/java/com/fr/design/report/ReportPredefinedBackgroundPane.java
  3. 6
      designer-realize/src/main/java/com/fr/poly/PolyDesignUI.java

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

@ -84,7 +84,7 @@ public class CellPredefinedStyleSettingPane extends PredefinedStyleSettingPane<N
@Override
public void populateBean(NameStyle ob) {
this.setPopulating(true);
super.populate(ob);
// super.populate(ob);
PredefinedStyle currentStyle = PredefinedPatternStyleManager.INSTANCE.getStyleFromName(getPredefinedStyleName());
PredefinedCellStyleConfig config = currentStyle.getCellStyleConfig();
Map<String, PredefinedCellStyle> allStyle = config.getAllStyles();
@ -122,7 +122,7 @@ public class CellPredefinedStyleSettingPane extends PredefinedStyleSettingPane<N
public NameStyle updateBean() {
Style style = updateStyle();
if (!(style instanceof NameStyle)) {
return NameStyle.createCustomStyle(style);
// return NameStyle.createCustomStyle(style);
}
return (NameStyle) style;
}
@ -138,7 +138,8 @@ public class CellPredefinedStyleSettingPane extends PredefinedStyleSettingPane<N
private NameStyle updatePredefinedStyle() {
Object selectItem = this.applicationFormat.getSelectedItem();
return NameStyle.createPredefinedStyle(getPredefinedStyleName(), selectItem == null ? StringUtils.EMPTY : selectItem.toString(), Style.getInstance());
// return NameStyle.createPredefinedStyle(getPredefinedStyleName(), selectItem == null ? StringUtils.EMPTY : selectItem.toString(), Style.getInstance());
return null;
}
class CustomStylePane extends MultiTabPane<Style> {

4
designer-realize/src/main/java/com/fr/design/report/ReportPredefinedBackgroundPane.java

@ -67,8 +67,8 @@ public class ReportPredefinedBackgroundPane extends PredefinedStyleSettingPane<R
@Override
public void populateBean(ReportSettingsProvider reportSettings) {
this.setPopulating(true);
PredefinedNameStyleProvider nameBackground = reportSettings.getNameBackground();
super.populate(nameBackground);
// PredefinedNameStyleProvider nameBackground = reportSettings.getNameBackground();
// super.populate(nameBackground);
this.backgroundPane.populateBean(reportSettings.getBackground());
this.isPrintBackgroundCheckBox.setSelected(reportSettings.isPrintBackground());
this.isExportBackgroundCheckBox.setSelected(reportSettings.isExportBackground());

6
designer-realize/src/main/java/com/fr/poly/PolyDesignUI.java

@ -8,7 +8,6 @@ import com.fr.base.Margin;
import com.fr.base.PaperSize;
import com.fr.base.ScreenResolution;
import com.fr.base.iofile.attr.WatermarkAttr;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.utils.ComponentUtils;
import com.fr.general.Background;
@ -83,7 +82,6 @@ public class PolyDesignUI extends ComponentUI {
g2d.setPaint(Color.WHITE);
GraphHelper.fillRect(g, 0, 0, d.width, d.height);
ReportSettingsProvider rs = report.getReportSettings();
rs.getNameBackground().resetPreferenceStyle(getGlobalPredefinedStyleName());
if (rs != null) {
Background bg = rs.getBackground();
if (bg != null) {
@ -93,10 +91,6 @@ public class PolyDesignUI extends ComponentUI {
}
}
private String getGlobalPredefinedStyleName() {
return HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().getTemplatePredefinedStyle();
}
@Override
public void paint(Graphics g, JComponent c) {
this.resolution = ((PolyArea)c).getResolution();

Loading…
Cancel
Save