/[thuban]/trunk/thuban/Thuban/UI/classifier.py
ViewVC logotype

Diff of /trunk/thuban/Thuban/UI/classifier.py

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

revision 2551 by jonathan, Thu Jan 27 14:19:41 2005 UTC revision 2597 by bh, Thu Apr 7 19:46:29 2005 UTC
# Line 1  Line 1 
1  # Copyright (c) 2003-2004 by Intevation GmbH  # Copyright (c) 2003-2005 by Intevation GmbH
2  # Authors:  # Authors:
3  # Jan-Oliver Wagner <[email protected]> (2003-2004)  # Jan-Oliver Wagner <[email protected]> (2003-2004)
4  # Martin Schulze <[email protected]> (2004)  # Martin Schulze <[email protected]> (2004)
# Line 44  from Thuban.UI.colordialog import ColorD Line 44  from Thuban.UI.colordialog import ColorD
44  from Thuban.UI.layerproperties import LayerProperties  from Thuban.UI.layerproperties import LayerProperties
45  from messages import MAP_REPLACED  from messages import MAP_REPLACED
46    
 ID_CLASS_TABLE = 40011  
   
47    
48  # table columns  # table columns
49  COL_VISIBLE = 0  COL_VISIBLE = 0
# Line 75  class ClassGrid(wxGrid): Line 73  class ClassGrid(wxGrid):
73          clazz -- the working classification that this grid should          clazz -- the working classification that this grid should
74                   use for display.                   use for display.
75          """          """
76            wxGrid.__init__(self, parent, -1, style = 0)
         wxGrid.__init__(self, parent, ID_CLASS_TABLE, style = 0)  
77    
78          self.classifier = classifier          self.classifier = classifier
79    
# Line 161  class ClassGrid(wxGrid): Line 158  class ClassGrid(wxGrid):
158              group = self.GetTable().GetClassGroup(sel[0])              group = self.GetTable().GetClassGroup(sel[0])
159              if isinstance(group, ClassGroupDefault):              if isinstance(group, ClassGroupDefault):
160                  wxMessageDialog(self,                  wxMessageDialog(self,
161                                  "The Default group cannot be removed.",                                  _("The Default group cannot be removed."),
162                                  style = wxOK | wxICON_EXCLAMATION).ShowModal()                                  style = wxOK | wxICON_EXCLAMATION).ShowModal()
163                  return                  return
164                    
# Line 790  class Classifier(LayerProperties): Line 787  class Classifier(LayerProperties):
787              controlButtonBox.Add(button_moveup, 0, wxGROW|wxALL, 4)              controlButtonBox.Add(button_moveup, 0, wxGROW|wxALL, 4)
788              controlButtonBox.Add(button_movedown, 0, wxGROW|wxALL, 4)              controlButtonBox.Add(button_movedown, 0, wxGROW|wxALL, 4)
789              controlButtonBox.Add(button_edit, 0, wxGROW|wxALL, 4)              controlButtonBox.Add(button_edit, 0, wxGROW|wxALL, 4)
790              controlButtonBox.Add(60, 20, 0, wxGROW|wxALL|wxALIGN_BOTTOM, 4)              controlButtonBox.Add( (60, 20), 0, wxGROW|wxALL|wxALIGN_BOTTOM, 4)
791              controlButtonBox.Add(button_remove, 0,              controlButtonBox.Add(button_remove, 0,
792                                   wxGROW|wxALL|wxALIGN_BOTTOM, 4)                                   wxGROW|wxALL|wxALIGN_BOTTOM, 4)
793    
# Line 1407  class ClassRenderer(wxPyGridCellRenderer Line 1404  class ClassRenderer(wxPyGridCellRenderer
1404          dc.DestroyClippingRegion()          dc.DestroyClippingRegion()
1405    
1406    
1407  class ClassGroupPropertiesCtrl(wxWindow, wxControl):  class ClassGroupPropertiesCtrl(wxControl):
1408      """A custom window and control that draw a preview of group properties      """A custom window and control that draw a preview of group properties
1409      and can open a dialog to modify the properties if the user double-clicks      and can open a dialog to modify the properties if the user double-clicks
1410      it.      it.
# Line 1415  class ClassGroupPropertiesCtrl(wxWindow, Line 1412  class ClassGroupPropertiesCtrl(wxWindow,
1412    
1413      def __init__(self, parent, id, props, shapeType,      def __init__(self, parent, id, props, shapeType,
1414                   size = wxDefaultSize, style = 0):                   size = wxDefaultSize, style = 0):
1415            wxControl.__init__(self, parent, id, size = size, style = style)
         wxWindow.__init__(self, parent, id, size = size, style = style)  
1416    
1417          self.parent = parent          self.parent = parent
1418    

Legend:
Removed from v.2551  
changed lines
  Added in v.2597

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26