public void setEditorMode(EditorMode editorMode) {

        if (editorMode != m_editorMode) {
            EditorMode oldEditorMode = m_editorMode;
            m_editorMode = editorMode;
            m_controller.setEditorModeInSession(m_editorMode);
            if (oldEditorMode == EditorMode.compareLocales) {
                // reload sitemap editor because we may need to move to a different site
                reloadForLocaleCompareRoot(m_editorMode);
                return;
            }
            switch (m_editorMode) {
                case galleries:
                    m_tree.getElement().getStyle().setDisplay(Display.NONE);
                    setGalleriesVisible(true);
                    m_toolbar.setNewGalleryEnabled(false, "");
                    setCategoriesVisible(false);
                    setModelPagesVisible(false);
                    setHeaderVisible(true);
                    m_localeComparison.setVisible(false);
                    m_toolbar.setClipboardEnabled(false, Messages.get().key(Messages.GUI_TOOLBAR_CLIPBOARD_DISABLE_0));
                    getController().loadGalleries();
                    break;
                case navigation:
                    m_tree.getElement().getStyle().clearDisplay();
                    setGalleriesVisible(false);
                    setModelPagesVisible(false);
                    setCategoriesVisible(false);
                    setHeaderVisible(true);
                    m_localeComparison.setVisible(false);
                    m_toolbar.setNewEnabled(true, null);

                    m_inNavigationStyle.setValue(I_CmsSitemapLayoutBundle.INSTANCE.sitemapItemCss().navMode());
                    break;
                case vfs:
                    m_tree.getElement().getStyle().clearDisplay();
                    setGalleriesVisible(false);
                    setCategoriesVisible(false);
                    setHeaderVisible(true);
                    m_localeComparison.setVisible(false);
                    m_toolbar.setNewEnabled(false, Messages.get().key(Messages.GUI_TOOLBAR_NEW_DISABLE_0));
                    m_toolbar.setClipboardEnabled(true, null);
                    m_inNavigationStyle.setValue(I_CmsSitemapLayoutBundle.INSTANCE.sitemapItemCss().vfsMode());
                    setModelPagesVisible(false);
                    break;
                case modelpages:
                    m_tree.getElement().getStyle().setDisplay(Display.NONE);
                    setGalleriesVisible(false);
                    setCategoriesVisible(false);
                    setModelPagesVisible(true);
                    setHeaderVisible(true);
                    m_localeComparison.setVisible(false);
                    m_toolbar.setNewEnabled(false, Messages.get().key(Messages.GUI_TOOLBAR_NEW_DISABLE_0));
                    m_toolbar.setClipboardEnabled(false, Messages.get().key(Messages.GUI_TOOLBAR_CLIPBOARD_DISABLE_0));
                    getController().loadModelPages();

                    break;
                case categories:
                    m_tree.getElement().getStyle().setDisplay(Display.NONE);
                    setGalleriesVisible(false);
                    setModelPagesVisible(false);
                    setCategoriesVisible(true);
                    setHeaderVisible(true);
                    m_localeComparison.setVisible(false);
                    m_toolbar.setNewEnabled(false, Messages.get().key(Messages.GUI_TOOLBAR_NEW_DISABLE_0));
                    m_toolbar.setClipboardEnabled(false, Messages.get().key(Messages.GUI_TOOLBAR_CLIPBOARD_DISABLE_0));
                    getController().loadCategories(false, null);
                    break;
                case compareLocales:
                    m_tree.getElement().getStyle().setDisplay(Display.NONE);
                    setGalleriesVisible(false);
                    setModelPagesVisible(false);
                    setCategoriesVisible(false);
                    setHeaderVisible(false);
                    m_toolbar.setNewEnabled(false, Messages.get().key(Messages.GUI_TOOLBAR_NEW_DISABLE_0));
                    m_toolbar.setClipboardEnabled(false, Messages.get().key(Messages.GUI_TOOLBAR_CLIPBOARD_DISABLE_0));
                    m_localeComparison.setVisible(true);
                    m_controller.getData().getRoot().getId();
                    CmsJsUtil.callNamedFunctionWithString(
                        CmsGwtConstants.CALLBACK_REFRESH_LOCALE_COMPARISON,
                        "" + m_controller.getData().getRoot().getId());
                    break;

                default:

            }
            // check if the tree has been drawn yet
            getRootItem().updateEditorMode();
            m_toolbar.setMode(editorMode);
        }
    }
public void setEditorMode ( EditorMode editorMode ) { if ( editorMode != m_editorMode ) { EditorMode oldEditorMode = m_editorMode ; m_editorMode = editorMode ; m_controller . setEditorModeInSession ( m_editorMode ) ; if ( oldEditorMode == EditorMode . compareLocales ) { reloadForLocaleCompareRoot ( m_editorMode ) ; return ; } switch ( m_editorMode ) { case galleries : m_tree . getElement ( ) . getStyle ( ) . setDisplay ( Display . NONE ) ; setGalleriesVisible ( true ) ; m_toolbar . setNewGalleryEnabled ( false , "" ) ; setCategoriesVisible ( false ) ; setModelPagesVisible ( false ) ; setHeaderVisible ( true ) ; m_localeComparison . setVisible ( false ) ; m_toolbar . setClipboardEnabled ( false , Messages . get ( ) . key ( Messages . GUI_TOOLBAR_CLIPBOARD_DISABLE_0 ) ) ; getController ( ) . loadGalleries ( ) ; break ; case navigation : m_tree . getElement ( ) . getStyle ( ) . clearDisplay ( ) ; setGalleriesVisible ( false ) ; setModelPagesVisible ( false ) ; setCategoriesVisible ( false ) ; setHeaderVisible ( true ) ; m_localeComparison . setVisible ( false ) ; m_toolbar . setNewEnabled ( true , null ) ; m_inNavigationStyle . setValue ( I_CmsSitemapLayoutBundle . INSTANCE . sitemapItemCss ( ) . navMode ( ) ) ; break ; case vfs : m_tree . getElement ( ) . getStyle ( ) . clearDisplay ( ) ; setGalleriesVisible ( false ) ; setCategoriesVisible ( false ) ; setHeaderVisible ( true ) ; m_localeComparison . setVisible ( false ) ; m_toolbar . setNewEnabled ( false , Messages . get ( ) . key ( Messages . GUI_TOOLBAR_NEW_DISABLE_0 ) ) ; m_toolbar . setClipboardEnabled ( true , null ) ; m_inNavigationStyle . setValue ( I_CmsSitemapLayoutBundle . INSTANCE . sitemapItemCss ( ) . vfsMode ( ) ) ; setModelPagesVisible ( false ) ; break ; case modelpages : m_tree . getElement ( ) . getStyle ( ) . setDisplay ( Display . NONE ) ; setGalleriesVisible ( false ) ; setCategoriesVisible ( false ) ; setModelPagesVisible ( true ) ; setHeaderVisible ( true ) ; m_localeComparison . setVisible ( false ) ; m_toolbar . setNewEnabled ( false , Messages . get ( ) . key ( Messages . GUI_TOOLBAR_NEW_DISABLE_0 ) ) ; m_toolbar . setClipboardEnabled ( false , Messages . get ( ) . key ( Messages . GUI_TOOLBAR_CLIPBOARD_DISABLE_0 ) ) ; getController ( ) . loadModelPages ( ) ; break ; case categories : m_tree . getElement ( ) . getStyle ( ) . setDisplay ( Display . NONE ) ; setGalleriesVisible ( false ) ; setModelPagesVisible ( false ) ; setCategoriesVisible ( true ) ; setHeaderVisible ( true ) ; m_localeComparison . setVisible ( false ) ; m_toolbar . setNewEnabled ( false , Messages . get ( ) . key ( Messages . GUI_TOOLBAR_NEW_DISABLE_0 ) ) ; m_toolbar . setClipboardEnabled ( false , Messages . get ( ) . key ( Messages . GUI_TOOLBAR_CLIPBOARD_DISABLE_0 ) ) ; getController ( ) . loadCategories ( false , null ) ; break ; case compareLocales : m_tree . getElement ( ) . getStyle ( ) . setDisplay ( Display . NONE ) ; setGalleriesVisible ( false ) ; setModelPagesVisible ( false ) ; setCategoriesVisible ( false ) ; setHeaderVisible ( false ) ; m_toolbar . setNewEnabled ( false , Messages . get ( ) . key ( Messages . GUI_TOOLBAR_NEW_DISABLE_0 ) ) ; m_toolbar . setClipboardEnabled ( false , Messages . get ( ) . key ( Messages . GUI_TOOLBAR_CLIPBOARD_DISABLE_0 ) ) ; m_localeComparison . setVisible ( true ) ; m_controller . getData ( ) . getRoot ( ) . getId ( ) ; CmsJsUtil . callNamedFunctionWithString ( CmsGwtConstants . CALLBACK_REFRESH_LOCALE_COMPARISON , "" + m_controller . getData ( ) . getRoot ( ) . getId ( ) ) ; break ; default : } getRootItem ( ) . updateEditorMode ( ) ; m_toolbar . setMode ( editorMode ) ; } }
Sets the editor mode.<p>

@param editorMode the editor mode to set