/[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 935 by jonathan, Tue May 20 15:24:17 2003 UTC revision 1058 by frank, Tue May 27 11:30:29 2003 UTC
# Line 33  from Thuban.Model.layer import Layer, Ra Line 33  from Thuban.Model.layer import Layer, Ra
33    
34  from Thuban.UI.classgen import ClassGenDialog, ClassGenerator  from Thuban.UI.classgen import ClassGenDialog, ClassGenerator
35    
36  from dialogs import NonModalDialog  from dialogs import NonModalNonParentDialog
37    
38  ID_CLASS_TABLE = 40011  ID_CLASS_TABLE = 40011
39    
# Line 670  EB_LAYER_TITLE = 0 Line 670  EB_LAYER_TITLE = 0
670  EB_SELECT_FIELD = 1  EB_SELECT_FIELD = 1
671  EB_GEN_CLASS = 2  EB_GEN_CLASS = 2
672    
673  class Classifier(NonModalDialog):  class Classifier(NonModalNonParentDialog):
674    
675      type2string = {None:             _("None"),      type2string = {None:             _("None"),
676                     FIELDTYPE_STRING: _("Text"),                     FIELDTYPE_STRING: _("Text"),
# Line 678  class Classifier(NonModalDialog): Line 678  class Classifier(NonModalDialog):
678                     FIELDTYPE_DOUBLE: _("Decimal")}                     FIELDTYPE_DOUBLE: _("Decimal")}
679    
680      def __init__(self, parent, name, layer, group = None):      def __init__(self, parent, name, layer, group = None):
681          NonModalDialog.__init__(self, parent, name, "")          NonModalNonParentDialog.__init__(self, parent, name, "")
682    
683          self.__SetTitle(layer.Title())          self.__SetTitle(layer.Title())
684    
# Line 749  class Classifier(NonModalDialog): Line 749  class Classifier(NonModalDialog):
749              self.fields.SetSelection(self.__cur_field)              self.fields.SetSelection(self.__cur_field)
750              self.__SelectField(self.__cur_field, group = group)              self.__SelectField(self.__cur_field, group = group)
751    
752          button_try = wxButton(panel, ID_PROPERTY_TRY, _("Try"))          button_try = wxButton(self, ID_PROPERTY_TRY, _("Try"))
753          button_revert = wxButton(panel, ID_PROPERTY_REVERT, _("Revert"))          button_revert = wxButton(self, ID_PROPERTY_REVERT, _("Revert"))
754          button_ok = wxButton(panel, wxID_OK, _("OK"))          button_ok = wxButton(self, wxID_OK, _("OK"))
755          button_ok.SetDefault()          button_ok.SetDefault()
756          button_close = wxButton(panel, wxID_CANCEL, _("Close"))          button_close = wxButton(self, wxID_CANCEL, _("Close"))
757    
758          ############################          ############################
759          # Layout the controls          # Layout the controls
# Line 813  class Classifier(NonModalDialog): Line 813  class Classifier(NonModalDialog):
813    
814    
815          buttonBox = wxBoxSizer(wxHORIZONTAL)          buttonBox = wxBoxSizer(wxHORIZONTAL)
816          buttonBox.Add(button_try, 0, wxALL, 4)          buttonBox.Add(button_try, 0, wxRIGHT|wxEXPAND, 10)
817          buttonBox.Add(60, 20, 0, wxALL, 4)          buttonBox.Add(button_revert, 0, wxRIGHT|wxEXPAND, 10)
818          buttonBox.Add(button_revert, 0, wxALL, 4)          buttonBox.Add(button_ok, 0, wxRIGHT|wxEXPAND, 10)
819          buttonBox.Add(60, 20, 0, wxALL, 4)          buttonBox.Add(button_close, 0, wxRIGHT|wxEXPAND, 10)
         buttonBox.Add(button_ok, 0, wxALL, 4)  
         buttonBox.Add(60, 20, 0, wxALL, 4)  
         buttonBox.Add(button_close, 0, wxALL, 4)  
         panelBox.Add(buttonBox, 0,  
             wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_BOTTOM, 0)  
820    
821          panel.SetAutoLayout(True)          panel.SetAutoLayout(True)
822          panel.SetSizer(panelBox)          panel.SetSizer(panelBox)
# Line 829  class Classifier(NonModalDialog): Line 824  class Classifier(NonModalDialog):
824          panelBox.SetSizeHints(panel)          panelBox.SetSizeHints(panel)
825    
826          topBox.Add(panel, 1, wxGROW | wxALL, 4)          topBox.Add(panel, 1, wxGROW | wxALL, 4)
827            topBox.Add(buttonBox, 0, wxALIGN_RIGHT|wxBOTTOM|wxTOP, 10)
828    
829          self.SetAutoLayout(True)          self.SetAutoLayout(True)
830          self.SetSizer(topBox)          self.SetSizer(topBox)
# Line 993  class Classifier(NonModalDialog): Line 989  class Classifier(NonModalDialog):
989          self.Close()          self.Close()
990    
991      def OnClose(self, event):      def OnClose(self, event):
992          NonModalDialog.OnClose(self, event)          NonModalNonParentDialog.OnClose(self, event)
993    
994      def _OnCloseBtn(self, event):      def _OnCloseBtn(self, event):
995          """Close is similar to Cancel except that any changes that were          """Close is similar to Cancel except that any changes that were
# Line 1180  class SelectPropertiesDialog(wxDialog): Line 1176  class SelectPropertiesDialog(wxDialog):
1176          buttonBox = wxBoxSizer(wxHORIZONTAL)          buttonBox = wxBoxSizer(wxHORIZONTAL)
1177          button_ok = wxButton(self, wxID_OK, _("OK"))          button_ok = wxButton(self, wxID_OK, _("OK"))
1178          button_ok.SetDefault()          button_ok.SetDefault()
1179          buttonBox.Add(button_ok, 0, wxALL, 4)          buttonBox.Add(button_ok, 0, wxRIGHT|wxEXPAND, 10)
1180          buttonBox.Add(wxButton(self, wxID_CANCEL, _("Cancel")),          buttonBox.Add(wxButton(self, wxID_CANCEL, _("Cancel")),
1181                        0, wxALL, 4)                        0, wxRIGHT|wxEXPAND, 10)
1182          topBox.Add(buttonBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_BOTTOM, 10)          topBox.Add(buttonBox, 0, wxALIGN_RIGHT|wxBOTTOM|wxTOP, 10)
1183                                                                                                                                                                    
1184          #EVT_BUTTON(self, wxID_OK, self._OnOK)          #EVT_BUTTON(self, wxID_OK, self._OnOK)
1185          #EVT_BUTTON(self, ID_SELPROP_CANCEL, self._OnCancel)          #EVT_BUTTON(self, ID_SELPROP_CANCEL, self._OnCancel)

Legend:
Removed from v.935  
changed lines
  Added in v.1058

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26