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


Java Responsive.makeResponsive方法代码示例

本文整理汇总了Java中com.vaadin.server.Responsive.makeResponsive方法的典型用法代码示例。如果您正苦于以下问题:Java Responsive.makeResponsive方法的具体用法?Java Responsive.makeResponsive怎么用?Java Responsive.makeResponsive使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.vaadin.server.Responsive的用法示例。


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

示例1: init

import com.vaadin.server.Responsive; //导入方法依赖的package包/类
@Override
protected void init(VaadinRequest vaadinRequest) {
    root = new CssLayout(appBar, navigationDrawer, content);
    root.setPrimaryStyleName("root");
    root.setSizeFull();
    Responsive.makeResponsive(root);
    setContent(root);

    appBar.getNaviIcon().addClickListener(event -> navigationDrawer.toggle());

    content.setPrimaryStyleName("content");
    content.setSizeFull();

    initNavigationItems();
    initDummyContent();
}
 
开发者ID:vaadin,项目名称:material-theme-fw8,代码行数:17,代码来源:DemoUI.java

示例2: buildToolbar

import com.vaadin.server.Responsive; //导入方法依赖的package包/类
private Component buildToolbar() {
    HorizontalLayout header = new HorizontalLayout();
    header.addStyleName("viewheader");
    header.setSpacing(true);
    Responsive.makeResponsive(header);

    Label title = new Label("Imot list");
    title.setSizeUndefined();
    title.addStyleName(ValoTheme.LABEL_H1);
    title.addStyleName(ValoTheme.LABEL_NO_MARGIN);
    header.addComponent(title);

    createReport = buildCreateReport();
    HorizontalLayout tools = new HorizontalLayout(buildFilter(),
            createReport);
    tools.setSpacing(true);
    tools.addStyleName("toolbar");
    header.addComponent(tools);

    return header;
}
 
开发者ID:imotSpot,项目名称:imotSpot,代码行数:22,代码来源:TransactionsView.java

示例3: init

import com.vaadin.server.Responsive; //导入方法依赖的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

示例4: MovieDetailsWindow

import com.vaadin.server.Responsive; //导入方法依赖的package包/类
private MovieDetailsWindow(final Movie movie, final Date startTime,
        final Date endTime) {
    addStyleName("moviedetailswindow");
    Responsive.makeResponsive(this);

    setCaption(movie.getTitle());
    center();
    setCloseShortcut(KeyCode.ESCAPE, null);
    setResizable(false);
    setClosable(false);
    setHeight(90.0f, Unit.PERCENTAGE);

    VerticalLayout content = new VerticalLayout();
    content.setSizeFull();
    setContent(content);

    Panel detailsWrapper = new Panel(buildMovieDetails(movie, startTime,
            endTime));
    detailsWrapper.setSizeFull();
    detailsWrapper.addStyleName(ValoTheme.PANEL_BORDERLESS);
    detailsWrapper.addStyleName("scroll-divider");
    content.addComponent(detailsWrapper);
    content.setExpandRatio(detailsWrapper, 1f);

    content.addComponent(buildFooter());
}
 
开发者ID:imotSpot,项目名称:imotSpot,代码行数:27,代码来源:MovieDetailsWindow.java

示例5: buildSparklines

import com.vaadin.server.Responsive; //导入方法依赖的package包/类
private Component buildSparklines() {
    CssLayout sparks = new CssLayout();
    sparks.addStyleName("sparks");
    sparks.setWidth("100%");
    Responsive.makeResponsive(sparks);

    SparklineChart s = new SparklineChart("Traffic", "K", "",
            DummyDataGenerator.chartColors[0], 22, 20, 80);
    sparks.addComponent(s);

    s = new SparklineChart("Revenue / Day", "M", "$",
            DummyDataGenerator.chartColors[2], 8, 89, 150);
    sparks.addComponent(s);

    s = new SparklineChart("Checkout Time", "s", "",
            DummyDataGenerator.chartColors[3], 10, 30, 120);
    sparks.addComponent(s);

    s = new SparklineChart("Theater Fill Rate", "%", "",
            DummyDataGenerator.chartColors[5], 50, 34, 100);
    sparks.addComponent(s);

    return sparks;
}
 
开发者ID:mcollovati,项目名称:vaadin-vertx-samples,代码行数:25,代码来源:DashboardView.java

示例6: buildToolbar

import com.vaadin.server.Responsive; //导入方法依赖的package包/类
private Component buildToolbar() {
    HorizontalLayout header = new HorizontalLayout();
    header.addStyleName("viewheader");
    header.setSpacing(true);
    Responsive.makeResponsive(header);

    Label title = new Label("Latest Transactions");
    title.setSizeUndefined();
    title.addStyleName(ValoTheme.LABEL_H1);
    title.addStyleName(ValoTheme.LABEL_NO_MARGIN);
    header.addComponent(title);

    createReport = buildCreateReport();
    HorizontalLayout tools = new HorizontalLayout(buildFilter(),
            createReport);
    tools.setSpacing(true);
    tools.addStyleName("toolbar");
    header.addComponent(tools);

    return header;
}
 
开发者ID:mcollovati,项目名称:vaadin-vertx-samples,代码行数:22,代码来源:TransactionsView.java

示例7: init

import com.vaadin.server.Responsive; //导入方法依赖的package包/类
@Override
protected void init(VaadinRequest vaadinRequest) {
    Responsive.makeResponsive(this);
    getPage().setTitle("DungeonStory");

    if (Configuration.getInstance().isMock()) {
        accessControl = new BasicAccessControl();
    } else {
        accessControl = new DsAccessControl();
    }

    setupEventBus();

    if (!accessControl.isUserSignedIn()) {
        setContent(new LoginScreen(accessControl, this::showMainView));
    } else {
        showMainView();
    }

    setLocale(vaadinRequest.getLocale());

    ImageFactory.getInstance();
}
 
开发者ID:viydaag,项目名称:dungeonstory-java,代码行数:24,代码来源:DungeonStoryUI.java

示例8: createRowComponent

import com.vaadin.server.Responsive; //导入方法依赖的package包/类
protected final void createRowComponent(final ResponsiveRow row, final Component component, final String description) {
	final CssLayout layout = new CssLayout();
	layout.addStyleName(".v-layout-content-pagemode-panel-level2");
	Responsive.makeResponsive(layout);
	layout.setSizeUndefined();

	final Label descriptionLabel = new Label(description);
	descriptionLabel.addStyleName("itembox");
	Responsive.makeResponsive(descriptionLabel);
	descriptionLabel.setWidth(100, Unit.PERCENTAGE);
	layout.addComponent(descriptionLabel);

	component.addStyleName("itembox");
	component.addStyleName("title");
	Responsive.makeResponsive(component);
	component.setWidth(100, Unit.PERCENTAGE);
	layout.addComponent(component);	

	row.addColumn().withDisplayRules(DISPLAY_SIZE_XS_DEVICE,DISPLAYS_SIZE_XM_DEVICE,DISPLAY_SIZE_MD_DEVICE,DISPLAY_SIZE_LG_DEVICE).withComponent(layout);
}
 
开发者ID:Hack23,项目名称:cia,代码行数:21,代码来源:AbstractPageModContentFactoryImpl.java

示例9: DashboardView

import com.vaadin.server.Responsive; //导入方法依赖的package包/类
public DashboardView(ViewDefinition vd) {
    this.viewDefinition = HybridbpmUI.getDashboardAPI().getViewDefinitionById(vd.getId().toString());
    Design.read(this);
    Responsive.makeResponsive(this);

    btnAdd.addClickListener(this);
    btnAdd.setIcon(FontAwesome.PLUS_CIRCLE);
    btnAdd.setCaption("Add tab");

    btnEdit.addClickListener(this);
    btnEdit.setIcon(FontAwesome.EDIT);
    btnEdit.setCaption("Edit view");

    btnDelete.addClickListener(this);
    btnDelete.setIcon(FontAwesome.TIMES_CIRCLE);
    btnDelete.setCaption("Delete view");

    createTabs();
    checkDeveloperMode();

    tabSheet.addSelectedTabChangeListener(this);
    tabSheet.setCloseHandler(this);
}
 
开发者ID:hybridbpm,项目名称:hybridbpm,代码行数:24,代码来源:DashboardView.java

示例10: init

import com.vaadin.server.Responsive; //导入方法依赖的package包/类
@Override
protected void init(VaadinRequest vaadinRequest) {
    Responsive.makeResponsive(this);
    setLocale(vaadinRequest.getLocale());
    getPage().setTitle("MockApp");
    if (!accessControl.isUserSignedIn()) {
        setContent(new LoginScreen(accessControl, new LoginListener() {
            @Override
            public void loginSuccessful() {
                showMainView();
            }
        }));
    } else {
        showMainView();
    }
}
 
开发者ID:vaadin,项目名称:archetype-application-example,代码行数:17,代码来源:MockAppUI.java

示例11: buildLoginForm

import com.vaadin.server.Responsive; //导入方法依赖的package包/类
private Component buildLoginForm() {
    final VerticalLayout loginPanel = new VerticalLayout();
    loginPanel.setSizeUndefined();
    loginPanel.setSpacing(true);
    Responsive.makeResponsive(loginPanel);
    loginPanel.addStyleName("login-panel");

    loginPanel.addComponent(buildLabels());
    loginPanel.addComponent(buildFields());
    
    CheckBox rememberMe = new CheckBox("Remember me", true);
    rememberMe.setTabIndex(3);
    
    loginPanel.addComponent(rememberMe);
    return loginPanel;
}
 
开发者ID:GJRTimmer,项目名称:vaadin-security-template,代码行数:17,代码来源:LoginUI.java

示例12: initLayout

import com.vaadin.server.Responsive; //导入方法依赖的package包/类
/**
 * Initialise le layout principal
 */
private void initLayout() {
	layout.setSizeFull();
	setContent(layout);

	menuLayout.setPrimaryStyleName(ValoTheme.MENU_ROOT);

	layoutWithSheet.setPrimaryStyleName(StyleConstants.VALO_CONTENT);
	layoutWithSheet.addStyleName(StyleConstants.SCROLLABLE);		
	layoutWithSheet.setSizeFull();
	
	VerticalLayout vlAll = new VerticalLayout();
	vlAll.addStyleName(StyleConstants.SCROLLABLE);
	vlAll.setSizeFull();
	
	subBarMenu.addStyleName(ValoTheme.TABSHEET_PADDED_TABBAR);
	subBarMenu.setVisible(false);
	vlAll.addComponent(subBarMenu);
	
	contentLayout.addStyleName(StyleConstants.SCROLLABLE);
	contentLayout.setSizeFull();
	vlAll.addComponent(contentLayout);
	vlAll.setExpandRatio(contentLayout, 1);
	
	layoutWithSheet.addComponent(vlAll);
	
	menuButtonLayout.addStyleName(StyleConstants.VALO_MY_MENU_MAX_WIDTH);	
	layout.setExpandRatio(layoutWithSheet, 1);

	Responsive.makeResponsive(this);
	addStyleName(ValoTheme.UI_WITH_MENU);
}
 
开发者ID:EsupPortail,项目名称:esup-ecandidat,代码行数:35,代码来源:MainUI.java

示例13: DashboardView

import com.vaadin.server.Responsive; //导入方法依赖的package包/类
public DashboardView() {
    addStyleName(ValoTheme.PANEL_BORDERLESS);
    setSizeFull();
    DashboardEventBus.register(this);

    root = new VerticalLayout();
    root.setSizeFull();
    root.setMargin(true);
    root.addStyleName("dashboard-view");
    setContent(root);
    Responsive.makeResponsive(root);

    root.addComponent(buildHeader());

    root.addComponent(buildSparklines());

    Component content = buildContent();
    root.addComponent(content);
    root.setExpandRatio(content, 1);

    // All the open sub-windows should be closed whenever the root layout
    // gets clicked.
    root.addLayoutClickListener(new LayoutClickListener() {
        @Override
        public void layoutClick(final LayoutClickEvent event) {
            DashboardEventBus.post(new CloseOpenWindowsEvent());
        }
    });
}
 
开发者ID:imotSpot,项目名称:imotSpot,代码行数:30,代码来源:DashboardView.java

示例14: buildSparklines

import com.vaadin.server.Responsive; //导入方法依赖的package包/类
private Component buildSparklines() {
    CssLayout sparks = new CssLayout();
    sparks.addStyleName("sparks");
    sparks.setWidth("100%");
    Responsive.makeResponsive(sparks);

    return sparks;
}
 
开发者ID:imotSpot,项目名称:imotSpot,代码行数:9,代码来源:DashboardView.java

示例15: buildContent

import com.vaadin.server.Responsive; //导入方法依赖的package包/类
private Component buildContent() {
        dashboardPanels = new CssLayout();
        dashboardPanels.addStyleName("dashboard-panels");
        Responsive.makeResponsive(dashboardPanels);

        googleMap = new GoogleMap(null, null, null);
        googleMap.setCenter(centerSofia);
        googleMap.setSizeFull();
        googleMap.setImmediate(true);
        googleMap.setZoom(13);

        dashboardPanels.addComponent(googleMap);
        // zopim chat
        String script = "window.$zopim||(function(d,s){var z=$zopim=function(c){\n" +
                "z._.push(c)},$=z.s=\n" +
                "d.createElement(s),e=d.getElementsByTagName(s)[0];z.set=function(o){z.set.\n" +
                "_.push(o)};z._=[];z.set._=[];$.async=!0;$.setAttribute('charset','utf-8');\n" +
                "$.src='//v2.zopim.com/?3pEeNjxc1QHeNdL8pg6BPqFOTO6wReIb';z.t=+new Date;$.\n" +
                "type='text/javascript';e.parentNode.insertBefore($,e)})(document,'script');\n";
        JavaScript.getCurrent().execute(script);

//        dashboardPanels.addComponent(buildTopGrossingMovies());
//        dashboardPanels.addComponent(buildNotes());
//        dashboardPanels.addComponent(buildTop10TitlesByRevenue());
//        dashboardPanels.addComponent(buildPopularMovies());

        return dashboardPanels;
    }
 
开发者ID:imotSpot,项目名称:imotSpot,代码行数:29,代码来源:DashboardView.java


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