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