@ -1,6 +1,10 @@
package com.fr.design.widget.component ;
import com.fr.design.ExtraDesignClassManager ;
import com.fr.design.beans.ErrorMsgTextFieldAdapter ;
import com.fr.design.beans.UITextFieldAdapter ;
import com.fr.design.designer.IntervalConstants ;
import com.fr.design.fun.TextFieldAdapterProvider ;
import com.fr.design.gui.icheckbox.UICheckBox ;
import com.fr.design.gui.ilable.UILabel ;
import com.fr.design.gui.ispinner.UISpinner ;
@ -9,6 +13,7 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout ;
import com.fr.design.layout.TableLayoutHelper ;
import com.fr.form.ui.NumberEditor ;
import com.fr.log.FineLoggerFactory ;
import com.fr.stable.AssistUtils ;
import com.fr.stable.StringUtils ;
@ -35,7 +40,7 @@ public class NumberEditorValidatePane extends JPanel {
private UISpinner minValueSpinner ;
private UISpinner decimalLength ;
private JPanel limitNumberPane ;
private UITextField errorMsgTextField ;
private ErrorMsgTextFieldAdapter errorMsgTextField ;
private JPanel errorMsgTextFieldPane ;
private ActionListener allowDecimalsListener ;
@ -100,9 +105,20 @@ public class NumberEditorValidatePane extends JPanel {
}
private void initErrorMsgPane ( ) {
errorMsgTextField = new UITextField ( ) ;
TextFieldAdapterProvider provider = ExtraDesignClassManager . getInstance ( ) . getSingle ( TextFieldAdapterProvider . XML_TAG ) ;
if ( provider ! = null ) {
try {
errorMsgTextField = provider . createTextFieldAdapter ( ) ;
} catch ( Exception e ) {
FineLoggerFactory . getLogger ( ) . error ( e . getMessage ( ) , e ) ;
errorMsgTextField = new UITextFieldAdapter ( ) ;
}
} else {
errorMsgTextField = new UITextFieldAdapter ( ) ;
}
errorMsgTextFieldPane = TableLayoutHelper . createGapTableLayoutPane (
new Component [ ] [ ] { new Component [ ] { new UILabel ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_Widget_Error_Tip" ) ) , errorMsgTextField } } , TableLayoutHelper . FILL_LASTCOLUMN , IntervalConstants . INTERVAL_L2 , IntervalConstants . INTERVAL_L1 ) ;
new Component [ ] [ ] { new Component [ ] { new UILabel ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_Widget_Error_Tip" ) ) , errorMsgTextField . getErrorMsgTextField ( ) } } , TableLayoutHelper . FILL_LASTCOLUMN , IntervalConstants . INTERVAL_L2 , IntervalConstants . INTERVAL_L1 ) ;
}