Home | Trees | Indices | Help |
|
---|
|
1 """ 2 PureMVC Python Port by Toby de Havilland <toby.de.havilland@puremvc.org> 3 PureMVC - Copyright(c) 2006-08 Futurescale, Inc., Some rights reserved. 4 Your reuse is governed by the Creative Commons Attribution 3.0 License 5 """ 6 7 import puremvc.interfaces 8 import puremvc.patterns.observer 9 import puremvc.patterns.facade 1011 -class Mediator(puremvc.patterns.observer.Notifier, puremvc.interfaces.IMediator, puremvc.interfaces.INotifier):12 """ 13 A base C{IMediator} implementation. 14 15 @see: L{View<org.puremvc.as3.core.view.View>} 16 """ 17 18 NAME = "Mediator" 19 facade = None 20 viewComponent = None 21 mediatorName = None 229124 """ 25 Mediator Constructor 26 27 Typically, a C{Mediator} will be written to serve 28 one specific control or group controls and so, 29 will not have a need to be dynamically named. 30 """ 31 self.facade = puremvc.patterns.facade.Facade.getInstance() 32 if mediatorName: 33 self.mediatorName = mediatorName 34 else: 35 self.mediatorName = self.NAME 36 self.viewComponent = viewComponent3739 """ 40 Get the name of the C{Mediator}. 41 @return: the Mediator name 42 """ 43 return self.mediatorName4446 """ 47 Set the C{IMediator}'s view component. 48 49 @param viewComponent: the view component 50 """ 51 self.viewComponent = viewComponent5254 """ 55 Get the C{Mediator}'s view component. 56 57 @return: the view component 58 """ 59 return self.viewComponent6062 """ 63 List the C{INotification} names this 64 C{Mediator} is interested in being notified of. 65 66 @return: List the list of C{INotification} names 67 """ 68 return []6971 """ 72 Handle C{INotification}s. 73 74 Typically this will be handled in a if/else statement, 75 with one 'comparison' entry per C{INotification} 76 the C{Mediator} is interested in. 77 """ 78 pass79 85
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Sep 22 01:31:52 2009 | http://epydoc.sourceforge.net |