private void setDateControl ( DateControl control ) { requireNonNull ( control ) ; control . addEventFilter ( RequestEvent . REQUEST , evt -> addEvent ( evt , LogEntryType . REQUEST_EVENT ) ) ; control . addEventFilter ( LoadEvent . LOAD , evt -> addEvent ( evt , LogEntryType . LOAD_EVENT ) ) ; // listen to calendars for ( Calendar calendar : control . getCalendars ( ) ) { calendar . addEventHandler ( calendarListener ) ; } ListChangeListener < ? super Calendar > l = change -> { while ( change . next ( ) ) { if ( change . wasAdded ( ) ) { for ( Calendar c : change . getAddedSubList ( ) ) { c . addEventHandler ( calendarListener ) ; } } else if ( change . wasRemoved ( ) ) { for ( Calendar c : change . getRemoved ( ) ) { c . removeEventHandler ( calendarListener ) ; } } } } ; control . getCalendars ( ) . addListener ( l ) ; Bindings . bindBidirectional ( datePicker . valueProperty ( ) , control . dateProperty ( ) ) ; Bindings . bindBidirectional ( todayPicker . valueProperty ( ) , control . todayProperty ( ) ) ; Bindings . bindBidirectional ( timeField . valueProperty ( ) , control . timeProperty ( ) ) ; timeField . setDisable ( false ) ; }
Sets the control that will be monitored by the developer console .