@Override
 public void itemClick(ItemClickEvent event) {
   eventBus.publish(this, ControlsContext.empty());
   // Pick only left mouse clicks
   if (event.getButton() == MouseButton.LEFT) {
     NavElement ne = (NavElement) event.getItemId();
     eventBus.publish(this, ne);
   }
 }
Пример #2
0
 /*
  * (non-Javadoc)
  *
  * @see
  * com.vaadin.ui.TabSheet.SelectedTabChangeListener#selectedTabChange(com
  * .vaadin.ui.TabSheet.SelectedTabChangeEvent)
  */
 @Override
 public void selectedTabChange(final SelectedTabChangeEvent event) {
   if (i18n.get("caption.filter.simple").equals(getSelectedTab().getCaption())) {
     managementUIState.setCustomFilterSelected(false);
     eventBus.publish(this, ManagementUIEvent.RESET_TARGET_FILTER_QUERY);
   } else {
     managementUIState.setCustomFilterSelected(true);
     eventBus.publish(this, ManagementUIEvent.RESET_SIMPLE_FILTERS);
   }
 }
Пример #3
0
 private void onClickOfDetailButton(final ClickEvent event) {
   final String targetFilterName = (String) ((Button) event.getComponent()).getData();
   final TargetFilterQuery targetFilterQuery =
       targetFilterQueryManagement.findTargetFilterQueryByName(targetFilterName);
   filterManagementUIState.setFilterQueryValue(targetFilterQuery.getQuery());
   filterManagementUIState.setTfQuery(targetFilterQuery);
   filterManagementUIState.setEditViewDisplayed(true);
   eventBus.publish(this, CustomFilterUIEvent.TARGET_FILTER_DETAIL_VIEW);
 }
Пример #4
0
 private void createConfirmDialog() {
   confirmDialog =
       new ConfirmationDialog(
           i18n.get("caption.confirm.abort.action"),
           i18n.get("message.abort.upload"),
           i18n.get("button.ok"),
           i18n.get("button.cancel"),
           ok -> {
             if (ok) {
               eventBus.publish(this, UploadStatusEventType.ABORT_UPLOAD);
               uploadAborted = true;
               errorOccured = true;
               minimizeButton.setEnabled(false);
               closeButton.setEnabled(false);
             }
           });
 }
Пример #5
0
 private void minimizeWindow() {
   this.close();
   artifactUploadState.setStatusPopupMinimized(true);
   eventBus.publish(this, UploadArtifactUIEvent.MINIMIZED_STATUS_POPUP);
 }