List of usage examples for com.vaadin.ui Button getId
@Override
public String getId()
From source file:com.mycollab.module.crm.view.CrmModule.java
License:Open Source License
public static void navigateItem(String type) { IModule module = ModuleHelper.getCurrentModule(); if (module != null && module instanceof CrmModule) { CrmModule crmModule = (CrmModule) module; if (crmModule.serviceMenu != null) { ServiceMenu serviceMenu = crmModule.serviceMenu; int i = 0; for (Component aServiceMenu : serviceMenu) { Button btn = (Button) aServiceMenu; if (type.equals(btn.getId())) { serviceMenu.selectService(i); break; }/*from www . j a v a2 s.c o m*/ i++; } } } }
From source file:org.eclipse.hawkbit.ui.management.dstag.DistributionTagButtonClick.java
License:Open Source License
@Override protected void filterUnClicked(final Button clickedButton) { if (clickedButton.getData().equals(SPUIDefinitions.NO_TAG_BUTTON_ID)) { managementUIState.getDistributionTableFilters().setNoTagSelected(false); } else {//from www. j a va 2 s .c o m managementUIState.getDistributionTableFilters().getDistSetTags().remove(clickedButton.getId()); } eventBus.publish(this, new RefreshDistributionTableByFilterEvent()); }
From source file:org.eclipse.hawkbit.ui.management.dstag.DistributionTagButtonClick.java
License:Open Source License
@Override protected void filterClicked(final Button clickedButton) { if (clickedButton.getData().equals(SPUIDefinitions.NO_TAG_BUTTON_ID)) { managementUIState.getDistributionTableFilters().setNoTagSelected(true); } else {/*from w ww. j a v a 2 s.c om*/ managementUIState.getDistributionTableFilters().getDistSetTags().add(clickedButton.getId()); } eventBus.publish(this, new RefreshDistributionTableByFilterEvent()); }
From source file:org.eclipse.hawkbit.ui.management.targettag.filter.TargetTagFilterButtonClick.java
License:Open Source License
@Override protected void filterUnClicked(final Button clickedButton) { if (clickedButton.getData().equals(SPUIDefinitions.NO_TAG_BUTTON_ID)) { if (managementUIState.getTargetTableFilters().isNoTagSelected()) { managementUIState.getTargetTableFilters().setNoTagSelected(false); eventBus.publish(this, TargetFilterEvent.FILTER_BY_TAG); }/* ww w. j a v a 2 s .c om*/ } else { if (null != managementUIState.getTargetTableFilters().getClickedTargetTags() && managementUIState .getTargetTableFilters().getClickedTargetTags().contains(clickedButton.getId())) { managementUIState.getTargetTableFilters().getClickedTargetTags().remove(clickedButton.getId()); eventBus.publish(this, TargetFilterEvent.FILTER_BY_TAG); } } }
From source file:org.eclipse.hawkbit.ui.management.targettag.filter.TargetTagFilterButtonClick.java
License:Open Source License
@Override protected void filterClicked(final Button clickedButton) { if (clickedButton.getData().equals(SPUIDefinitions.NO_TAG_BUTTON_ID)) { managementUIState.getTargetTableFilters().setNoTagSelected(true); eventBus.publish(this, TargetFilterEvent.FILTER_BY_TAG); } else {/*w w w. j a v a 2s . co m*/ managementUIState.getTargetTableFilters().getClickedTargetTags().add(clickedButton.getId()); eventBus.publish(this, TargetFilterEvent.FILTER_BY_TAG); } }
From source file:org.lucidj.browser.BrowserView.java
License:Apache License
private void handle_button_click(Button source) { switch (source.getId()) { case "save": { save_embedding();/*from w ww . java 2s . co m*/ break; } // case VM_NOTEBOOK: // { // // TODO: CREATE BETTER VIEW REPRESENTATION/REFERENCE // UI.getCurrent ().getNavigator ().navigateTo (view_name + ":" + // ____task_source + "/" + // VM_NOTEBOOK); // break; // } // case VM_SINGLE: // { // UI.getCurrent ().getNavigator ().navigateTo (view_name + ":" + // ____task_source + "/" + // VM_SINGLE + "/" + // get_current_cell_index ()); // break; // } case "prev-smartbox": { set_current_cell_index(get_current_cell_index() - 1); break; } case "next-smartbox": { set_current_cell_index(get_current_cell_index() + 1); break; } case "delete-cell": { int cell_index = get_current_cell_index(); if (cell_index != -1) { log.info("cell_index = {}", cell_index); object_list.remove(cell_index); synchronize_cell_view(); if (cell_index >= object_list.size()) { cell_index = object_list.size() - 1; } set_current_cell_index(cell_index); embedding_changed = true; } break; } case "output": { // TODO: FROM TOOLBAR // String current_view_mode = current_cell.getViewMode(); // formulae_changed = true; // // if (current_view_mode.equals ("default")) // { // current_cell.setViewMode ("canvas-only"); // } // else // { // current_cell.setViewMode ("default"); // } break; } default: { Notification.show("Not implemented", source.getId(), Notification.Type.HUMANIZED_MESSAGE); break; } } }