#NEWLINE# def register_to_hub( self , hub ) : #NEWLINE# #INDENT# super ( ImageWidgetBase , self ) . register_to_hub ( hub ) #NEWLINE# self . client . register_to_hub ( hub ) #NEWLINE# dc_filt = ( lambda x : ( x . sender is self . client . _data ) ) #NEWLINE# display_data_filter = ( lambda x : ( x . data is self . client . display_data ) ) #NEWLINE# hub . subscribe ( self , core . message . DataCollectionAddMessage , handler = ( lambda x : self . add_data_to_combo ( x . data ) ) , filter = dc_filt ) #NEWLINE# hub . subscribe ( self , core . message . DataCollectionDeleteMessage , handler = ( lambda x : self . remove_data_from_combo ( x . data ) ) , filter = dc_filt ) #NEWLINE# hub . subscribe ( hub , core . message . DataUpdateMessage , handler = ( lambda x : self . _sync_data_labels ( ) ) ) #NEWLINE# hub . subscribe ( self , core . message . ComponentsChangedMessage , handler = ( lambda x : self . set_attribute_combo ( x . data ) ) , filter = display_data_filter )