List of usage examples for com.google.gwt.user.client.ui MenuItem getScheduledCommand
public ScheduledCommand getScheduledCommand()
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); }