当前位置: 首页>>代码示例>>Java>>正文


Java BrowserWindowResizeEvent类代码示例

本文整理汇总了Java中com.vaadin.server.Page.BrowserWindowResizeEvent的典型用法代码示例。如果您正苦于以下问题:Java BrowserWindowResizeEvent类的具体用法?Java BrowserWindowResizeEvent怎么用?Java BrowserWindowResizeEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


BrowserWindowResizeEvent类属于com.vaadin.server.Page包,在下文中一共展示了BrowserWindowResizeEvent类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import com.vaadin.server.Page.BrowserWindowResizeEvent; //导入依赖的package包/类
@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());
                }
            });
}
 
开发者ID:imotSpot,项目名称:imotSpot,代码行数:22,代码来源:DashboardUI.java

示例2: browserWindowResized

import com.vaadin.server.Page.BrowserWindowResizeEvent; //导入依赖的package包/类
@Override
public void browserWindowResized(final BrowserWindowResizeEvent event) {
    showOrHideFilterButtons(event.getWidth());
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:5,代码来源:UploadArtifactView.java

示例3: browserWindowResized

import com.vaadin.server.Page.BrowserWindowResizeEvent; //导入依赖的package包/类
@Override
public void browserWindowResized(final BrowserWindowResizeEvent event) {
    final int browserWidth = event.getWidth();
    showOrHideFilterButtons(browserWidth);
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:6,代码来源:DeploymentView.java

示例4: buildMainLayout

import com.vaadin.server.Page.BrowserWindowResizeEvent; //导入依赖的package包/类
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();
			}

		}

	});

}
 
开发者ID:rlsutton1,项目名称:VaadinUtils,代码行数:46,代码来源:HelpSplitPanel.java


注:本文中的com.vaadin.server.Page.BrowserWindowResizeEvent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。