@Test public void testInitializeWithDateValue() throws Exception { Calendar calendar = Calendar.getInstance(); calendar.set( 2015, 8, 11 ); doReturn( calendar.getTime() ).when( updateContext ).getParameterValue( ENTRY_NAME ); comp.initialize(); JTextField dateField = getDateField( comp ); assertThat( dateField, is( notNullValue() ) ); assertThat( dateField.getText(), is( equalTo( EXPECTED_DATE_VALUE ) ) ); }
public void initialize() throws ReportDataFactoryException { final Object value = updateContext.getParameterValue( parameterName ); if ( value != null ) { try { adjustingToExternalInput = true; setDate( value ); } finally { adjustingToExternalInput = false; } } }
DatePickerParameterComponent extends JPanel implements ParameterComponent { public void initialize() throws ReportDataFactoryException { final Object value = updateContext.getParameterValue( parameterName ); if ( value != null ) { try { adjustingToExternalInput = true; setDate( value ); } finally { adjustingToExternalInput = false; } } } }
DatePickerParameterComponent extends JPanel implements ParameterComponent { public void initialize() throws ReportDataFactoryException { final Object value = updateContext.getParameterValue( parameterName ); if ( value != null ) { try { adjustingToExternalInput = true; setDate( value ); } finally { adjustingToExternalInput = false; } } } DatePickerParameterComponent( final ParameterDefinitionEntry entry, final ParameterContext parameterContext,
      final ParameterUpdateContext updateContext ); }
DatePickerParameterComponent extends JPanel implements ParameterComponent { public void initialize() throws ReportDataFactoryException { final Object value = updateContext.getParameterValue( parameterName ); if ( value != null ) { try { adjustingToExternalInput = true; setDate( value ); } finally { adjustingToExternalInput = false; } } } DatePickerParameterComponent( final ParameterDefinitionEntry entry, final ParameterContext parameterContext,
      final ParameterUpdateContext updateContext ); JComponent getUIComponent(); void initialize(); }
DatePickerParameterComponent extends JPanel implements ParameterComponent { public void initialize() throws ReportDataFactoryException { final Object value = updateContext.getParameterValue( parameterName ); if ( value != null ) { try { adjustingToExternalInput = true; setDate( value ); } finally { adjustingToExternalInput = false; } } } DatePickerParameterComponent( final ParameterDefinitionEntry entry, final ParameterContext parameterContext,
      final ParameterUpdateContext updateContext ); JComponent getUIComponent(); void initialize();  }