public static Preference createSingleTextPreference ( String name , String label , TextDisplay displayType , String defaultValue ) { SingleTextPreferenceInput input = new SingleTextPreferenceInput ( ) ; input . setDefault ( defaultValue ) ; input . setDisplay ( displayType ) ; Preference pref = new Preference ( ) ; pref . setName ( name ) ; pref . setLabel ( label ) ; pref . setPreferenceInput ( new JAXBElement < SingleTextPreferenceInput > ( new QName ( "single-text-parameter-input" ) , SingleTextPreferenceInput . class , input ) ) ; return pref ; }
Craete a single - valued text input preference .