com.vaadin.server.Page.BrowserWindowResizeListener的实例源码

项目: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());
                }
            });
}
项目: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();
            }

        }

    });

}

相关文章

买水果
比较全面的redis工具类
gson 反序列化到多态子类
java 版本的 mb_strwidth
JAVA 反转字符串的最快方法,大概比StringBuffer.reverse()性...
com.google.gson.internal.bind.ArrayTypeAdapter的实例源码...