private void zApplyAllowEmptyTimes ( ) { // Find out if we need to initialize a null time. if ( ( ! allowEmptyTimes ) && ( parent . getTime ( ) == null ) ) { // We need to initialize the current time, so find out if the default time is vetoed. LocalTime defaultTime = LocalTime . of ( 7 , 0 ) ; if ( InternalUtilities . isTimeVetoed ( vetoPolicy , defaultTime ) ) { throw new RuntimeException ( "Exception in TimePickerSettings.zApplyAllowEmptyTimes(), " + "Could not initialize a null time to 7am, because 7am is vetoed by " + "the veto policy. To prevent this exception, always call " + "setAllowEmptyTimes() -before- setting a veto policy." ) ; } // Initialize the current time. parent . setTime ( defaultTime ) ; } }
zApplyAllowEmptyTimes This applies the named setting to the parent component .