Home | Trees | Indices | Help |
|
---|
|
1 """ 2 PureMVC Python Port by Toby de Havilland <toby.de.havilland@puremvc.org> 3 PureMVC Python Port by Daniele Esposti <expo@expobrain.net> 4 PureMVC - Copyright(c) 2006-08 Futurescale, Inc., Some rights reserved. 5 Your reuse is governed by the Creative Commons Attribution 3.0 License 6 """ 7 8 import puremvc.interfaces 9 import puremvc.patterns.observer 1012 """ 13 A base C{IMediator} implementation. 14 15 @see: L{View<puremvc.core.View>} 16 """ 17 18 """ 19 The name of the C{Mediator}. 20 """ 21 NAME = "Mediator" 2210024 """ 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 # Call superclass 32 super(Mediator, self).__init__() 33 34 # Initialize class 35 self.mediatorName = self.NAME if mediatorName is None else mediatorName 36 self.viewComponent = viewComponent3739 """ 40 Get the name of the C{Mediator}. 41 42 @return: the Mediator name 43 """ 44 return self.mediatorName4547 """ 48 Set the C{IMediator}'s view component. 49 50 @param viewComponent: the view component 51 """ 52 self.viewComponent = viewComponent5355 """ 56 Get the C{Mediator}'s view component. 57 58 Additionally, an implicit getter will usually be defined in the 59 subclass that casts the view object to a type, like this:: 60 61 private function get comboBox : mx.controls.ComboBox 62 { 63 return viewComponent as mx.controls.ComboBox; 64 } 65 66 @return: the view component 67 """ 68 return self.viewComponent6971 """ 72 List the C{INotification} names this 73 C{Mediator} is interested in being notified of. 74 75 @return: List the list of C{INotification} names 76 """ 77 return []7880 """ 81 Handle C{INotification}s. 82 83 Typically this will be handled in a if/else statement, 84 with one 'comparison' entry per C{INotification} 85 the C{Mediator} is interested in. 86 """ 87 pass88 94
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sun Sep 23 18:56:02 2012 | http://epydoc.sourceforge.net |