def __init__( self, aModelEditor, aRoot = 'top_frame' ):
     """
     in: ModelEditor theModelEditor
     returns nothing
     """
     ListWindow.__init__( self, aModelEditor, aRoot )
     self.initUI()
 def deleted( self, *args ):
     ListWindow.deleted( self, *args )
     self.theClassList.close()
     self.theClassPropertyList.close()
     self.theModelEditor.theClassEditor = None
     self.theModelEditor.theMainWindow.update()
     return True
 def deleted( self, *arg ):
     ListWindow.deleted( self, *arg )
     self.theSystemTree.close()
     self.theEntityList.close()
     self.theEntityEditorList.close()
     self.theModelEditor.theEntityListWindowList.remove( self )
     self.theModelEditor.updateWindows()
     return True
    def __init__( self, aModelEditor ):
        """
        in: ModelEditor aModelEditor
        returns nothing
        """
        ListWindow.__init__( self, aModelEditor )

        self.noOfStepper = 0
        self.noOfEntity = 0
        self.noOfClass = 0
        self.lockTabs = False
        self.lockEntry = False
        #self.noOfPathway = 0
        self.theModelEditor = aModelEditor
        self.theRuntimeObject = self.theModelEditor.theRuntimeObject
        self.initUI()
 def initUI( self ):
     """
     in: nothing
     returns nothing
     """
     # superclass initUI
     ListWindow.initUI( self )
     # create systree, processlist, propertylist
     self.theSystemTree = SystemTree( self, self['SystemTreeFrame'] )
     self.theEntityType = self.__getEntityType()
     self.theEntityList = EntityList( self, self['EntityListFrame'], self.theEntityType )
     self.theEntityEditorList = EntityEditor( self, self['EntityEditorFrame'], self.theEntityType )
     # add signal handlers
     self.addHandlers(
         {
             'on_variable1_activate': self.__entitychooser_changed,
             'on_process1_activate': self.__entitychooser_changed
             }
         )
     self.theEntityList.changeDisplayedType( self.theEntityType )
     self.selectEntity( [ME_ROOTID] )
     self.update()
    def initUI( self ):
        """
        in: nothing
        returns nothing
        """
        # superclass openwindow
        ListWindow.initUI( self )

        # add stepperlist
        self.theClassList = ClassList( self, self['ClassListFrame'] )

        # add stepperpropertylist
        self.theClassPropertyList = ClassEditor( self, self['ClassPropertyFrame'] )

        # add signal handlers
        # self.addHandlers({  })
        self.theClassList.update()
        classList = self.theModelEditor.getModel().getStepperList()
        if len(classList) == 0:
            aClassList = []
        else:
            aClassList = [ classList[0] ]
        self.selectStepper( aClassList )
 def initUI( self ):
     """
     in: nothing
     returns nothing
     """
     # superclass openwindow
     ListWindow.initUI( self )
     self['ObjectWindow'].remove_page(0 )
     # add signal handlers
     
     self.addHandlers({ 
         
         'on_new_menu_activate' : self.__new_menu_clicked,\
         
         'load_model_menu_activate' : self.__load_menu_clicked,\
         'save_model_menu_activate' : self.__save_menu_clicked,\
         'on_save_model_as_activate' : self.__save_as_menu_clicked,\
         'on_validate_model_activate' : self.__validate_menu_clicked,\
         'on_import_menu_activate' : self.__import_menu_clicked,\
         'exit_menu_activate' : self.__quit_menu_clicked,\
         'on_undo_activate' : self.__undo_activated,\
         'on_redo_activate' : self.__redo_activated,\
         'stepper_window_activate' : self.__stepper_window_activated,\
         'entity_window_activate' : self.__entity_window_activated,\
         'on_pathway_editor_activate' : self.__pathway_editor_activated,\
         'about_menu_activate' : self.__about_menu_clicked,\
         'on_autosave_preferences1_activate' : self.__autosave_window_activated,\
         'on_how-to_activate' : self.__guide_activated,\
         'on_manual_activate' : self.__manual_activated,\
         'on_new_button_clicked' : self.__new_menu_clicked,\
         'on_open_button_clicked' : self.__load_menu_clicked,\
         'on_save_button_clicked' : self.__save_menu_clicked,\
         'on_quit_button_clicked' : self.__quit_menu_clicked,\
         'on_redo_button_clicked' : self.__redo_activated,\
         'on_undo_button_clicked' : self.__undo_activated,\
         'on_start_button_clicked' : self.__start_activated,\
         'on_stop_button_clicked' : self.__stop_activated,\
         'on_step_button_clicked' : self.__step_activated,\
         'on_StepperButton_clicked' : self.__stepper_window_activated,\
         'on_EntityButton_clicked' : self.__entity_window_activated,\
         'on_PathwayButton_clicked' : self.__pathway_editor_activated,\
         'on_LayoutButton_clicked' : self.__layout_window_activated,\
         'on_About_button_clicked' : self.__about_menu_clicked,\
         'on_scrolledwindow1_expose_event' : self.__scrollwindow_exposed,\
         'on_layout_name_entry_changed': self.__on_combo_entry_changed,\
         'on_ClassButton_clicked': self.__class_window_activated,\
         'on_design_mode_clicked' : self.__design_mode_clicked,\
         #'on_layout_name_entry_activate' : self.__rename_layout,
         'on_layout_name_entry_editing_done' : self.__rename_layout,\
         'on_run_mode_clicked' : self.__run_mode_clicked
         })
     self.noModeToggle = False
     self.comboEntryHandlerID = self['layout_name_entry'].connect('changed', self.__on_combo_entry_changed )
     self['ObjectWindow'].connect ( "switch-page", self.__changeNotebookTab )
     self['MEMainWindow'].connect("delete-event", self.deleted)     
     # set up message textbox buffer
     self.theSmallWindow = self['handlebox24']
     self.theMessageBuffer = gtk.TextBuffer(None)
     self['textview1'].set_buffer(self.theMessageBuffer)
     self.theMessageWindow = self['scrolledwindow1']
     self.smallWindowAttachment = self.theMessageWindow
     endIter=self.theMessageBuffer.get_end_iter()
     self.endMark=self.theMessageBuffer.create_mark('EM',endIter,False)
     self.setIconList(
         os.path.join( config.glade_dir, "modeleditor.png" ),
         os.path.join( config.glade_dir, "modeleditor32.png" ) )
                          
     self['stop_button'].set_sensitive(False)                           
     self['entry5'].set_text(str(0.0))
     self['entry4'].set_text(str(1))
     
     # update 
     self.theStatusBar = self['statusbar']
     self.contextID = self.theStatusBar.get_context_id( "ME" )
     self.update()