Browse Source

Merge pull request #590 in DESIGN/design from ~PLOUGH/10-design:feature/10.0 to feature/10.0

* commit '54983e915cdf228c4ee8cd7b4d6ff0e4fa769b98':
  REPORT-11612 全局水印=>视觉优化;修复禁用面板后仍然可点击的bug
  REPORT-11612 全局水印=>功能实现
  REPORT-11612 全局水印=>基础面板重构
research/10.0
plough 6 years ago
parent
commit
1b22b578de
  1. 93
      designer-base/src/main/java/com/fr/design/dialog/AbstractTemplateServerSettingPane.java
  2. 5
      designer-base/src/main/java/com/fr/design/report/WatermarkPane.java
  3. 62
      designer-base/src/main/java/com/fr/design/report/WatermarkSettingPane.java
  4. 4
      designer-base/src/main/java/com/fr/design/style/color/ColorCell.java
  5. 3
      designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java
  6. 14
      designer-base/src/main/java/com/fr/design/style/color/NewColorSelectPane.java
  7. 27
      designer-base/src/main/java/com/fr/design/style/color/PickColorButtonFactory.java
  8. 2
      designer-base/src/main/java/com/fr/design/style/color/UsedColorPane.java
  9. 6
      designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java
  10. 5
      designer-form/src/main/java/com/fr/design/mainframe/widget/accessibles/AccessibleBodyWatermarkEditor.java
  11. 3
      designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java
  12. 2
      designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java
  13. 6
      designer-realize/src/main/java/com/fr/design/actions/report/ReportWatermarkAction.java
  14. 67
      designer-realize/src/main/java/com/fr/design/webattr/printsettings/ReportPrintSettingPane.java
  15. 2
      designer-realize/src/main/java/com/fr/grid/GridUI.java
  16. 2
      designer-realize/src/main/java/com/fr/poly/PolyDesignUI.java

93
designer-base/src/main/java/com/fr/design/dialog/AbstractTemplateServerSettingPane.java

@ -0,0 +1,93 @@
package com.fr.design.dialog;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.utils.gui.GUICoreUtils;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.FlowLayout;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
/**
* 封装了"为该模版单独设置、采用服务器设置"选项功能的设置面板
* Created by plough on 2018/11/7.
*/
public abstract class AbstractTemplateServerSettingPane extends BasicPane {
private static final String[] CHOOSEITEM = new String[] {
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_I_Want_To_Set_Single"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Using_Server_Report_View_Settings")
};
protected static final int SINGLE_SET = 0;
protected static final int SERVER_SET = 1;
protected UIComboBox chooseComboBox;
protected JPanel buttonPane;
private JPanel contentPane;
protected AbstractTemplateServerSettingPane() {
initComponents();
}
private void initComponents() {
chooseComboBox = new UIComboBox(CHOOSEITEM);
chooseComboBox.addItemListener(itemListener);
UILabel belowSetLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Blow_Set"));
belowSetLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 20));
buttonPane = GUICoreUtils.createFlowPane(new Component[] {
belowSetLabel, chooseComboBox}, FlowLayout.LEFT, 0, 0);
buttonPane.setBorder(BorderFactory.createEmptyBorder(10, 20, 0, 0));
this.setLayout(new BorderLayout());
this.add(buttonPane, BorderLayout.NORTH);
this.contentPane = getContentPane();
this.add(contentPane, BorderLayout.CENTER);
}
/**
* 包含设置项的主面板
*/
protected abstract JPanel getContentPane();
private ItemListener itemListener = new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) {
if (isUsingServerSettings()) {
populateServerSettings();
setSettingPaneEnabled(false);
} else {
setSettingPaneEnabled(true);
}
}
}
};
private void setSettingPaneEnabled(boolean enabled) {
// GUICoreUtils.setEnabled 会遍历所有 Component。所以要先设置外层,如果是生效的,再设置内层
GUICoreUtils.setEnabled(contentPane, enabled);
if (enabled) {
checkContentPaneEnabled();
}
}
protected boolean isUsingServerSettings() {
return chooseComboBox.getSelectedIndex() == SERVER_SET;
}
/**
* 整个配置面板设置为可用后可能还需要检测面板中部分区域的可用性
*/
protected void checkContentPaneEnabled() {
// do nothing
}
/**
* 读取服务器配置并 populate 到主面板中
*/
protected abstract void populateServerSettings();
}

5
designer-base/src/main/java/com/fr/design/report/WatermarkPane.java

@ -13,7 +13,6 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.style.color.NewColorSelectPane;
import com.fr.design.utils.gui.GUICoreUtils;
import javax.swing.BorderFactory;
import javax.swing.JComponent;
import javax.swing.JPanel;
@ -47,7 +46,7 @@ public class WatermarkPane extends BasicPane {
}
private void initComponents() {
this.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
this.setBorder(BorderFactory.createEmptyBorder(4, 4, -5, 4));
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel contentPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
@ -66,7 +65,7 @@ public class WatermarkPane extends BasicPane {
// 设置
JPanel rightPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
contentPane.add(rightPane, BorderLayout.EAST);
rightPane.add(initRightPane(), BorderLayout.CENTER);
rightPane.add(initRightPane(), BorderLayout.NORTH);
}
public void populate(WatermarkAttr watermark) {

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

@ -0,0 +1,62 @@
package com.fr.design.report;
import com.fr.base.iofile.attr.WatermarkAttr;
import com.fr.design.dialog.AbstractTemplateServerSettingPane;
import com.fr.report.core.ReportUtils;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
/**
* Created by plough on 2018/11/7.
*/
public class WatermarkSettingPane extends AbstractTemplateServerSettingPane {
private WatermarkPane watermarkPane;
public WatermarkSettingPane() {
super();
initComponents();
}
private void initComponents() {
buttonPane.setBorder(BorderFactory.createEmptyBorder(10, 8, 0, 0));
}
@Override
protected JPanel getContentPane() {
if (watermarkPane == null) {
watermarkPane = new WatermarkPane();
}
return watermarkPane;
}
@Override
protected void populateServerSettings() {
WatermarkAttr watermarkAttr = ReportUtils.getWatermarkAttrFromServerConfig();
watermarkPane.populate(watermarkAttr);
}
@Override
protected String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_WaterMark");
}
public void populate(WatermarkAttr watermark) {
if (!watermark.isValid()) {
chooseComboBox.setSelectedIndex(SERVER_SET);
populateServerSettings();
return;
}
chooseComboBox.setSelectedIndex(SINGLE_SET);
watermarkPane.populate(watermark);
}
public WatermarkAttr update() {
WatermarkAttr watermark = watermarkPane.update();
if (isUsingServerSettings()) {
watermark.setValid(false);
}
return watermark;
}
}

4
designer-base/src/main/java/com/fr/design/style/color/ColorCell.java

@ -89,6 +89,10 @@ public class ColorCell extends JComponent implements ColorSelectable {
* @param 鼠标事件
*/
public void processMouseEvent(MouseEvent e) {
if (!isEnabled()) {
return;
}
if (e == null || e.getID() == MouseEvent.MOUSE_RELEASED) {
colorSelectable.setColor(this.getColor());
colorSelectable.colorSetted(this);

3
designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java

@ -9,6 +9,7 @@ import java.util.regex.Pattern;
import javax.swing.ButtonGroup;
import javax.swing.Icon;
import javax.swing.JButton;
import javax.swing.JColorChooser;
import javax.swing.JPanel;
import javax.swing.SpinnerNumberModel;
@ -706,7 +707,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
mainPanel.add(hexPanel, BorderLayout.SOUTH);
JPanel rightPane = new JPanel(new BorderLayout());
SpecialUIButton pickColorButton = PickColorButtonFactory.getPickColorButton(this, PickColorButtonFactory.IconType.ICON18, true);
JButton pickColorButton = PickColorButtonFactory.getPickColorButton(this, PickColorButtonFactory.IconType.ICON18, true);
JPanel blankArea = new JPanel();
blankArea.setPreferredSize(new Dimension(100, 175));
rightPane.add(blankArea, BorderLayout.CENTER);

14
designer-base/src/main/java/com/fr/design/style/color/NewColorSelectPane.java

@ -31,8 +31,6 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable {
// color setting action.
private ArrayList<ChangeListener> colorChangeListenerList = new ArrayList<ChangeListener>();
// 颜色选择器
private ColorSelectDetailPane pane;
// 是否支持透明
private boolean isSupportTransparent;
@ -52,10 +50,10 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable {
/**
* Constructor.
*/
public NewColorSelectPane(boolean isSupportTransparent) {
NewColorSelectPane(boolean isSupportTransparent) {
this.isSupportTransparent = isSupportTransparent;
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, 5));
this.setBorder(new UIRoundedBorder(UIConstants.TOOLBAR_BORDER_COLOR, 1, 5));
if (isSupportTransparent) {
UIButton transpanrentButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ChartF_Transparency"));
this.add(transpanrentButton, BorderLayout.NORTH);
@ -96,12 +94,13 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable {
// mod by anchore 16/11/16
UIButton customButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_More_Color"));
customButton.addMouseListener(new MouseAdapter() {
customButton.addActionListener(new ActionListener() {
@Override
public void mousePressed(MouseEvent e) {
public void actionPerformed(ActionEvent e) {
customButtonPressed();
}
});
customButton.setCursor(new Cursor(Cursor.HAND_CURSOR));
JPanel centerPane1 = FRGUIPaneFactory.createBorderLayout_S_Pane();
centerPane1.setBorder(BorderFactory.createEmptyBorder(2, 8, 0, 8));
@ -183,7 +182,8 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable {
}
protected void customButtonPressed() {
pane = new ColorSelectDetailPane(Color.WHITE);
// 颜色选择器
ColorSelectDetailPane pane = new ColorSelectDetailPane(Color.WHITE);
ColorSelectDialog.showDialog(DesignerContext.getDesignerFrame(), pane, Color.WHITE, this);
}

27
designer-base/src/main/java/com/fr/design/style/color/PickColorButtonFactory.java

@ -2,27 +2,32 @@ package com.fr.design.style.color;
import com.fr.base.BaseUtils;
import com.fr.design.gui.ibutton.SpecialUIButton;
import com.fr.design.gui.ibutton.UIBasicButtonUI;
import javax.swing.*;
import javax.swing.plaf.ButtonUI;
import javax.swing.plaf.basic.BasicButtonUI;
import java.awt.*;
import java.awt.event.*;
/**
* Created by plough on 2016/12/22.
*/
public class PickColorButtonFactory {
class PickColorButtonFactory {
private static int iconSize;
private static final int SIZE_16 = 16;
private static final int SIZE_18 = 18;
private static IconType iconType;
private static Image iconImage;
public static SpecialUIButton getPickColorButton(ColorSelectable colorSelectable, IconType iconType) {
return getPickColorButton(colorSelectable, iconType, false);
}
public static SpecialUIButton getPickColorButton(final ColorSelectable colorSelectable, IconType iconType, final boolean setColorRealTime) {
/**
* 生成取色按钮
* @param colorSelectable 接收取到的颜色值的对象
* @param iconType IconType 枚举可选择 16px 18px 两个尺寸
* @param setColorRealTime 是否在取色过程中实时更新颜色值
* @return SpecialUIButton 屏幕取色按钮
*/
static JButton getPickColorButton(final ColorSelectable colorSelectable, IconType iconType, final boolean setColorRealTime) {
SpecialUIButton pickColorButton = new SpecialUIButton(new WhiteButtonUI());
PickColorButtonFactory.iconType = iconType;
@ -37,9 +42,9 @@ public class PickColorButtonFactory {
pickColorButton.setPreferredSize(new Dimension(iconSize, iconSize));
pickColorButton.setCursor(new Cursor(Cursor.HAND_CURSOR));
pickColorButton.addMouseListener(new MouseAdapter() {
pickColorButton.addActionListener(new ActionListener() {
@Override
public void mousePressed(MouseEvent e) {
public void actionPerformed(ActionEvent e) {
new ColorPicker(colorSelectable, setColorRealTime);
}
});
@ -47,12 +52,14 @@ public class PickColorButtonFactory {
return pickColorButton;
}
// 取色器按钮使用的图标
/**
* 取色按钮可使用的图标尺寸
*/
public enum IconType {
ICON16, ICON18
}
private static class WhiteButtonUI extends ButtonUI {
private static class WhiteButtonUI extends UIBasicButtonUI {
@Override
public void paint(Graphics g, JComponent c) {
super.paint(g, c);

2
designer-base/src/main/java/com/fr/design/style/color/UsedColorPane.java

@ -72,7 +72,7 @@ public class UsedColorPane extends BasicPane {
int i = 0;
if (needPickColorButton) {
// 取色按钮
SpecialUIButton pickColorButton = PickColorButtonFactory.getPickColorButton(selectable, PickColorButtonFactory.IconType.ICON16, setColorRealTime);
JButton pickColorButton = PickColorButtonFactory.getPickColorButton(selectable, PickColorButtonFactory.IconType.ICON16, setColorRealTime);
panel.add(pickColorButton);
i++;
this.reserveCells += 1;

6
designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java

@ -18,6 +18,7 @@ import com.fr.design.form.util.XCreatorConstants;
import com.fr.design.roleAuthority.ReportAndFSManagePane;
import com.fr.design.utils.ComponentUtils;
import com.fr.form.main.parameter.FormParameterUI;
import com.fr.page.WatermarkPainter;
import com.fr.report.core.ReportUtils;
import com.fr.stable.ArrayUtils;
@ -113,7 +114,10 @@ public class FormDesignerUI extends ComponentUI {
// 绘制水印
private void paintWatermark(Graphics2D g) {
WatermarkAttr watermark = ReportUtils.getWatermarkFromAttrMarkFile(designer.getTarget());
if (designer.getTarget() instanceof FormParameterUI) { // cpt 的参数面板
return;
}
WatermarkAttr watermark = ReportUtils.getWatermarkAttrFromTemplateAndGlobal(designer.getTarget());
WatermarkPainter painter = WatermarkPainter.createPainter(watermark, designer.getResolution());
painter.paint(g, 0, 0, designer.getArea().getBounds());
}

5
designer-form/src/main/java/com/fr/design/mainframe/widget/accessibles/AccessibleBodyWatermarkEditor.java

@ -7,6 +7,7 @@ import com.fr.design.mainframe.widget.editors.ITextComponent;
import com.fr.design.mainframe.widget.renderer.WatermarkRenderer;
import com.fr.design.mainframe.widget.wrappers.WatermarkWrapper;
import com.fr.design.report.WatermarkPane;
import com.fr.design.report.WatermarkSettingPane;
import com.fr.intelli.record.Focus;
import com.fr.intelli.record.Original;
import com.fr.record.analyzer.EnableMetrics;
@ -20,7 +21,7 @@ import java.awt.*;
@EnableMetrics
public class AccessibleBodyWatermarkEditor extends UneditableAccessibleEditor {
private WatermarkPane watermarkPane;
private WatermarkSettingPane watermarkPane;
public AccessibleBodyWatermarkEditor() {
super(new WatermarkWrapper());
@ -34,7 +35,7 @@ public class AccessibleBodyWatermarkEditor extends UneditableAccessibleEditor {
@Override
protected void showEditorPane() {
if (watermarkPane == null) {
watermarkPane = new WatermarkPane();
watermarkPane = new WatermarkSettingPane();
watermarkPane.setPreferredSize(new Dimension(600, 400));
}
BasicDialog dlg = watermarkPane.showWindow(SwingUtilities.getWindowAncestor(this));

3
designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java

@ -107,8 +107,7 @@ public class FRAbsoluteBodyLayoutDefinePane extends FRAbsoluteLayoutDefinePane {
layoutCombox.setSelectedIndex(1);
borderStyleEditor.setValue(ob.getBorderStyle());
boundPane.populate();
watermarkEditor.setValue(ReportUtils.getWatermarkFromAttrMarkFile(getCurrentIOFile()));
watermarkEditor.setValue(ReportUtils.getWatermarkAttrFromTemplate(getCurrentIOFile()));
}
public WAbsoluteBodyLayout updateSubPane() {

2
designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java

@ -151,7 +151,7 @@ public class FRFitLayoutDefinePane extends AbstractDataModify<WFitLayout> {
adaptComboBox.setSelectedIndex(ob.getCompState());
componentIntervel.setValue(ob.getCompInterval());
stylePane.setValue(ob.getBorderStyle());
watermarkEditor.setValue(ReportUtils.getWatermarkFromAttrMarkFile(getCurrentIOFile()));
watermarkEditor.setValue(ReportUtils.getWatermarkAttrFromTemplate(getCurrentIOFile()));
}
private XLayoutContainer selectedBodyLayout(FormDesigner formDesigner) {

6
designer-realize/src/main/java/com/fr/design/actions/report/ReportWatermarkAction.java

@ -8,6 +8,7 @@ import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JWorkBook;
import com.fr.design.menu.KeySetUtils;
import com.fr.design.report.WatermarkPane;
import com.fr.design.report.WatermarkSettingPane;
import com.fr.intelli.record.Focus;
import com.fr.intelli.record.Original;
import com.fr.main.impl.WorkBook;
@ -37,9 +38,8 @@ public class ReportWatermarkAction extends JWorkBookAction {
return;
}
final WorkBook wbTpl = jwb.getTarget();
WatermarkAttr watermark = ReportUtils.getWatermarkFromAttrMarkFile(wbTpl);
final WatermarkPane watermarkPane = new WatermarkPane();
WatermarkAttr watermark = ReportUtils.getWatermarkAttrFromTemplate(wbTpl);
final WatermarkSettingPane watermarkPane = new WatermarkSettingPane();
watermarkPane.populate(watermark);
watermarkPane.showWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {
@Override

67
designer-realize/src/main/java/com/fr/design/webattr/printsettings/ReportPrintSettingPane.java

@ -1,77 +1,36 @@
package com.fr.design.webattr.printsettings;
import com.fr.base.print.PrintSettingsAttrMark;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.dialog.AbstractTemplateServerSettingPane;
import com.fr.report.core.ReportUtils;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.FlowLayout;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
/**
* 模版->打印设置
* Created by plough on 2018/3/6.
*/
public class ReportPrintSettingPane extends BasicPane {
private static final String[] CHOOSEITEM = new String[] {
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_I_Want_To_Set_Single"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Using_Server_Report_View_Settings")
};
private static final int SINGLE_SET = 0;
private static final int SERVER_SET = 1;
public class ReportPrintSettingPane extends AbstractTemplateServerSettingPane {
private UIComboBox chooseComboBox;
private PrintSettingPane printSettingPane;
public ReportPrintSettingPane() {
initComponents();
}
private void initComponents() {
chooseComboBox = new UIComboBox(CHOOSEITEM);
chooseComboBox.addItemListener(itemListener);
UILabel belowSetLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Blow_Set") + ":");
JPanel buttonPane = GUICoreUtils.createFlowPane(new Component[] {
belowSetLabel, chooseComboBox}, FlowLayout.LEFT, 0, 0);
buttonPane.setBorder(BorderFactory.createEmptyBorder(10, 20, 0, 0));
printSettingPane = new PrintSettingPane();
this.setLayout(new BorderLayout());
this.add(buttonPane, BorderLayout.NORTH);
this.add(printSettingPane, BorderLayout.CENTER);
}
private ItemListener itemListener = new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) {
if (chooseComboBox.getSelectedIndex() == 0) {
setSettingPaneEnabled(true);
} else {
populateServerSettings();
setSettingPaneEnabled(false);
}
}
@Override
protected JPanel getContentPane() {
if (printSettingPane == null) {
printSettingPane = new PrintSettingPane();
}
};
return printSettingPane;
}
private void setSettingPaneEnabled(boolean enabled) {
// GUICoreUtils.setEnabled 会遍历所有 Component。所以要先设置外层,如果是生效的,再设置内层
GUICoreUtils.setEnabled(printSettingPane, enabled);
if (enabled) {
printSettingPane.checkEnabled();
}
@Override
protected void checkContentPaneEnabled() {
printSettingPane.checkEnabled();
}
private void populateServerSettings() {
protected void populateServerSettings() {
PrintSettingsAttrMark printSettings = ReportUtils.getPrintSettingsFromServerConfig();
printSettingPane.populate(printSettings);
}
@ -88,7 +47,7 @@ public class ReportPrintSettingPane extends BasicPane {
public PrintSettingsAttrMark updateBean() {
PrintSettingsAttrMark printSettings = printSettingPane.updateBean();
if (chooseComboBox.getSelectedIndex() == SERVER_SET) {
if (isUsingServerSettings()) {
printSettings.setValid(false);
}
return printSettings;

2
designer-realize/src/main/java/com/fr/grid/GridUI.java

@ -1114,7 +1114,7 @@ public class GridUI extends ComponentUI {
// 绘制水印
private void paintWatermark(Graphics2D g2d, FineBook book) {
WatermarkAttr watermark = ReportUtils.getWatermarkFromAttrMarkFile(book);
WatermarkAttr watermark = ReportUtils.getWatermarkAttrFromTemplateAndGlobal(book);
WatermarkPainter painter = WatermarkPainter.createPainter(watermark, resolution);
painter.paint(g2d, gridSize.width, gridSize.height);
}

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

@ -109,7 +109,7 @@ public class PolyDesignUI extends ComponentUI {
// 绘制水印
private void paintWatermark(Graphics2D g2d, FineBook book, int width, int height) {
WatermarkAttr watermark = ReportUtils.getWatermarkFromAttrMarkFile(book);
WatermarkAttr watermark = ReportUtils.getWatermarkAttrFromTemplateAndGlobal(book);
WatermarkPainter painter = WatermarkPainter.createPainter(watermark, resolution);
painter.paint(g2d, width, height);
}

Loading…
Cancel
Save