Example usage for org.eclipse.jface.action MenuManager setMenuText

List of usage examples for org.eclipse.jface.action MenuManager setMenuText

Introduction

In this page you can find the example usage for org.eclipse.jface.action MenuManager setMenuText.

Prototype

public void setMenuText(String menuText) 

Source Link

Usage

From source file:ummisco.gama.ui.views.displays.LayeredDisplayDecorator.java

private MenuManager presentationMenu() {
    final MenuManager mm = new MenuManager();

    mm.setMenuText("Presentation");
    mm.setImageDescriptor(GamaIcons.create("display.sidebar2").descriptor());
    mm.add(toggleSideControls.toAction());
    mm.add(toggleOverlay.toAction());//from  w  w w .  ja va 2  s  . co m
    mm.add(new Action("Toggle toolbar " + GamaKeyBindings.format(GamaKeyBindings.COMMAND, 'T'),
            GamaIcons.create("display.fullscreen.toolbar2").descriptor()) {

        @Override
        public boolean isEnabled() {
            return true;
        }

        @Override
        public void run() {
            toggleToolbar();
        }
    });
    return mm;
}