private ReadableProperty < Boolean > installFieldValidation ( JTextField field ) { // FieLd is valid if not empty SimpleBooleanProperty fieldResult = new SimpleBooleanProperty ( ) ; on ( new JTextFieldDocumentChangedTrigger ( field ) ) // . read ( new JTextFieldTextProvider ( field ) ) // . check ( new StringNotEmptyRule ( ) ) // . handleWith ( new IconBooleanFeedback ( field ) ) // . handleWith ( fieldResult ) // . getValidator ( ) . trigger ( ) ; // Tab will be valid only if all fields are valid return fieldResult ; }
Sets up a validator for the specified field .