Example usage for com.google.gwt.user.client.ui MenuItem getScheduledCommand

List of usage examples for com.google.gwt.user.client.ui MenuItem getScheduledCommand

Introduction

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

Prototype

public ScheduledCommand getScheduledCommand() 

Source Link

Document

Gets the scheduled command associated with this item.

Usage

From source file:org.eclipse.hawkbit.ui.filtermanagement.client.AutoCompleteTextFieldConnector.java

License:Open Source License

private void enterKey() {
    final MenuItem item = select.getSelectedItem();
    if (item != null) {
        item.getScheduledCommand().execute();
    }//  w ww  .j a va  2s  .  co  m
}

From source file:org.rstudio.core.client.widget.ToolbarPopupMenu.java

License:Open Source License

public void addItem(MenuItem menuItem) {
    ScheduledCommand command = menuItem.getScheduledCommand();
    if (command == null && menuItem instanceof AppMenuItem)
        command = ((AppMenuItem) menuItem).getScheduledCommand(true);
    if (command != null)
        menuItem.setScheduledCommand(new ToolbarPopupMenuCommand(command));
    menuBar_.addItem(menuItem);//from www  . j a  v  a2  s.com
}

From source file:org.rstudio.core.client.widget.ToolbarPopupMenu.java

License:Open Source License

public void insertItem(MenuItem menuItem, int beforeIndex) {
    ScheduledCommand command = menuItem.getScheduledCommand();
    if (command != null)
        menuItem.setScheduledCommand(new ToolbarPopupMenuCommand(command));
    menuBar_.insertItem(menuItem, beforeIndex);
}

From source file:org.rstudio.core.client.widget.ToolbarPopupMenuButton.java

License:Open Source License

public void addMenuItem(final MenuItem item, final String value) {
    final ScheduledCommand cmd = item.getScheduledCommand();
    item.setScheduledCommand(new Command() {
        @Override//from ww w .j  a va  2s .c om
        public void execute() {
            setText(value);
            if (cmd != null)
                cmd.execute();
        }
    });
    getMenu().addItem(item);
}