public void setProjectStateEnabled(boolean enabled){
        //Enabled tool bar, except new and open project
        for(int i=2; i<mainToolBar.getComponentCount(); i++){
            if(!(mainToolBar.getComponent(i) instanceof JToolBar.Separator)){
                mainToolBar.getComponent(i).setEnabled(enabled);
            }
        }
        
        //Enabled file menu, except new, open project and exit
        for(int i=2; i<fileMenu.getMenuComponentCount()-1; i++){
            if(!(fileMenu.getMenuComponent(i) instanceof JPopupMenu.Separator)){
                fileMenu.getMenuComponent(i).setEnabled(enabled);
            }
        }
        
        //Enabled all the other menu in the mainMenuBar
        for(int i=1; i<mainMenuBar.getComponentCount(); i++){
            JMenu menu = (JMenu) mainMenuBar.getComponent(i);
            for(Component comp : menu.getMenuComponents()){
                if(!(comp instanceof JPopupMenu.Separator)){
                    comp.setEnabled(enabled);
                }
            }
        }
        
        //Show or not the middle panel (map editor, map tree, etc...)
        middlePanel.setVisible(enabled);
    }