Browse Source

REPORT-46102 产品改进,水印面板不能直接输入文字,必须在弹出的公式面板下才能编辑

bugfix/10.0
Hugh.C 4 years ago
parent
commit
2f039cdcd6
  1. 4
      designer-base/src/main/java/com/fr/design/editor/editor/FormulaEditor.java
  2. 14
      designer-base/src/main/java/com/fr/design/report/WatermarkPane.java

4
designer-base/src/main/java/com/fr/design/editor/editor/FormulaEditor.java

@ -99,6 +99,10 @@ public class FormulaEditor extends Editor<BaseFormula> {
return formula;
}
public UITextField getUITextField() {
return currentTextField;
}
/**
* Return the value of the CellEditor.
*/

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

@ -1,14 +1,16 @@
package com.fr.design.report;
import com.fr.base.BaseFormula;
import com.fr.base.iofile.attr.WatermarkAttr;
import com.fr.design.dialog.BasicPane;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.editor.editor.FormulaEditor;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.ispinner.UnsignedIntUISpinner;
import com.fr.design.gui.style.FRFontPane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
@ -50,7 +52,7 @@ public class WatermarkPane extends BasicPane {
// 水印预览面板
private WatermarkPreviewPane watermarkPreviewPane;
// 文字
private TinyFormulaPane formulaPane;
private FormulaEditor formulaPane;
// 字号
private UIComboBox fontSizeComboBox;
//横向间距
@ -119,16 +121,16 @@ public class WatermarkPane extends BasicPane {
return watermark;
}
public TinyFormulaPane getFormulaPane() {
public FormulaEditor getFormulaPane() {
return formulaPane;
}
public void setFormulaPane(TinyFormulaPane formulaPane) {
public void setFormulaPane(FormulaEditor formulaPane) {
this.formulaPane = formulaPane;
}
protected UIScrollPane initRightPane() {
formulaPane = new TinyFormulaPane();
formulaPane = new FormulaEditor(Toolkit.i18nText("Fine-Design_Report_Parameter_Formula"));
fontSizeComboBox = new UIComboBox(FRFontPane.FONT_SIZES);
fontSizeComboBox.setEditable(true);
horizontalGapSpinner = new UnsignedIntUISpinner(100, Integer.MAX_VALUE, 1, 200);
@ -228,7 +230,7 @@ public class WatermarkPane extends BasicPane {
}
private void populateFourmula(String formula) {
this.formulaPane.populateBean(formula);
this.formulaPane.setValue(BaseFormula.createFormulaBuilder().build(formula));
this.formulaPane.getUITextField().getDocument()
.addDocumentListener(new DocumentListener() {
@Override

Loading…
Cancel
Save