Browse Source

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

* commit '6b0814a4dfc11bde1390e584b1514594e9a60816':
  REPORT-8126 水印 前端样式属性, 浮层, 点击穿透=>后台数据传递
  REPORT-8125 水印 设计器配置界面与实时预览=>改名
master
superman 7 years ago
parent
commit
d45c573fa6
  1. 10
      designer-base/src/com/fr/design/report/WatermarkPane.java
  2. 8
      designer-base/src/com/fr/design/report/WatermarkPreviewPane.java
  3. 4
      designer-form/src/com/fr/design/mainframe/widget/accessibles/AccessibleBodyWatermarkEditor.java
  4. 6
      designer-form/src/com/fr/design/mainframe/widget/wrappers/WatermarkWrapper.java
  5. 6
      designer-form/src/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java
  6. 10
      designer-form/src/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java
  7. 10
      designer-realize/src/com/fr/design/actions/report/ReportWatermarkAction.java

10
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());

8
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();
}

4
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);
}
}

6
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();
}
}

6
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;
@ -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()));
}
@ -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);

10
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;
@ -147,7 +143,7 @@ public class FRFitLayoutDefinePane extends AbstractDataModify<WFitLayout> {
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) {
@ -215,7 +211,7 @@ public class FRFitLayoutDefinePane extends AbstractDataModify<WFitLayout> {
}
private void updateWatermark() {
WatermarkAttrMark watermark = (WatermarkAttrMark) watermarkEditor.getValue();
WatermarkAttr watermark = (WatermarkAttr) watermarkEditor.getValue();
if (watermark != null) {
IOFile ioFile = getCurrentIOFile();
ioFile.addAttrMark(watermark);

10
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.getWatermarkFromAttrMarkFile(wbTpl);
final WatermarkPane watermarkPane = new WatermarkPane();
watermarkPane.populate(watermark);

Loading…
Cancel
Save