Browse Source

Merge remote-tracking branch 'origin/final/11.0' into final/11.0

new-design
pengda 3 years ago
parent
commit
5934ba6763
  1. 6
      designer-base/src/main/java/com/fr/design/report/WatermarkSettingPane.java
  2. 6
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellStylePane.java

6
designer-base/src/main/java/com/fr/design/report/WatermarkSettingPane.java

@ -34,6 +34,7 @@ public class WatermarkSettingPane extends AbstractTemplateServerSettingPane {
@Override
protected void populateServerSettings() {
WatermarkAttr watermarkAttr = ReportUtils.getWatermarkAttrFromServerConfig();
watermarkAttr.setValid(true);
watermarkPane.populate(watermarkAttr);
}
@ -55,8 +56,9 @@ public class WatermarkSettingPane extends AbstractTemplateServerSettingPane {
public WatermarkAttr update() {
WatermarkAttr watermark = watermarkPane.update();
if (isUsingServerSettings()) {
watermark.setValid(false);
if (!isUsingServerSettings()) {
watermark.setValid(true);
watermark.setWaterMarkProvider(WaterMarkProvideConstant.TEMPLATE);
}
return watermark;
}

6
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellStylePane.java

@ -11,7 +11,6 @@ import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase;
import com.fr.design.style.BorderUtils;
import com.fr.design.utils.gui.AdjustWorkBookDefaultStyleUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.report.cell.DefaultTemplateCellElement;
import com.fr.report.cell.TemplateCellElement;
import com.fr.report.elementcase.TemplateElementCase;
@ -20,7 +19,7 @@ import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
import java.awt.Rectangle;
import java.text.Format;
/**
* @author zhou
@ -118,7 +117,10 @@ public class CellStylePane extends AbstractCellAttrPane {
AdjustWorkBookDefaultStyleUtils.adjustCellElement(cellElement);
elementCase.addCellElement(cellElement);
}
Format format = cellElement.getStyle().getFormat();
Style style = stylePane.updateBean();
// 格式不能通过样式面板中的配置项修改,因此需要保留
style = style.deriveFormat(format);
cellElement.setStyle(style);
}
});

Loading…
Cancel
Save