當前位置: 首頁>>代碼示例>>Java>>正文


Java EventBusListenerMethod類代碼示例

本文整理匯總了Java中org.vaadin.spring.events.annotation.EventBusListenerMethod的典型用法代碼示例。如果您正苦於以下問題:Java EventBusListenerMethod類的具體用法?Java EventBusListenerMethod怎麽用?Java EventBusListenerMethod使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


EventBusListenerMethod類屬於org.vaadin.spring.events.annotation包,在下文中一共展示了EventBusListenerMethod類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onEvent

import org.vaadin.spring.events.annotation.EventBusListenerMethod; //導入依賴的package包/類
@EventBusListenerMethod(scope = EventScope.UI)
void onEvent(final RolloutEvent event) {
    if (event == RolloutEvent.SHOW_ROLLOUTS) {
        rolloutUIState.setShowRollOuts(true);
        rolloutUIState.setShowRolloutGroups(false);
        rolloutUIState.setShowRolloutGroupTargets(false);
        buildLayout();
    } else if (event == RolloutEvent.SHOW_ROLLOUT_GROUPS) {
        rolloutUIState.setShowRollOuts(false);
        rolloutUIState.setShowRolloutGroups(true);
        rolloutUIState.setShowRolloutGroupTargets(false);
        buildLayout();
    } else if (event == RolloutEvent.SHOW_ROLLOUT_GROUP_TARGETS) {
        rolloutUIState.setShowRollOuts(false);
        rolloutUIState.setShowRolloutGroups(false);
        rolloutUIState.setShowRolloutGroupTargets(true);
        buildLayout();
    }
}
 
開發者ID:eclipse,項目名稱:hawkbit,代碼行數:20,代碼來源:RolloutView.java

示例2: onEvent

import org.vaadin.spring.events.annotation.EventBusListenerMethod; //導入依賴的package包/類
@EventBusListenerMethod(scope = EventScope.UI)
void onEvent(final UploadStatusEvent event) {
    if (event.getUploadProgressEventType() == UploadStatusEventType.UPLOAD_STARTED) {
        ui.access(this::onStartOfUpload);
    } else if (event.getUploadProgressEventType() == UploadStatusEventType.UPLOAD_FAILED) {
        ui.access(() -> onUploadFailure(event));
    } else if (event.getUploadProgressEventType() == UploadStatusEventType.UPLOAD_FINISHED) {
        ui.access(this::onUploadCompletion);
    } else if (event.getUploadProgressEventType() == UploadStatusEventType.UPLOAD_SUCCESSFUL) {
        ui.access(() -> onUploadSuccess(event));
    } else if (event.getUploadProgressEventType() == UploadStatusEventType.UPLOAD_STREAMING_FAILED) {
        ui.access(() -> onUploadStreamingFailure(event));
    } else if (event.getUploadProgressEventType() == UploadStatusEventType.UPLOAD_STREAMING_FINISHED) {
        ui.access(this::onUploadStreamingSuccess);
    }
}
 
開發者ID:eclipse,項目名稱:hawkbit,代碼行數:17,代碼來源:UploadLayout.java

示例3: onEvent

import org.vaadin.spring.events.annotation.EventBusListenerMethod; //導入依賴的package包/類
@EventBusListenerMethod(scope = EventScope.UI)
void onEvent(final UploadArtifactUIEvent event) {

    if (isSoftwareEvent(event) || isSoftwareTypeEvent(event)) {

        UI.getCurrent().access(() -> {
            if (!hasUnsavedActions()) {
                closeUnsavedActionsWindow();
                final String message = uploadViewConfirmationWindowLayout.getConsolidatedMessage();
                if (message != null && message.length() > 0) {
                    notification.displaySuccess(message);
                }
            }
            updateSWActionCount();
        });
    }
}
 
開發者ID:eclipse,項目名稱:hawkbit,代碼行數:18,代碼來源:SMDeleteActionsLayout.java

示例4: onDistributionSetUpdateEvents

import org.vaadin.spring.events.annotation.EventBusListenerMethod; //導入依賴的package包/類
@EventBusListenerMethod(scope = EventScope.UI)
void onDistributionSetUpdateEvents(final DistributionSetUpdatedEventContainer eventContainer) {

    final List<Long> visibleItemIds = (List<Long>) getVisibleItemIds();

    if (allOfThemAffectCompletedSetsThatAreNotVisible(eventContainer.getEvents(), visibleItemIds)) {
        refreshContainer();
    } else if (!checkAndHandleIfVisibleDsSwitchesFromCompleteToIncomplete(eventContainer.getEvents(),
            visibleItemIds)) {
        updateVisableTableEntries(eventContainer.getEvents(), visibleItemIds);
    }
    final Long lastSelectedDsIdName = managementUIState.getLastSelectedDsIdName();
    eventContainer.getEvents().stream().filter(event -> event.getEntityId().equals(lastSelectedDsIdName))
            .filter(Objects::nonNull).findAny().ifPresent(event -> eventBus.publish(this,
                    new DistributionTableEvent(BaseEntityEventType.SELECTED_ENTITY, event.getEntity())));

}
 
開發者ID:eclipse,項目名稱:hawkbit,代碼行數:18,代碼來源:DistributionTable.java

示例5: onEvent

import org.vaadin.spring.events.annotation.EventBusListenerMethod; //導入依賴的package包/類
@EventBusListenerMethod(scope = EventScope.UI)
void onEvent(final PinUnpinEvent pinUnpinEvent) {
    UI.getCurrent().access(() -> {
        if (pinUnpinEvent == PinUnpinEvent.PIN_TARGET) {
            refreshFilter();
            styleDistributionTableOnPinning();
            // unstyleDistPin
            if (distributionPinnedBtn != null) {
                distributionPinnedBtn.setStyleName(getPinStyle());
            }
        } else if (pinUnpinEvent == PinUnpinEvent.UNPIN_TARGET) {
            refreshFilter();
            restoreDistributionTableStyle();
        }
    });
}
 
開發者ID:eclipse,項目名稱:hawkbit,代碼行數:17,代碼來源:DistributionTable.java

示例6: onEvent

import org.vaadin.spring.events.annotation.EventBusListenerMethod; //導入依賴的package包/類
/**
 * TenantAwareEvent Listener to show the message count.
 * 
 * @param event
 */
@EventBusListenerMethod(scope = EventScope.UI)
void onEvent(final RolloutEvent event) {
    if (event == RolloutEvent.SHOW_ROLLOUT_GROUP_TARGETS_COUNT) {
        displayRolloutGroupTargetMessage();
    }
}
 
開發者ID:eclipse,項目名稱:hawkbit,代碼行數:12,代碼來源:RolloutGroupTargetsCountLabelMessage.java

示例7: onEvent

import org.vaadin.spring.events.annotation.EventBusListenerMethod; //導入依賴的package包/類
@EventBusListenerMethod(scope = EventScope.UI)
void onEvent(final RolloutEvent event) {
    if (RolloutEvent.SHOW_ROLLOUT_GROUP_TARGETS != event) {
        return;
    }
    ((LazyQueryContainer) getContainerDataSource()).refresh();
    eventBus.publish(this, RolloutEvent.SHOW_ROLLOUT_GROUP_TARGETS_COUNT);
}
 
開發者ID:eclipse,項目名稱:hawkbit,代碼行數:9,代碼來源:RolloutGroupTargetsListGrid.java

示例8: onEvent

import org.vaadin.spring.events.annotation.EventBusListenerMethod; //導入依賴的package包/類
/**
 * Handles the RolloutEvent to refresh Grid.
 *
 */
@EventBusListenerMethod(scope = EventScope.UI)
void onEvent(final RolloutEvent event) {
    switch (event) {
    case FILTER_BY_TEXT:
    case CREATE_ROLLOUT:
    case UPDATE_ROLLOUT:
    case SHOW_ROLLOUTS:
        refreshContainer();
        break;
    default:
        return;
    }
}
 
開發者ID:eclipse,項目名稱:hawkbit,代碼行數:18,代碼來源:RolloutListGrid.java

示例9: onEvent

import org.vaadin.spring.events.annotation.EventBusListenerMethod; //導入依賴的package包/類
@EventBusListenerMethod(scope = EventScope.UI)
void onEvent(final RolloutEvent event) {
    if (RolloutEvent.SHOW_ROLLOUTS == event) {
        rolloutUIState.setShowRollOuts(true);
        rolloutUIState.setShowRolloutGroups(false);
        rolloutUIState.setShowRolloutGroupTargets(false);
    }
    if (RolloutEvent.SHOW_ROLLOUT_GROUPS != event) {
        return;
    }
    ((LazyQueryContainer) getContainerDataSource()).refresh();
}
 
開發者ID:eclipse,項目名稱:hawkbit,代碼行數:13,代碼來源:RolloutGroupListGrid.java

示例10: onEvent

import org.vaadin.spring.events.annotation.EventBusListenerMethod; //導入依賴的package包/類
@EventBusListenerMethod(scope = EventScope.UI)
void onEvent(final CustomFilterUIEvent custFUIEvent) {
    if (custFUIEvent == CustomFilterUIEvent.TARGET_DETAILS_VIEW
            || custFUIEvent == CustomFilterUIEvent.CREATE_NEW_FILTER_CLICK) {
        UI.getCurrent().access(this::populateTableData);
    } else if (custFUIEvent == CustomFilterUIEvent.FILTER_TARGET_BY_QUERY) {
        UI.getCurrent().access(this::onQuery);
    }
}
 
開發者ID:eclipse,項目名稱:hawkbit,代碼行數:10,代碼來源:CreateOrUpdateFilterTable.java

示例11: onEvent

import org.vaadin.spring.events.annotation.EventBusListenerMethod; //導入依賴的package包/類
@EventBusListenerMethod(scope = EventScope.UI)
void onEvent(final CustomFilterUIEvent custFilterUIEvent) {
    if (custFilterUIEvent == CustomFilterUIEvent.TARGET_FILTER_DETAIL_VIEW) {
        viewTargetFilterDetailLayout();
    } else if (custFilterUIEvent == CustomFilterUIEvent.CREATE_NEW_FILTER_CLICK) {
        this.getUI().access(() -> viewCreateTargetFilterLayout());
    } else if (custFilterUIEvent == CustomFilterUIEvent.EXIT_CREATE_OR_UPDATE_FILTRER_VIEW
            || custFilterUIEvent == CustomFilterUIEvent.SHOW_FILTER_MANAGEMENT) {
        UI.getCurrent().access(() -> viewListView());
    }
}
 
開發者ID:eclipse,項目名稱:hawkbit,代碼行數:12,代碼來源:FilterManagementView.java

示例12: onEvents

import org.vaadin.spring.events.annotation.EventBusListenerMethod; //導入依賴的package包/類
@EventBusListenerMethod(scope = EventScope.UI)
void onEvents(final List<?> events) {
    final Object firstEvent = events.get(0);
    if (DistributionSetCreatedEvent.class.isInstance(firstEvent)
            || DistributionSetDeletedEvent.class.isInstance(firstEvent)) {
        refreshDistributions();
    }
}
 
開發者ID:eclipse,項目名稱:hawkbit,代碼行數:9,代碼來源:DistributionSetSelectTable.java

示例13: onEvent

import org.vaadin.spring.events.annotation.EventBusListenerMethod; //導入依賴的package包/類
@EventBusListenerMethod(scope = EventScope.UI)
void onEvent(final CustomFilterUIEvent custFUIEvent) {
    if (custFUIEvent == CustomFilterUIEvent.TARGET_FILTER_DETAIL_VIEW) {
        populateComponents();
        eventBus.publish(this, CustomFilterUIEvent.TARGET_DETAILS_VIEW);
    } else if (custFUIEvent == CustomFilterUIEvent.CREATE_NEW_FILTER_CLICK) {
        setUpCaptionLayout(true);
        resetComponents();
    }
}
 
開發者ID:eclipse,項目名稱:hawkbit,代碼行數:11,代碼來源:CreateOrUpdateFilterHeader.java

示例14: onEvent

import org.vaadin.spring.events.annotation.EventBusListenerMethod; //導入依賴的package包/類
@EventBusListenerMethod(scope = EventScope.UI)
void onEvent(final CustomFilterUIEvent custFUIEvent) {
    if (custFUIEvent == CustomFilterUIEvent.UPDATE_TARGET_FILTER_SEARCH_ICON) {
        validationIcon.setValue(FontAwesome.CHECK_CIRCLE.getHtml());
        if (!isValidationError()) {
            validationIcon.setStyleName(SPUIStyleDefinitions.SUCCESS_ICON);
        } else {
            validationIcon.setStyleName(SPUIStyleDefinitions.ERROR_ICON);
        }
    }
}
 
開發者ID:eclipse,項目名稱:hawkbit,代碼行數:12,代碼來源:AutoCompleteTextFieldComponent.java

示例15: onEvent

import org.vaadin.spring.events.annotation.EventBusListenerMethod; //導入依賴的package包/類
@EventBusListenerMethod(scope = EventScope.UI)
void onEvent(final CustomFilterUIEvent custFUIEvent) {
    if (custFUIEvent == CustomFilterUIEvent.TARGET_DETAILS_VIEW
            || custFUIEvent == CustomFilterUIEvent.CREATE_NEW_FILTER_CLICK
            || custFUIEvent == CustomFilterUIEvent.EXIT_CREATE_OR_UPDATE_FILTRER_VIEW
            || custFUIEvent == CustomFilterUIEvent.UPDATE_TARGET_FILTER_SEARCH_ICON) {
        UI.getCurrent().access(() -> displayTargetFilterMessage());
    }
}
 
開發者ID:eclipse,項目名稱:hawkbit,代碼行數:10,代碼來源:TargetFilterCountMessageLabel.java


注:本文中的org.vaadin.spring.events.annotation.EventBusListenerMethod類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。