/[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 812 by jonathan, Mon May 5 15:04:06 2003 UTC revision 834 by bh, Tue May 6 15:52:36 2003 UTC
# Line 42  PROPCOMBOSTR_BLUE       = _("Blue Ramp") Line 42  PROPCOMBOSTR_BLUE       = _("Blue Ramp")
42  PROPCOMBOSTR_HOT2COLD   = _("Hot-to-Cold Ramp")  PROPCOMBOSTR_HOT2COLD   = _("Hot-to-Cold Ramp")
43    
44  class ClassGenDialog(wxDialog):  class ClassGenDialog(wxDialog):
45                                                                                    
46      def __init__(self, parent, layer, fieldName):      def __init__(self, parent, layer, fieldName):
47          """Inialize the class generating dialog.          """Inialize the class generating dialog.
48    
# Line 51  class ClassGenDialog(wxDialog): Line 51  class ClassGenDialog(wxDialog):
51    
52          wxDialog.__init__(self, parent, -1, _("Generate Classification"),          wxDialog.__init__(self, parent, -1, _("Generate Classification"),
53                            style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)                            style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
54                                                                                    
55          self.parent = parent          self.parent = parent
56          self.clazz = None          self.clazz = None
57    
58          self.type, name, width, prec = layer.table.field_info_by_name(fieldName)          col = layer.table.Column(fieldName)
59            self.type = col.type
60    
61          #############          #############
62          # we need to create genButton first because when we create the          # we need to create genButton first because when we create the
# Line 432  class GenUniformPanel(wxPanel): Line 433  class GenUniformPanel(wxPanel):
433    
434          if self.layer.table is not None:          if self.layer.table is not None:
435              wxBeginBusyCursor()              wxBeginBusyCursor()
436              range = self.layer.table.field_range(self.fieldName)              min, max = self.layer.table.ValueRange(self.fieldName)
437              self.minCtrl.SetValue(str(range[0][0]))              self.minCtrl.SetValue(str(min))
438              self.maxCtrl.SetValue(str(range[1][0]))              self.maxCtrl.SetValue(str(max))
439              wxEndBusyCursor()              wxEndBusyCursor()
440    
441      def __GetValidatedTypeEntry(self, win, value, type, badValue = None):      def __GetValidatedTypeEntry(self, win, value, type, badValue = None):
# Line 639  class GenUniquePanel(wxPanel): Line 640  class GenUniquePanel(wxPanel):
640          self.list_avail.DeleteAllItems()          self.list_avail.DeleteAllItems()
641          self.list_avail_data = []          self.list_avail_data = []
642    
643          list = self.layer.table.GetUniqueValues(self.fieldName)          list = self.layer.table.UniqueValues(self.fieldName)
644          index = 0          index = 0
645          for v in list:          for v in list:
646              self.dataList.append(v)              self.dataList.append(v)

Legend:
Removed from v.812  
changed lines
  Added in v.834

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26