From 29f4f6c849da529a5f83b4959d065e0d92393dc7 Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 17 May 2018 14:32:09 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-8125=20=E6=B0=B4=E5=8D=B0=20?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E9=85=8D=E7=BD=AE=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E4=B8=8E=E5=AE=9E=E6=97=B6=E9=A2=84=E8=A7=88=3D>=E6=94=B9?= =?UTF-8?q?=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 6e99e7ab0c..ab9bbf7aef 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 9162a87e54..94b3a503d0 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 895aa8dbcf..863dd1b951 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 914c940284..a807f03bb5 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 7707171676..3374ca778c 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 4f6b9fb3ed..1c7bbeda64 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 76494b3daf..30604ed2bc 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); From 970e0b5b7709e755c740611ff15aad5da43f45f3 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 21 May 2018 12:25:58 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-8126=20=E6=B0=B4=E5=8D=B0=20?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E6=A0=B7=E5=BC=8F=E5=B1=9E=E6=80=A7,=20?= =?UTF-8?q?=E6=B5=AE=E5=B1=82,=20=E7=82=B9=E5=87=BB=E7=A9=BF=E9=80=8F=3D>?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E6=95=B0=E6=8D=AE=E4=BC=A0=E9=80=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java | 2 +- .../design/widget/ui/designer/layout/FRFitLayoutDefinePane.java | 2 +- .../src/com/fr/design/actions/report/ReportWatermarkAction.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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 3374ca778c..387c6f782d 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 @@ -101,7 +101,7 @@ public class FRAbsoluteBodyLayoutDefinePane extends FRAbsoluteLayoutDefinePane { public void populateSubPane(WAbsoluteLayout ob) { layoutCombox.setSelectedIndex(1); borderStyleEditor.setValue(ob.getBorderStyle()); - watermarkEditor.setValue(ReportUtils.getWatermarkFromIOFile(getCurrentIOFile())); + watermarkEditor.setValue(ReportUtils.getWatermarkFromAttrMarkFile(getCurrentIOFile())); } 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 1c7bbeda64..5eb67b136d 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 @@ -143,7 +143,7 @@ public class FRFitLayoutDefinePane extends AbstractDataModify { adaptComboBox.setSelectedIndex(ob.getCompState()); componentIntervel.setValue(ob.getCompInterval()); stylePane.setValue(ob.getBorderStyle()); - watermarkEditor.setValue(ReportUtils.getWatermarkFromIOFile(getCurrentIOFile())); + watermarkEditor.setValue(ReportUtils.getWatermarkFromAttrMarkFile(getCurrentIOFile())); } private XLayoutContainer selectedBodyLayout(FormDesigner formDesigner) { 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 30604ed2bc..ebe0b4ed11 100644 --- a/designer-realize/src/com/fr/design/actions/report/ReportWatermarkAction.java +++ b/designer-realize/src/com/fr/design/actions/report/ReportWatermarkAction.java @@ -33,7 +33,7 @@ public class ReportWatermarkAction extends JWorkBookAction { return; } final WorkBook wbTpl = jwb.getTarget(); - WatermarkAttr watermark = ReportUtils.getWatermarkFromIOFile(wbTpl); + WatermarkAttr watermark = ReportUtils.getWatermarkFromAttrMarkFile(wbTpl); final WatermarkPane watermarkPane = new WatermarkPane(); watermarkPane.populate(watermark);