From 29f4f6c849da529a5f83b4959d065e0d92393dc7 Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 17 May 2018 14:32:09 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-8125=20=E6=B0=B4=E5=8D=B0=20=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E9=85=8D=E7=BD=AE=E7=95=8C=E9=9D=A2=E4=B8=8E?= =?UTF-8?q?=E5=AE=9E=E6=97=B6=E9=A2=84=E8=A7=88=3D>=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/report/WatermarkPane.java | 10 +++++----- .../src/com/fr/design/report/WatermarkPreviewPane.java | 8 ++++---- .../accessibles/AccessibleBodyWatermarkEditor.java | 4 ++-- .../mainframe/widget/wrappers/WatermarkWrapper.java | 6 +++--- .../layout/FRAbsoluteBodyLayoutDefinePane.java | 4 ++-- .../ui/designer/layout/FRFitLayoutDefinePane.java | 8 ++------ .../design/actions/report/ReportWatermarkAction.java | 10 ++-------- 7 files changed, 20 insertions(+), 30 deletions(-) diff --git a/designer-base/src/com/fr/design/report/WatermarkPane.java b/designer-base/src/com/fr/design/report/WatermarkPane.java index 6e99e7ab0..ab9bbf7ae 100644 --- a/designer-base/src/com/fr/design/report/WatermarkPane.java +++ b/designer-base/src/com/fr/design/report/WatermarkPane.java @@ -1,6 +1,6 @@ package com.fr.design.report; -import com.fr.base.iofileattr.WatermarkAttrMark; +import com.fr.base.iofileattr.WatermarkAttr; import com.fr.design.dialog.BasicPane; import com.fr.design.formula.TinyFormulaPane; import com.fr.design.gui.icombobox.UIComboBox; @@ -69,9 +69,9 @@ public class WatermarkPane extends BasicPane { rightPane.add(initRightPane(), BorderLayout.CENTER); } - public void populate(WatermarkAttrMark watermark) { + public void populate(WatermarkAttr watermark) { if (watermark == null) { - watermark = new WatermarkAttrMark(); + watermark = new WatermarkAttr(); } populateFourmula(watermark.getText()); populateFontSize(watermark.getFontSize()); @@ -79,8 +79,8 @@ public class WatermarkPane extends BasicPane { paintPreviewPane(); } - public WatermarkAttrMark update() { - WatermarkAttrMark watermark = new WatermarkAttrMark(); + public WatermarkAttr update() { + WatermarkAttr watermark = new WatermarkAttr(); watermark.setText(formulaPane.getUITextField().getText()); watermark.setFontSize((int)fontSizeComboBox.getSelectedItem()); watermark.setColor(colorPane.getColor()); diff --git a/designer-base/src/com/fr/design/report/WatermarkPreviewPane.java b/designer-base/src/com/fr/design/report/WatermarkPreviewPane.java index 9162a87e5..94b3a503d 100644 --- a/designer-base/src/com/fr/design/report/WatermarkPreviewPane.java +++ b/designer-base/src/com/fr/design/report/WatermarkPreviewPane.java @@ -1,6 +1,6 @@ package com.fr.design.report; -import com.fr.base.iofileattr.WatermarkAttrMark; +import com.fr.base.iofileattr.WatermarkAttr; import com.fr.design.constants.UIConstants; import com.fr.general.FRFont; @@ -22,18 +22,18 @@ public class WatermarkPreviewPane extends JPanel { private int horizontalGap = 20; // 水平间隔(一个中文字符宽度) private int verticalGap = 40; // 垂直间隔(两个中文字符宽度) - private WatermarkAttrMark watermark; + private WatermarkAttr watermark; public WatermarkPreviewPane() { - this.watermark = new WatermarkAttrMark(); + this.watermark = new WatermarkAttr(); repaint(); } /** * 重新画 */ - public void repaint(WatermarkAttrMark watermark){ + public void repaint(WatermarkAttr watermark){ this.watermark = watermark; super.repaint(); } diff --git a/designer-form/src/com/fr/design/mainframe/widget/accessibles/AccessibleBodyWatermarkEditor.java b/designer-form/src/com/fr/design/mainframe/widget/accessibles/AccessibleBodyWatermarkEditor.java index 895aa8dbc..863dd1b95 100644 --- a/designer-form/src/com/fr/design/mainframe/widget/accessibles/AccessibleBodyWatermarkEditor.java +++ b/designer-form/src/com/fr/design/mainframe/widget/accessibles/AccessibleBodyWatermarkEditor.java @@ -1,6 +1,6 @@ package com.fr.design.mainframe.widget.accessibles; -import com.fr.base.iofileattr.WatermarkAttrMark; +import com.fr.base.iofileattr.WatermarkAttr; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.mainframe.widget.editors.ITextComponent; @@ -42,7 +42,7 @@ public class AccessibleBodyWatermarkEditor extends UneditableAccessibleEditor { fireStateChanged(); } }); - watermarkPane.populate((WatermarkAttrMark) getValue()); + watermarkPane.populate((WatermarkAttr) getValue()); dlg.setVisible(true); } } \ No newline at end of file diff --git a/designer-form/src/com/fr/design/mainframe/widget/wrappers/WatermarkWrapper.java b/designer-form/src/com/fr/design/mainframe/widget/wrappers/WatermarkWrapper.java index 914c94028..a807f03bb 100644 --- a/designer-form/src/com/fr/design/mainframe/widget/wrappers/WatermarkWrapper.java +++ b/designer-form/src/com/fr/design/mainframe/widget/wrappers/WatermarkWrapper.java @@ -1,6 +1,6 @@ package com.fr.design.mainframe.widget.wrappers; -import com.fr.base.iofileattr.WatermarkAttrMark; +import com.fr.base.iofileattr.WatermarkAttr; import com.fr.design.Exception.ValidationException; import com.fr.design.designer.properties.Decoder; import com.fr.design.designer.properties.Encoder; @@ -12,7 +12,7 @@ import com.fr.stable.StringUtils; public class WatermarkWrapper implements Encoder, Decoder { @Override public Object decode(String txt) { - return new WatermarkAttrMark(); + return new WatermarkAttr(); } @Override @@ -25,6 +25,6 @@ public class WatermarkWrapper implements Encoder, Decoder { if (v == null) { return StringUtils.EMPTY; } - return ((WatermarkAttrMark)v).getText(); + return ((WatermarkAttr)v).getText(); } } diff --git a/designer-form/src/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java b/designer-form/src/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java index 770717167..3374ca778 100644 --- a/designer-form/src/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java +++ b/designer-form/src/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java @@ -1,7 +1,7 @@ package com.fr.design.widget.ui.designer.layout; import com.fr.base.io.IOFile; -import com.fr.base.iofileattr.WatermarkAttrMark; +import com.fr.base.iofileattr.WatermarkAttr; import com.fr.design.data.DataCreatorUI; import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.creator.XCreator; @@ -125,7 +125,7 @@ public class FRAbsoluteBodyLayoutDefinePane extends FRAbsoluteLayoutDefinePane { } private void updateWatermark() { - WatermarkAttrMark watermark = (WatermarkAttrMark) watermarkEditor.getValue(); + WatermarkAttr watermark = (WatermarkAttr) watermarkEditor.getValue(); if (watermark != null) { IOFile ioFile = getCurrentIOFile(); ioFile.addAttrMark(watermark); diff --git a/designer-form/src/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java b/designer-form/src/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java index 4f6b9fb3e..1c7bbeda6 100644 --- a/designer-form/src/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java +++ b/designer-form/src/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java @@ -1,7 +1,7 @@ package com.fr.design.widget.ui.designer.layout; import com.fr.base.io.IOFile; -import com.fr.base.iofileattr.WatermarkAttrMark; +import com.fr.base.iofileattr.WatermarkAttr; import com.fr.design.data.DataCreatorUI; import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.creator.XCreator; @@ -19,11 +19,8 @@ import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; -import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormSelectionUtils; -import com.fr.design.mainframe.JForm; -import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.WidgetPropertyPane; import com.fr.design.mainframe.widget.accessibles.AccessibleBodyWatermarkEditor; import com.fr.design.mainframe.widget.accessibles.AccessibleWLayoutBorderStyleEditor; @@ -37,7 +34,6 @@ import com.fr.form.ui.container.WBodyLayoutType; import com.fr.form.ui.container.WFitLayout; import com.fr.general.FRLogger; import com.fr.general.Inter; -import com.fr.main.FineBook; import com.fr.report.core.ReportUtils; import javax.swing.BorderFactory; @@ -215,7 +211,7 @@ public class FRFitLayoutDefinePane extends AbstractDataModify { } private void updateWatermark() { - WatermarkAttrMark watermark = (WatermarkAttrMark) watermarkEditor.getValue(); + WatermarkAttr watermark = (WatermarkAttr) watermarkEditor.getValue(); if (watermark != null) { IOFile ioFile = getCurrentIOFile(); ioFile.addAttrMark(watermark); diff --git a/designer-realize/src/com/fr/design/actions/report/ReportWatermarkAction.java b/designer-realize/src/com/fr/design/actions/report/ReportWatermarkAction.java index 76494b3da..30604ed2b 100644 --- a/designer-realize/src/com/fr/design/actions/report/ReportWatermarkAction.java +++ b/designer-realize/src/com/fr/design/actions/report/ReportWatermarkAction.java @@ -1,21 +1,15 @@ package com.fr.design.actions.report; import com.fr.base.BaseUtils; -import com.fr.base.IconManager; -import com.fr.base.iofileattr.WatermarkAttrMark; +import com.fr.base.iofileattr.WatermarkAttr; import com.fr.design.actions.JWorkBookAction; -import com.fr.design.actions.ReportComponentAction; import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.JWorkBook; -import com.fr.design.mainframe.ReportComponent; import com.fr.design.menu.KeySetUtils; import com.fr.design.report.WatermarkPane; -import com.fr.general.IOUtils; -import com.fr.main.TemplateWorkBook; import com.fr.main.impl.WorkBook; import com.fr.report.core.ReportUtils; -import com.fr.report.stable.ReportSettings; import java.awt.event.ActionEvent; @@ -39,7 +33,7 @@ public class ReportWatermarkAction extends JWorkBookAction { return; } final WorkBook wbTpl = jwb.getTarget(); - WatermarkAttrMark watermark = ReportUtils.getWatermarkFromIOFile(wbTpl); + WatermarkAttr watermark = ReportUtils.getWatermarkFromIOFile(wbTpl); final WatermarkPane watermarkPane = new WatermarkPane(); watermarkPane.populate(watermark);