当前位置: 首页>>代码示例>>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;未经允许,请勿转载。