equal
deleted
inserted
replaced
1 #Copyright ReportLab Europe Ltd. 2000-2012 |
1 #Copyright ReportLab Europe Ltd. 2000-2012 |
2 #see license.txt for license details |
2 #see license.txt for license details |
3 #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/graphics/widgetbase.py |
3 #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/graphics/widgetbase.py |
4 __version__=''' $Id$ ''' |
4 __version__=''' $Id$ ''' |
5 __doc__='''Base class for user-defined graphical widgets''' |
5 __doc__='''Base class for user-defined graphical widgets''' |
6 |
|
7 import string |
|
8 |
6 |
9 from reportlab.graphics import shapes |
7 from reportlab.graphics import shapes |
10 from reportlab import rl_config |
8 from reportlab import rl_config |
11 from reportlab.lib import colors |
9 from reportlab.lib import colors |
12 from reportlab.lib.validators import * |
10 from reportlab.lib.validators import * |
97 widget designers. |
95 widget designers. |
98 """ |
96 """ |
99 |
97 |
100 childPropDicts = {} |
98 childPropDicts = {} |
101 for name, value in propDict.items(): |
99 for name, value in propDict.items(): |
102 parts = string.split(name, '.', 1) |
100 parts = name.split('.', 1) |
103 if len(parts) == 1: |
101 if len(parts) == 1: |
104 #simple attribute, set it now |
102 #simple attribute, set it now |
105 setattr(self, name, value) |
103 setattr(self, name, value) |
106 else: |
104 else: |
107 (childName, remains) = parts |
105 (childName, remains) = parts |