Browse Source

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

Merge in DESIGN/design from ~KERRY/design_10.0:release/10.0 to release/10.0

* commit 'aa971a8b2816f9d83c319689dfa6bdf6a0f447bb':
  REPORT-43198 预定义样式功能优化代码回退遗漏部分
feature/big-screen
ju.ju 4 years ago
parent
commit
bd58bf1af5
  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