@Test public void testDestroy() { listItem.loadAnnotation( annotation, annotationSource ); listItem.destroy(); for ( AnnotationValuePairListItem valuePairItem : valuePairItems ) { verify( itemInstance, times( 1 ) ).destroy( valuePairItem ); } }
@PreDestroy protected void destroy() { for ( AnnotationValuePairListItem item : items ) { dispose( item ); } items.clear(); }
AnnotationListItem implements AnnotationListItemView.Presenter, IsWidget { @PreDestroy protected void destroy() { for ( AnnotationValuePairListItem item : items ) { dispose( item ); } items.clear(); } }
AnnotationListItem implements AnnotationListItemView.Presenter, IsWidget { @PreDestroy protected void destroy() { for ( AnnotationValuePairListItem item : items ) { dispose( item ); } items.clear(); } AnnotationListItem( ); @Inject  AnnotationListItem( AnnotationListItemView view, Instance<AnnotationValuePairListItem> itemInstance ); }
AnnotationListItem implements AnnotationListItemView.Presenter, IsWidget { @PreDestroy protected void destroy() { for ( AnnotationValuePairListItem item : items ) { dispose( item ); } items.clear(); } AnnotationListItem( ); @Inject  AnnotationListItem( AnnotationListItemView view, Instance<AnnotationValuePairListItem> itemInstance ); @Override Widget asWidget( ); void loadAnnotation( Annotation annotation, AnnotationSource annotationSource ); void setDeleteAnnotationHandler( AdvancedAnnotationListEditorView.DeleteAnnotationHandler deleteAnnotationHandler ); void setClearValuePairHandler( AdvancedAnnotationListEditorView.ClearValuePairHandler clearValuePairHandler ); void setEditValuePairHandler( AdvancedAnnotationListEditorView.EditValuePairHandler editValuePairHandler ); void setCollapseChangeHandler( AdvancedAnnotationListEditorView.CollapseChangeHandler collapseChangeHandler ); boolean isCollapsed( ); void setCollapsed( boolean collapsed ); void setReadonly( boolean readonly ); @Override void onDelete( ); @Override void onCollapseChange( ); }
AnnotationListItem implements AnnotationListItemView.Presenter, IsWidget { @PreDestroy protected void destroy() { for ( AnnotationValuePairListItem item : items ) { dispose( item ); } items.clear(); } AnnotationListItem( ); @Inject  AnnotationListItem( AnnotationListItemView view, Instance<AnnotationValuePairListItem> itemInstance ); @Override Widget asWidget( ); void loadAnnotation( Annotation annotation, AnnotationSource annotationSource ); void setDeleteAnnotationHandler( AdvancedAnnotationListEditorView.DeleteAnnotationHandler deleteAnnotationHandler ); void setClearValuePairHandler( AdvancedAnnotationListEditorView.ClearValuePairHandler clearValuePairHandler ); void setEditValuePairHandler( AdvancedAnnotationListEditorView.EditValuePairHandler editValuePairHandler ); void setCollapseChangeHandler( AdvancedAnnotationListEditorView.CollapseChangeHandler collapseChangeHandler ); boolean isCollapsed( ); void setCollapsed( boolean collapsed ); void setReadonly( boolean readonly ); @Override void onDelete( ); @Override void onCollapseChange( );  }