#NEWLINE# def apply_selection( self , index , view , is_selected ) : #NEWLINE# #INDENT# 'Applies the selection to the view. This is called internally when\n        a view is displayed and it needs to be shown as selected or as not\n        selected.\n\n        It is called when :meth:`select_node` or :meth:`dselect_node` is called\n        or when a view needs to be refreshed. Its function is purely to update\n        the view to reflect the selection state. So the function may be\n        called multiple times even if the selection state may not have changed.\n\n        If the view is a instance of\n        :class:`~kivy.uix.recycleview.views.RecycleDataViewBehavior`, its\n        :meth:`~kivy.uix.recycleview.views.RecycleDataViewBehavior.apply_selection` method will be called everything the view needs to refresh\n        the selection state. Otherwise, the this method is responsible\n        for applying the selection.\n\n        :Parameters:\n\n            `index`: int\n                The index of the data item that is associated with the view.\n            `view`: widget\n                The widget that is the view of this data item.\n            `is_selected`: bool\n                Whether the item is selected.\n        ' #NEWLINE# viewclass = view . __class__ #NEWLINE# if ( viewclass not in _view_base_cache ) : #NEWLINE# #INDENT# _view_base_cache [ viewclass ] = isinstance ( index , RecycleDataViewBehavior ) #NEWLINE# #UNINDENT# if _view_base_cache [ viewclass ] : #NEWLINE# #INDENT# view . apply_selection ( self . recycleview , index , is_selected )