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 @Override
public void populateBean(NameStyle ob) { public void populateBean(NameStyle ob) {
this.setPopulating(true); this.setPopulating(true);
super.populate(ob); // super.populate(ob);
PredefinedStyle currentStyle = PredefinedPatternStyleManager.INSTANCE.getStyleFromName(getPredefinedStyleName()); PredefinedStyle currentStyle = PredefinedPatternStyleManager.INSTANCE.getStyleFromName(getPredefinedStyleName());
PredefinedCellStyleConfig config = currentStyle.getCellStyleConfig(); PredefinedCellStyleConfig config = currentStyle.getCellStyleConfig();
Map<String, PredefinedCellStyle> allStyle = config.getAllStyles(); Map<String, PredefinedCellStyle> allStyle = config.getAllStyles();
@ -122,7 +122,7 @@ public class CellPredefinedStyleSettingPane extends PredefinedStyleSettingPane<N
public NameStyle updateBean() { public NameStyle updateBean() {
Style style = updateStyle(); Style style = updateStyle();
if (!(style instanceof NameStyle)) { if (!(style instanceof NameStyle)) {
return NameStyle.createCustomStyle(style); // return NameStyle.createCustomStyle(style);
} }
return (NameStyle) style; return (NameStyle) style;
} }
@ -138,7 +138,8 @@ public class CellPredefinedStyleSettingPane extends PredefinedStyleSettingPane<N
private NameStyle updatePredefinedStyle() { private NameStyle updatePredefinedStyle() {
Object selectItem = this.applicationFormat.getSelectedItem(); 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> { 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 @Override
public void populateBean(ReportSettingsProvider reportSettings) { public void populateBean(ReportSettingsProvider reportSettings) {
this.setPopulating(true); this.setPopulating(true);
PredefinedNameStyleProvider nameBackground = reportSettings.getNameBackground(); // PredefinedNameStyleProvider nameBackground = reportSettings.getNameBackground();
super.populate(nameBackground); // super.populate(nameBackground);
this.backgroundPane.populateBean(reportSettings.getBackground()); this.backgroundPane.populateBean(reportSettings.getBackground());
this.isPrintBackgroundCheckBox.setSelected(reportSettings.isPrintBackground()); this.isPrintBackgroundCheckBox.setSelected(reportSettings.isPrintBackground());
this.isExportBackgroundCheckBox.setSelected(reportSettings.isExportBackground()); 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.PaperSize;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.iofile.attr.WatermarkAttr; import com.fr.base.iofile.attr.WatermarkAttr;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.utils.ComponentUtils; import com.fr.design.utils.ComponentUtils;
import com.fr.general.Background; import com.fr.general.Background;
@ -83,7 +82,6 @@ public class PolyDesignUI extends ComponentUI {
g2d.setPaint(Color.WHITE); g2d.setPaint(Color.WHITE);
GraphHelper.fillRect(g, 0, 0, d.width, d.height); GraphHelper.fillRect(g, 0, 0, d.width, d.height);
ReportSettingsProvider rs = report.getReportSettings(); ReportSettingsProvider rs = report.getReportSettings();
rs.getNameBackground().resetPreferenceStyle(getGlobalPredefinedStyleName());
if (rs != null) { if (rs != null) {
Background bg = rs.getBackground(); Background bg = rs.getBackground();
if (bg != null) { if (bg != null) {
@ -93,10 +91,6 @@ public class PolyDesignUI extends ComponentUI {
} }
} }
private String getGlobalPredefinedStyleName() {
return HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().getTemplatePredefinedStyle();
}
@Override @Override
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
this.resolution = ((PolyArea)c).getResolution(); this.resolution = ((PolyArea)c).getResolution();

Loading…
Cancel
Save