本文整理汇总了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();
}
}
示例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);
}
}
示例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();
});
}
}
示例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())));
}
示例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();
}
});
}
示例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();
}
}
示例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);
}
示例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;
}
}
示例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();
}
示例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);
}
}
示例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());
}
}
示例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();
}
}
示例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();
}
}
示例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);
}
}
}
示例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());
}
}