@Test public void testCreateDateFormat_ddMMyyyy() { DateFormat dateFormat = comp.createDateFormat( "dd.MM.yyyy", Locale.getDefault(), TimeZone.getDefault() ); verifyCommonDateFormats( dateFormat ); assertThat( dateFormat, instanceOf( SimpleDateFormat.class ) ); }
DateFormat createDateFormat( final String parameterFormatString, final Locale locale, final TimeZone timeZone ) { if ( parameterFormatString != null ) { try { final SimpleDateFormat dateFormat = new SimpleDateFormat( parameterFormatString, locale ); dateFormat.setTimeZone( timeZone ); dateFormat.setLenient( false ); return dateFormat; } catch ( Exception e ) { logger.warn( "Parameter format-string for date-parameter was not a valid date-format-string", e ); } } DateFormat dateTimeInstance = DateFormat.getDateTimeInstance( DateFormat.LONG, DateFormat.LONG, locale ); dateTimeInstance.setTimeZone( timeZone ); dateTimeInstance.setLenient( false ); return dateTimeInstance; }
DatePickerParameterComponent extends JPanel implements ParameterComponent { DateFormat createDateFormat( final String parameterFormatString, final Locale locale, final TimeZone timeZone ) { if ( parameterFormatString != null ) { try { final SimpleDateFormat dateFormat = new SimpleDateFormat( parameterFormatString, locale ); dateFormat.setTimeZone( timeZone ); dateFormat.setLenient( false ); return dateFormat; } catch ( Exception e ) { logger.warn( "Parameter format-string for date-parameter was not a valid date-format-string", e ); } } DateFormat dateTimeInstance = DateFormat.getDateTimeInstance( DateFormat.LONG, DateFormat.LONG, locale ); dateTimeInstance.setTimeZone( timeZone ); dateTimeInstance.setLenient( false ); return dateTimeInstance; } }
DatePickerParameterComponent extends JPanel implements ParameterComponent { DateFormat createDateFormat( final String parameterFormatString, final Locale locale, final TimeZone timeZone ) { if ( parameterFormatString != null ) { try { final SimpleDateFormat dateFormat = new SimpleDateFormat( parameterFormatString, locale ); dateFormat.setTimeZone( timeZone ); dateFormat.setLenient( false ); return dateFormat; } catch ( Exception e ) { logger.warn( "Parameter format-string for date-parameter was not a valid date-format-string", e ); } } DateFormat dateTimeInstance = DateFormat.getDateTimeInstance( DateFormat.LONG, DateFormat.LONG, locale ); dateTimeInstance.setTimeZone( timeZone ); dateTimeInstance.setLenient( false ); return dateTimeInstance; } DatePickerParameterComponent( final ParameterDefinitionEntry entry, final ParameterContext parameterContext,
      final ParameterUpdateContext updateContext ); }
DatePickerParameterComponent extends JPanel implements ParameterComponent { DateFormat createDateFormat( final String parameterFormatString, final Locale locale, final TimeZone timeZone ) { if ( parameterFormatString != null ) { try { final SimpleDateFormat dateFormat = new SimpleDateFormat( parameterFormatString, locale ); dateFormat.setTimeZone( timeZone ); dateFormat.setLenient( false ); return dateFormat; } catch ( Exception e ) { logger.warn( "Parameter format-string for date-parameter was not a valid date-format-string", e ); } } DateFormat dateTimeInstance = DateFormat.getDateTimeInstance( DateFormat.LONG, DateFormat.LONG, locale ); dateTimeInstance.setTimeZone( timeZone ); dateTimeInstance.setLenient( false ); return dateTimeInstance; } DatePickerParameterComponent( final ParameterDefinitionEntry entry, final ParameterContext parameterContext,
      final ParameterUpdateContext updateContext ); JComponent getUIComponent(); void initialize(); }
DatePickerParameterComponent extends JPanel implements ParameterComponent { DateFormat createDateFormat( final String parameterFormatString, final Locale locale, final TimeZone timeZone ) { if ( parameterFormatString != null ) { try { final SimpleDateFormat dateFormat = new SimpleDateFormat( parameterFormatString, locale ); dateFormat.setTimeZone( timeZone ); dateFormat.setLenient( false ); return dateFormat; } catch ( Exception e ) { logger.warn( "Parameter format-string for date-parameter was not a valid date-format-string", e ); } } DateFormat dateTimeInstance = DateFormat.getDateTimeInstance( DateFormat.LONG, DateFormat.LONG, locale ); dateTimeInstance.setTimeZone( timeZone ); dateTimeInstance.setLenient( false ); return dateTimeInstance; } DatePickerParameterComponent( final ParameterDefinitionEntry entry, final ParameterContext parameterContext,
      final ParameterUpdateContext updateContext ); JComponent getUIComponent(); void initialize();  }