Adds the toolbar to the browser window.<p>
974545
protected void installToolbar() {

        ClickHandler clickHandler = new ClickHandler() {

            /**
             * @see com.google.gwt.event.dom.client.ClickHandler#onClick(com.google.gwt.event.dom.client.ClickEvent)
             */
            public void onClick(ClickEvent event) {

                I_CmsToolbarButton source = (I_CmsToolbarButton)event.getSource();
                source.onToolbarClick();
                if (source instanceof CmsPushButton) {
                    ((CmsPushButton)source).clearHoverState();
                }
            }
        };
        m_toolbar = new CmsToolbar();
        RootPanel root = RootPanel.get();
        m_toolbarVisibility = new CmsStyleVariable(m_toolbar);
        root.add(m_toolbar);
        boolean initiallyVisible = CmsCoreProvider.get().isToolbarVisible();
        if (initiallyVisible) {
            m_toolbarVisibility.setValue(I_CmsLayoutBundle.INSTANCE.toolbarCss().simpleToolbarShow());
        } else {
            m_toolbarVisibility.setValue(I_CmsLayoutBundle.INSTANCE.toolbarCss().toolbarHide());
        }

        CmsDirectEditToolbarHandler handler = new CmsDirectEditToolbarHandler(this);

        CmsToolbarPublishButton publish = new CmsToolbarPublishButton(handler);
        publish.addClickHandler(clickHandler);
        m_toolbar.addLeft(publish);

        CmsToolbarSelectionButton selection = new CmsToolbarSelectionButton(handler);
        selection.setActive(initiallyVisible);
        selection.addClickHandler(clickHandler);
        m_toolbar.addLeft(selection);
        CmsToolbarContextButton contextMenuButton = new CmsToolbarContextButton(handler);
        contextMenuButton.setMenuContext(AdeContext.editprovider);
        contextMenuButton.addClickHandler(clickHandler);
        m_toolbar.addRight(contextMenuButton);
        handler.setContextMenuButton(contextMenuButton);

    }
1345565
private void addHoverHandlers(FocusPanel panel) {

        final CmsStyleVariable hoverVar = new CmsStyleVariable(panel);
        hoverVar.setValue(I_CmsLayoutBundle.INSTANCE.globalWidgetCss().openerNoHover());
        panel.addMouseOverHandler(new MouseOverHandler() {

            /**
             * @see com.google.gwt.event.dom.client.MouseOverHandler#onMouseOver(com.google.gwt.event.dom.client.MouseOverEvent)
             */
            public void onMouseOver(MouseOverEvent event) {

                hoverVar.setValue(I_CmsLayoutBundle.INSTANCE.globalWidgetCss().openerHover());
            }
        });

        panel.addMouseOutHandler(new MouseOutHandler() {

            /**
             * @see com.google.gwt.event.dom.client.MouseOutHandler#onMouseOut(com.google.gwt.event.dom.client.MouseOutEvent)
             */
            public void onMouseOut(MouseOutEvent event) {

                hoverVar.setValue(I_CmsLayoutBundle.INSTANCE.globalWidgetCss().openerNoHover());
            }
        });

    }
989693
public void addToolbarButtons(ToolScreen toolScreen)
    {
        super.addToolbarButtons(toolScreen);
        ResourceBundle resources = ((BaseApplication)this.getTask().getApplication()).getResources(ResourceConstants.PROGRAM_RESOURCE, true);
        new SCannedBox(toolScreen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), toolScreen, null, ScreenConstants.DEFAULT_DISPLAY, null, resources.getString(ClassProject.CLASS_DETAIL_SCREEN), MenuConstants.DISTRIBUTION, ClassProject.CLASS_DETAIL_SCREEN, resources.getString(ClassProject.CLASS_DETAIL_SCREEN));
        new SCannedBox(toolScreen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), toolScreen, null, ScreenConstants.DEFAULT_DISPLAY, null, resources.getString(ClassProject.RESOURCE_DETAIL_SCREEN), MenuConstants.GROUP, ClassProject.RESOURCE_DETAIL_SCREEN, resources.getString(ClassProject.RESOURCE_DETAIL_SCREEN));
        
        String job = Utility.addURLParam(null, DBParams.PROCESS, org.jbundle.app.program.script.process.SetupProjectProcess.class.getName());
        job = Utility.addURLParam(job, DBParams.TASK, ProcessRunnerTask.class.getName()); // Screen class
        new SCannedBox(toolScreen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), toolScreen, null, ScreenConstants.DEFAULT_DISPLAY, null, "Create maven projects", MenuConstants.RUN, job, null);
    }
1339026
public void contributeToToolBar(IToolBarManager tbm) {
		if (fInViewMenu)
			return;
		for (int i= 0; i < fFilterActions.length; i++) {
			tbm.add(fFilterActions[i]);
		}
	}
380813
private void initToolBar() {
        toolbar = new JToolBar();
        
        toolbar.add(new Button(firstPageAction));
        toolbar.add(new Button(pageUpAction));
        toolbar.add(new Button(pageDownAction));
        toolbar.add(new Button(lastPageAction));
        
        toolbar.addSeparator();
        toolbar.add(pageSizeLabel);
        toolbar.add(pageSizeField);
        pageSizeField.setText(Integer.toString(getPageSize()));
        pageSizeField.setHorizontalAlignment(JTextField.RIGHT);
        pageSizeField.setAction(pageSizeAction);
        pageSizeField.setMaximumSize(pageSizeField.getPreferredSize());
        
        toolbar.addSeparator();
        totalRowCountLabel.setText(String.format(totalRowCountLabelFormat, getRealRowCount()));
        toolbar.add(totalRowCountLabel);
        
        toolbar.add(pageField);
        pageField.setText(Integer.toString(getPage() + 1));
        pageField.setHorizontalAlignment(JTextField.RIGHT);
        pageField.setAction(gotoPageAction);
        pageField.setMaximumSize(pageField.getPreferredSize());
        
        pageCountLabel.setText(String.format(pageCountLabelFormat, getPageCount()));
        toolbar.add(pageCountLabel);
        
        setActionEnabled();
        
        TableModelListener listener = new TableModelListener() {
            @Override
            public void tableChanged(TableModelEvent tme) {
                if (tme.getType() == TableModelEvent.INSERT || tme.getType() == TableModelEvent.DELETE) {
                    if (getPage() >= getPageCount()) {
                        setPage(getPageCount() - 1);
                    }

                    totalRowCountLabel.setText(String.format(totalRowCountLabelFormat, getRealRowCount()));
                    pageField.setText(Integer.toString(getPage() + 1));
                    pageCountLabel.setText(String.format(pageCountLabelFormat, getPageCount()));
                }
            }
        };
        
        addTableModelListener(listener);
    }
1052526
@Override
    public void setSupportActionBar(@Nullable Toolbar toolbar) {
        if (toolbar != null) {
            if (toolbar != mDefaultToolbar && mDefaultToolbar.getVisibility() != View.GONE) {
                mDefaultToolbar.setVisibility(View.GONE);
            }

            super.setSupportActionBar(toolbar);

            mDrawerToggle = new ActionBarDrawerToggle(this, mDrawer, toolbar, R.string.md_content_description_drawer_open, R.string.md_content_description_drawer_close) {
                public void onDrawerClosed(View view) {
                    invalidateOptionsMenu();
                }

                public void onDrawerOpened(View drawerView) {
                    invalidateOptionsMenu();
                }
            };
            mDrawerToggle.syncState();
            mDrawer.addDrawerListener(mDrawerToggle);

            mDrawer.setOnItemClickListener(new DrawerItem.OnItemClickListener() {
                @Override
                public void onClick(DrawerItem item, long id, int position) {
                    if (item instanceof DrawerFragmentItem && ((DrawerFragmentItem) item).hasFragment()) {
                        switchFragment(((DrawerFragmentItem) item).getFragment());
                    }
                    if (item.hasOnItemClickListener()) {
                        item.getOnItemClickListener().onClick(item, id, position);
                    } else {
                        if (hasOnItemClickListener()) {
                            mOnItemClickListener.onClick(item, id, position);
                        }
                    }
                }
            });
            mDrawer.setOnFixedItemClickListener(new DrawerItem.OnItemClickListener() {
                @Override
                public void onClick(DrawerItem item, long id, int position) {
                    if (item instanceof DrawerFragmentItem && ((DrawerFragmentItem) item).hasFragment()) {
                        switchFragment(((DrawerFragmentItem) item).getFragment());
                    }
                    if (item.hasOnItemClickListener()) {
                        item.getOnItemClickListener().onClick(item, id, position);
                    } else {
                        if (hasOnItemClickListener()) {
                            mOnFixedItemClickListener.onClick(item, id, position);
                        }
                    }
                }
            });
        }
    }
470553
protected function _addToolbars(KControllerContextInterface $context)
    {
        if($this->getView() instanceof KViewHtml)
        {
            // Add toolbars on authenticated requests only.
            if($this->getObject('user')->isAuthentic())
            {
                foreach($context->toolbars as $toolbar) {
                    $this->addToolbar($toolbar);
                }
            }

            $this->getView()->getTemplate()->addFilter('toolbar', array('toolbars' => $this->getToolbars()));
        }
    }
266628
public void addToolbarButtons(ToolScreen toolScreen)
    {
        super.addToolbarButtons(toolScreen);
        new SCannedBox(toolScreen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), toolScreen, null, ScreenConstants.DEFAULT_DISPLAY, null, ProjectTask.PROJECT_PREDECESSOR_DETAIL_SCREEN, MenuConstants.FORMDETAIL, ProjectTask.PROJECT_PREDECESSOR_DETAIL_SCREEN, ProjectTask.PROJECT_PREDECESSOR_DETAIL_SCREEN);
        new SCannedBox(toolScreen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), toolScreen, null, ScreenConstants.DEFAULT_DISPLAY, null, ProjectTask.PROJECT_TASK_CALENDAR_SCREEN, JCalendarPopup.CALENDAR_ICON, ProjectTask.PROJECT_TASK_CALENDAR_SCREEN, ProjectTask.PROJECT_TASK_CALENDAR_SCREEN);
    }
1283672
public void addToolbarButtons(ToolScreen toolScreen)
    {
        new SCannedBox(toolScreen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), toolScreen, null, ScreenConstants.DEFAULT_DISPLAY, null, MenuConstants.FORMDETAIL, MenuConstants.FORMDETAIL, MenuConstants.FORMDETAIL, null);
        new SCannedBox(toolScreen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), toolScreen, null, ScreenConstants.DEFAULT_DISPLAY, null, MenuConstants.PRINT, MenuConstants.PRINT, MenuConstants.PRINT, null);
    }
1078293
private void addMainPanelHoverHandlers(Panel panel) {

        final CmsStyleVariable hoverPanel = new CmsStyleVariable(panel);
        hoverPanel.setValue(I_CmsLayoutBundle.INSTANCE.globalWidgetCss().openerNoHover());
        panel.addDomHandler(new MouseOverHandler() {

            public void onMouseOver(MouseOverEvent event) {

                hoverPanel.setValue(I_CmsLayoutBundle.INSTANCE.globalWidgetCss().openerHover());

            }
        }, MouseOverEvent.getType());
        panel.addDomHandler(new MouseOutHandler() {

            public void onMouseOut(MouseOutEvent event) {

                hoverPanel.setValue(I_CmsLayoutBundle.INSTANCE.globalWidgetCss().openerNoHover());

            }
        }, MouseOutEvent.getType());
    }
1363328
public ToolScreen addToolbars()
    {
        ToolScreen screen = new ToolScreen(null, this, null, ScreenConstants.DONT_DISPLAY_FIELD_DESC, null);
        new SCannedBox(screen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), screen, null, ScreenConstants.DEFAULT_DISPLAY, MenuConstants.SUBMIT);
        new SCannedBox(screen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), screen, null, ScreenConstants.DEFAULT_DISPLAY, MenuConstants.RESET);
        String strDesc = "Create account";
        new SCannedBox(screen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), screen, null, ScreenConstants.DEFAULT_DISPLAY, null, strDesc, MenuConstants.FORM, MenuConstants.FORM, MenuConstants.FORM + "Tip");
        return screen;
    }
732474
function initToolbar() {
        $('header').mouseover(function () {
            $('#toolbar').slideDown('fast');
        });
        $editbox.click(function () {
            window.setTimeout(function () {
                $('#toolbar').slideUp('fast');
            }, 500);
        });
        $preview.click(function () {
            window.setTimeout(function () {
                $('#toolbar').slideUp('fast');
            }, 500);
        });
    }
883521
public void actionToggleElement() {

        // get the necessary parameters to add/remove the element
        int index = 0;
        try {
            index = Integer.parseInt(getParamElementIndex());
        } catch (Exception e) {
            // ignore, should not happen
        }
        String name = getParamElementName();
        // get the base parameter definition
        CmsWidgetDialogParameter base = getParameterDefinition(name);
        if (base != null) {
            // the requested parameter is valid for this dialog
            List<CmsWidgetDialogParameter> params = getParameters().get(name);
            if (getAction() == ACTION_ELEMENT_REMOVE) {
                // remove the value
                params.remove(index);
            } else {
                List<CmsWidgetDialogParameter> sequence = getParameters().get(base.getName());
                if (sequence.size() > 0) {
                    // add the new value after the clicked element
                    index = index + 1;
                }
                CmsWidgetDialogParameter newParam = new CmsWidgetDialogParameter(base, index);
                params.add(index, newParam);
            }
            // reset all index value in the parameter list
            for (int i = 0; i < params.size(); i++) {
                CmsWidgetDialogParameter param = params.get(i);
                param.setindex(i);
            }
        }
    }
1051133
function () {
        var self = this;

        self.items().each(function (ctrl) {
          ctrl.classes.add('toolbar-item');
        });

        return self._super();
      }
77399
private void addToolbars() {

        m_revertButton = CmsToolBar.createButton(
            FontOpenCms.REDO,
            CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_GROUPS_TOGGLE_0));
        m_revertButton.addClickListener(new ClickListener() {

            private static final long serialVersionUID = 8265075332953321274L;

            public void buttonClick(ClickEvent event) {

                toggleTable();

            }

        });
        if (m_stateBean.isReverse()) {
            CmsVaadinUtils.toggleButton(m_revertButton);
        }
        m_uiContext.addToolbarButton(m_revertButton);
    }
115787
private void fillToolBar(final I_CmsAppUIContext context) {

        context.setAppTitle(m_messages.key(Messages.GUI_APP_TITLE_0));

        // create components
        Component publishBtn = createPublishButton();
        m_saveBtn = createSaveButton();
        m_saveExitBtn = createSaveExitButton();
        Component closeBtn = createCloseButton();

        context.enableDefaultToolbarButtons(false);
        context.addToolbarButtonRight(closeBtn);
        context.addToolbarButton(publishBtn);
        context.addToolbarButton(m_saveExitBtn);
        context.addToolbarButton(m_saveBtn);

        Component addDescriptorBtn = createAddDescriptorButton();
        if (m_model.hasDescriptor() || m_model.getBundleType().equals(BundleType.DESCRIPTOR)) {
            addDescriptorBtn.setEnabled(false);
        }
        context.addToolbarButton(addDescriptorBtn);
        if (m_model.getBundleType().equals(BundleType.XML)) {
            Component convertToPropertyBundleBtn = createConvertToPropertyBundleButton();
            context.addToolbarButton(convertToPropertyBundleBtn);
        }
    }
407429
protected JComponent createViewToolBar() {
    	if(getPageComponent() instanceof AbstractEditor){
    		AbstractEditor editor = (AbstractEditor)getPageComponent();
            return editor.getEditorToolBar();
    	}
    	return null;
    }