Example usage for com.google.gwt.user.client.ui MenuBar setAnimationEnabled

List of usage examples for com.google.gwt.user.client.ui MenuBar setAnimationEnabled

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui MenuBar setAnimationEnabled.

Prototype

public void setAnimationEnabled(boolean enable) 

Source Link

Usage

From source file:org.drools.guvnor.client.explorer.DeploymentNewMenu.java

License:Apache License

public static MenuBar getMenu(final AbstractTree manager) {

    MenuBar createNewMenu = new MenuBar(true);

    createNewMenu.addItem(Util.getHeader(images.snapshotSmall(), constants.NewDeploymentSnapshot()), true,
            new Command() {
                public void execute() {
                    SnapshotView.showNewSnapshot(new Command() {
                        public void execute() {
                            //we have to refresh the whole tree when a snapshot was added to previously empty package.
                            manager.refreshTree();
                        }/*from w w  w  . j  a  v  a 2s.co m*/
                    });
                }
            });

    createNewMenu.addItem(Util.getHeader(images.refresh(), constants.RebuildAllSnapshotBinaries()), true,
            new Command() {
                public void execute() {
                    SnapshotView.rebuildBinaries();
                }
            });

    MenuBar rootMenuBar = new MenuBar(true);
    rootMenuBar.setAutoOpen(true);
    rootMenuBar.setAnimationEnabled(true);

    rootMenuBar.addItem(new MenuItem(constants.CreateNew(), createNewMenu));

    return rootMenuBar;
}

From source file:org.drools.guvnor.client.explorer.navigation.deployment.DeploymentNewMenu.java

License:Apache License

public static MenuBar getMenu(final NavigationItemBuilderOld manager) {

    MenuBar createNewMenu = new MenuBar(true);

    createNewMenu.addItem(Util.getHeader(DroolsGuvnorImageResources.INSTANCE.snapshotSmall(),
            Constants.INSTANCE.NewDeploymentSnapshot()).asString(), true, new Command() {
                public void execute() {
                    SnapshotView.showNewSnapshot(new Command() {
                        public void execute() {
                            //we have to refresh the whole tree when a snapshot was added to previously empty package.
                            manager.refreshTree();
                        }// w w w .  ja  v a 2 s  .c o m
                    });
                }
            });

    createNewMenu.addItem(Util.getHeader(DroolsGuvnorImageResources.INSTANCE.refresh(),
            Constants.INSTANCE.RebuildAllSnapshotBinaries()).asString(), true, new Command() {
                public void execute() {
                    SnapshotView.rebuildBinaries();
                }
            });

    MenuBar rootMenuBar = new MenuBar(true);
    rootMenuBar.setAutoOpen(true);
    rootMenuBar.setAnimationEnabled(true);

    rootMenuBar.addItem(new MenuItem(Constants.INSTANCE.CreateNew(), createNewMenu));

    return rootMenuBar;
}

From source file:org.drools.guvnor.client.explorer.PackagesNewMenu.java

License:Apache License

public static MenuBar getMenu(final AbstractTree manager) {

    MenuBar createNewMenu = new MenuBar(true);

    createNewMenu.addItem(Util.getHeader(images.newPackage(), constants.NewPackage1()), true, new Command() {
        public void execute() {
            NewPackageWizard wiz = new NewPackageWizard(new Command() {
                public void execute() {
                    manager.refreshTree();
                }//from w  w  w  .ja  va  2  s .  c o m
            });
            wiz.show();
        }
    });

    createNewMenu.addItem(Util.getHeader(images.newPackage(), constants.NewWorkingSet()), true, new Command() {
        public void execute() {
            manager.launchWizard(AssetFormats.WORKING_SET, constants.NewWorkingSet(), false);
        }
    });

    createNewMenu.addItem(Util.getHeader(images.ruleAsset(), constants.NewRule()), true, new Command() {
        public void execute() {
            manager.launchWizard(null, constants.NewRule(), true);
        }
    });

    createNewMenu.addItem(Util.getHeader(images.newTemplate(), constants.NewRuleTemplate()), true,
            new Command() {
                public void execute() {
                    manager.launchWizard(AssetFormats.RULE_TEMPLATE, constants.NewRuleTemplate(), true);
                }
            });

    createNewMenu.addItem(Util.getHeader(images.modelAsset(), constants.UploadPOJOModelJar()), true,
            new Command() {
                public void execute() {
                    manager.launchWizard(AssetFormats.MODEL, constants.NewModelArchiveJar(), false);
                }
            });

    createNewMenu.addItem(Util.getHeader(images.modelAsset(), constants.NewDeclarativeModel()), true,
            new Command() {
                public void execute() {
                    manager.launchWizard(AssetFormats.DRL_MODEL,
                            constants.NewDeclarativeModelUsingGuidedEditor(), false);
                }
            });

    if (Preferences.getBooleanPref("flex-bpel-editor")) {
        createNewMenu.addItem(Util.getHeader(images.modelAsset(), constants.NewBPELPackage()), true,
                new Command() {
                    public void execute() {
                        manager.launchWizard(AssetFormats.BPEL_PACKAGE, constants.CreateANewBPELPackage(),
                                false);
                    }
                });
    }

    createNewMenu.addItem(Util.getHeader(images.functionAssets(), constants.NewFunction()), true,
            new Command() {
                public void execute() {
                    manager.launchWizard(AssetFormats.FUNCTION, constants.CreateANewFunction(), false);
                }
            });

    createNewMenu.addItem(Util.getHeader(images.dsl(), constants.NewDSL()), true, new Command() {
        public void execute() {
            manager.launchWizard(AssetFormats.DSL, constants.CreateANewDSLConfiguration(), false);
        }
    });

    createNewMenu.addItem(Util.getHeader(images.ruleflowSmall(), constants.NewRuleFlow()), true, new Command() {
        public void execute() {
            manager.launchWizard(AssetFormats.RULE_FLOW_RF, constants.CreateANewRuleFlow(), false);
        }
    });

    createNewMenu.addItem(Util.getHeader(images.newEnumeration(), constants.NewEnumeration()), true,
            new Command() {
                public void execute() {
                    manager.launchWizard(AssetFormats.ENUMERATION,
                            constants.CreateANewEnumerationDropDownMapping(), false);
                }
            });

    createNewMenu.addItem(Util.getHeader(images.testManager(), constants.NewTestScenario()), true,
            new Command() {
                public void execute() {
                    manager.launchWizard(AssetFormats.TEST_SCENARIO, constants.CreateATestScenario(), false);
                }
            });

    createNewMenu.addItem(Util.getHeader(images.newFile(), constants.CreateAFile()), true, new Command() {
        public void execute() {
            manager.launchWizard("*", constants.CreateAFile(), false);
        }
    });

    createNewMenu.addItem(Util.getHeader(images.refresh(), constants.RebuildAllPackageBinariesQ()), true,
            new Command() {
                public void execute() {
                    if (Window.confirm(constants.RebuildConfirmWarning())) {
                        LoadingPopup.showMessage(constants.RebuildingPackageBinaries());
                        RepositoryServiceFactory.getService().rebuildPackages(new GenericCallback<Void>() {
                            public void onSuccess(Void data) {
                                LoadingPopup.close();
                            }
                        });
                    }
                }
            });

    MenuBar rootMenuBar = new MenuBar(true);
    rootMenuBar.setAutoOpen(true);
    rootMenuBar.setAnimationEnabled(true);

    rootMenuBar.addItem(new MenuItem(constants.CreateNew(), createNewMenu));

    return rootMenuBar;
}

From source file:org.drools.guvnor.client.explorer.RulesNewMenu.java

License:Apache License

public static MenuBar getMenu(final AbstractTree manager) {
    MenuBar createNewMenu = new MenuBar(true);

    createNewMenu.addItem(Util.getHeader(images.businessRule(), constants.BusinessRuleGuidedEditor()), true,
            new Command() {
                public void execute() {
                    manager.launchWizard(AssetFormats.BUSINESS_RULE, constants.NewBusinessRuleGuidedEditor(),
                            true);/* w w w .j  a va  2  s .  co  m*/
                }
            });

    createNewMenu.addItem(Util.getHeader(images.ruleAsset(), constants.DSLBusinessRuleTextEditor()), true,
            new Command() {
                public void execute() {
                    manager.launchWizard(AssetFormats.DSL_TEMPLATE_RULE, constants.NewRuleUsingDSL(), true);
                }
            });

    createNewMenu.addItem(Util.getHeader(images.ruleAsset(), constants.DRLRuleTechnicalRuleTextEditor()), true,
            new Command() {
                public void execute() {
                    manager.launchWizard(AssetFormats.DRL, constants.NewDRL(), true);
                }
            });

    createNewMenu.addItem(Util.getHeader(images.spreadsheetSmall(), constants.DecisionTableSpreadsheet()), true,
            new Command() {
                public void execute() {
                    manager.launchWizard(AssetFormats.DECISION_SPREADSHEET_XLS,
                            constants.NewDecisionTableSpreadsheet(), true);
                }
            });

    createNewMenu.addItem(Util.getHeader(images.gdst(), constants.DecisionTableWebGuidedEditor()), true,
            new Command() {
                public void execute() {
                    manager.launchWizard(AssetFormats.DECISION_TABLE_GUIDED,
                            constants.NewDecisionTableGuidedEditor(), true);
                }
            });

    createNewMenu.addItem(Util.getHeader(images.testManager(), constants.TestScenario()), true, new Command() {
        public void execute() {
            manager.launchWizard(AssetFormats.TEST_SCENARIO, constants.CreateATestScenario(), false);
        }
    });

    MenuBar rootMenuBar = new MenuBar(true);
    rootMenuBar.setAutoOpen(true);
    rootMenuBar.setAnimationEnabled(true);

    rootMenuBar.addItem(new MenuItem(constants.CreateNew(), createNewMenu));

    return rootMenuBar;
}

From source file:org.pentaho.pat.client.ui.panels.TopMenu.java

License:Open Source License

public void setup() {

    this.clearItems();

    // Create a menu bar
    this.setAnimationEnabled(true);

    if (!Pat.isPlugin()) {
        final MenuBar fileMenu = createFileMenu();
        this.addItem(new MenuItem(Pat.CONSTANTS.file(), fileMenu));
    }//from   ww w . jav  a2  s.c  o m

    final MenuBar conMenu = createConnectionMenu();
    conMenu.setAnimationEnabled(true);
    final MenuItem conItem = new MenuItem(Pat.CONSTANTS.connections(), conMenu);
    this.addItem(conItem);

    final MenuBar cubeMenu = createCubesMenu();
    cubeMenu.setAnimationEnabled(true);
    cubeMenu.setAutoOpen(true);
    final MenuItem cubeItem = new MenuItem(Pat.CONSTANTS.cubes(), cubeMenu);
    this.addItem(cubeItem);

    // Create the help menu
    MenuBar helpMenu = new MenuBar(true);
    helpMenu.clearItems();
    this.addItem(new MenuItem(Pat.CONSTANTS.help(), helpMenu));

    helpMenu.addItem("Donate", new Command() {

        public void execute() {
            Pat.openDonation();
        }

    });

    helpMenu.addItem(Pat.CONSTANTS.about(), new Command() {

        public void execute() {
            AboutWindow.display();
        }

    });

}

From source file:tv.dyndns.kishibe.qmaclone.client.WidgetPositionSelecter.java

License:Open Source License

private WidgetPositionSelecter() {
    addStyleName("positionSelecter");

    final MenuBar menu = new MenuBar(true);
    menu.setAnimationEnabled(true);
    menu.addItem(new MenuItem("", commandPositionTop));
    menu.addItem(new MenuItem("?", commandPositionChat));
    menu.addItem(new MenuItem("", commandPositionBottom));

    final MenuBar menuBar = new MenuBar(true);
    menu.setAnimationEnabled(true);//from w  w w.j  a v  a  2  s. c  o  m
    menuBar.addItem("?", menu);

    setWidget(menuBar);
}