Java 类com.vaadin.server.Page.BrowserWindowResizeEvent 实例源码

项目:imotSpot    文件:DashboardUI.java   
@Override
protected void init(final VaadinRequest request) {
    setLocale(Locale.US);

    DashboardEventBus.register(this);
    Responsive.makeResponsive(this);
    addStyleName(ValoTheme.UI_WITH_MENU);

    updateContent();

    // Some views need to be aware of browser resize events so a
    // BrowserResizeEvent gets fired to the event bus on every occasion.
    Page.getCurrent().addBrowserWindowResizeListener(
            new BrowserWindowResizeListener() {
                @Override
                public void browserWindowResized(
                        final BrowserWindowResizeEvent event) {
                    DashboardEventBus.post(new BrowserResizeEvent());
                }
            });
}
项目:vaadin-vertx-samples    文件:DashboardUI.java   
@Override
protected void init(final VaadinRequest request) {
    setLocale(Locale.US);

    DashboardEventBus.register(this);
    Responsive.makeResponsive(this);
    addStyleName(ValoTheme.UI_WITH_MENU);

    updateContent();

    // Some views need to be aware of browser resize events so a
    // BrowserResizeEvent gets fired to the event bus on every occasion.
    Page.getCurrent().addBrowserWindowResizeListener(
            new BrowserWindowResizeListener() {
                @Override
                public void browserWindowResized(
                        final BrowserWindowResizeEvent event) {
                    DashboardEventBus.post(new BrowserResizeEvent());
                }
            });
}
项目:hawkbit    文件:UploadArtifactView.java   
@Override
public void browserWindowResized(final BrowserWindowResizeEvent event) {
    showOrHideFilterButtons(event.getWidth());
}
项目:hawkbit    文件:DeploymentView.java   
@Override
public void browserWindowResized(final BrowserWindowResizeEvent event) {
    final int browserWidth = event.getWidth();
    showOrHideFilterButtons(browserWidth);
}
项目:hawkbit    文件:DistributionsView.java   
@Override
public void browserWindowResized(final BrowserWindowResizeEvent event) {
    showOrHideFilterButtons(event.getWidth());
}
项目:VaadinUtils    文件:HelpSplitPanel.java   
private void buildMainLayout()
{

    addComponent((Component) component);
    setExpandRatio((Component) component, 1);
    helpPane = new Panel();
    helpPane.setImmediate(false);

    showHelpLoadingSplash();

    helpSliderPanel = new SliderPanelBuilder(helpPane).expanded(false).mode(SliderMode.RIGHT)
            .tabPosition(SliderTabPosition.MIDDLE).style(SliderPanelStyles.COLOR_BLUE).caption("Help")
            .animationDuration(400).tabSize(30).autoCollapseSlider(true)
            .fixedContentSize((int) (UI.getCurrent().getPage().getBrowserWindowWidth() * 0.75)).build();

    helpLoader = new SlideOutLoader();

    innerSecondPanel = new VerticalLayout();
    innerSecondPanel.setSizeFull();
    innerSecondPanel.setWidth("30");
    innerSecondPanel.addComponent(helpSliderPanel);
    innerSecondPanel.setComponentAlignment(helpSliderPanel, Alignment.MIDDLE_RIGHT);

    addComponent(innerSecondPanel);

    Page.getCurrent().addBrowserWindowResizeListener(new BrowserWindowResizeListener()
    {

        private static final long serialVersionUID = -8548907013566961812L;

        @Override
        public void browserWindowResized(BrowserWindowResizeEvent event)
        {

            helpSliderPanel.setFixedContentSize((int) (event.getWidth() * 0.75));
            if (helpSliderPanel.isExpanded())
            {
                helpSliderPanel.collapse();
            }

        }

    });

}