/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/UI/classgen.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/UI/classgen.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1391 by jonathan, Thu Jul 10 14:54:02 2003 UTC revision 1432 by jonathan, Wed Jul 16 13:24:03 2003 UTC
# Line 25  import classifier, resource Line 25  import classifier, resource
25  from Thuban.Model.classgen import \  from Thuban.Model.classgen import \
26      generate_uniform_distribution, generate_singletons, generate_quantiles, \      generate_uniform_distribution, generate_singletons, generate_quantiles, \
27      CustomRamp, GreyRamp, RedRamp, GreenRamp, BlueRamp, GreenToRedRamp, \      CustomRamp, GreyRamp, RedRamp, GreenRamp, BlueRamp, GreenToRedRamp, \
28      HotToColdRamp      HotToColdRamp, FixedRamp
29    
30    
31  USEALL_BMP  = "group_use_all"  USEALL_BMP  = "group_use_all"
# Line 225  class ClassGenDialog(wxDialog): Line 225  class ClassGenDialog(wxDialog):
225              ramp = propPanel.GetRamp()              ramp = propPanel.GetRamp()
226              if self.border_color and self.fix_border_check.IsChecked():              if self.border_color and self.fix_border_check.IsChecked():
227                  props = self.border_color.GetProperties()                  props = self.border_color.GetProperties()
228                  lineColor = props.GetLineColor()                  ramp = FixedRamp(ramp,
229                  lineWidth = props.GetLineWidth()                      (props.GetLineColor(), props.GetLineWidth(), None))
             else:  
                 lineColor = None  
                 lineWidth = None  
230    
231              if genSel == GENCOMBOSTR_UNIFORM:              if genSel == GENCOMBOSTR_UNIFORM:
232    
# Line 242  class ClassGenDialog(wxDialog): Line 239  class ClassGenDialog(wxDialog):
239    
240                      self.clazz = generate_uniform_distribution(                      self.clazz = generate_uniform_distribution(
241                                  min, max, numGroups, ramp,                                  min, max, numGroups, ramp,
242                                  self.type == FIELDTYPE_INT,                                  self.type == FIELDTYPE_INT)
                                 fixes = (lineColor, lineWidth, None))  
243    
244                      self.parent._SetClassification(self.clazz)                      self.parent._SetClassification(self.clazz)
245    
# Line 252  class ClassGenDialog(wxDialog): Line 248  class ClassGenDialog(wxDialog):
248                  list = genPanel.GetValueList()                  list = genPanel.GetValueList()
249    
250                  if len(list) > 0:                  if len(list) > 0:
251                      self.clazz = generate_singletons(list, ramp,                      self.clazz = generate_singletons(list, ramp)
                                      (lineColor, lineWidth, None))  
252                      self.parent._SetClassification(self.clazz)                      self.parent._SetClassification(self.clazz)
253    
254              elif genSel == GENCOMBOSTR_QUANTILES:              elif genSel == GENCOMBOSTR_QUANTILES:
# Line 265  class ClassGenDialog(wxDialog): Line 260  class ClassGenDialog(wxDialog):
260                  delta = 1 / float(numGroups)                  delta = 1 / float(numGroups)
261                  percents = [delta * i for i in range(1, numGroups + 1)]                  percents = [delta * i for i in range(1, numGroups + 1)]
262                  adjusted, self.clazz = \                  adjusted, self.clazz = \
263                      generate_quantiles(_list, percents, ramp, _range,                      generate_quantiles(_list, percents, ramp, _range)
                                        (lineColor, lineWidth, None))  
264    
265                  if adjusted:                  if adjusted:
266                      dlg = wxMessageDialog(self,                      dlg = wxMessageDialog(self,

Legend:
Removed from v.1391  
changed lines
  Added in v.1432

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26