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


Java CssLayout.setPrimaryStyleName方法代码示例

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


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

示例1: init

import com.vaadin.ui.CssLayout; //导入方法依赖的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: initLayout

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
protected void initLayout() {
    container = new CssLayout();
    container.setSizeFull();
    container.setPrimaryStyleName(CURRENCYFIELD_LAYOUT_STYLENAME);

    container.addComponent(currencyLabel);

    if (useWrapper()) {
        ie9InputWrapper = new CssLayout(textField);
        ie9InputWrapper.setSizeFull();
        ie9InputWrapper.setPrimaryStyleName(IE9_INPUT_WRAP_STYLENAME);

        container.addComponent(ie9InputWrapper);
    } else {
        container.addComponent(textField);
    }

    setFocusDelegate(textField);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:20,代码来源:CubaCurrencyField.java

示例3: initComponent

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
public void initComponent(CubaTree component) {
    componentComposition = new CssLayout();
    componentComposition.setPrimaryStyleName("c-tree-composition");
    componentComposition.setWidthUndefined();
    componentComposition.addComponent(component);

    component.setSizeFull();

    component.addShortcutListener(new ShortcutListener("tableEnter", com.vaadin.event.ShortcutAction.KeyCode.ENTER, null) {
        @Override
        public void handleAction(Object sender, Object target) {
            if (target == WebAbstractTree.this.component) {
                if (enterPressAction != null) {
                    enterPressAction.actionPerform(WebAbstractTree.this);
                } else {
                    handleClickAction();
                }
            }
        }
    });
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:22,代码来源:WebAbstractTree.java

示例4: postInit

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
@PostConstruct
private void postInit() {
    setSpacing(false);
    setMargin(false);
    setSizeFull();

    content = new CssLayout();
    content.setPrimaryStyleName("valo-content");
    content.addStyleName("v-scrollable");
    content.setWidth(100, Unit.PERCENTAGE);
    
    addComponents(appHeader,content);
    expand(content);
    addAttachListener(new AttachListener() {

        @Override
        public void attach(AttachEvent event) {
            Responsive.makeResponsive(getUI());
        }
    });
}
 
开发者ID:felixhusse,项目名称:bookery,代码行数:22,代码来源:AppLayout.java

示例5: WebFtsField

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
public WebFtsField() {
    component = new CssLayout();
    component.setPrimaryStyleName(FTS_FIELD_STYLENAME);

    ComponentsFactory cf = AppBeans.get(ComponentsFactory.NAME);
    com.haulmont.cuba.gui.components.TextField searchFieldComponent =
            cf.createComponent(com.haulmont.cuba.gui.components.TextField.class);
    searchField = (TextField) WebComponentsHelper.unwrap(searchFieldComponent);
    searchField.setStyleName("c-ftsfield-text");

    AppUI ui = AppUI.getCurrent();
    if (ui.isTestMode()) {
        searchField.setCubaId("ftsField");
        searchField.setId(ui.getTestIdManager().reserveId("ftsField"));
    }
    searchField.addShortcutListener(new ShortcutListener("fts", com.vaadin.event.ShortcutAction.KeyCode.ENTER, null) {
        @Override
        public void handleAction(Object sender, Object target) {
            openSearchWindow();
        }
    });

    searchBtn = new CubaButton();
    searchBtn.setStyleName("c-ftsfield-button");
    searchBtn.setIcon(WebComponentsHelper.getIcon("app/images/fts-button.png"));
    searchBtn.addClickListener(
            (Button.ClickListener) event -> openSearchWindow()
    );

    component.addComponent(searchField);
    component.addComponent(searchBtn);

    adjustHeight();
    adjustWidth();
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:36,代码来源:WebFtsField.java

示例6: WebAppWorkArea

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
public WebAppWorkArea() {
    component = new CssLayout();
    component.setPrimaryStyleName(WORKAREA_STYLENAME);
    component.addStyleName(MODE_TABBED_STYLENAME);
    component.addStyleName(STATE_INITIAL_STYLENAME);

    ComponentsFactory cf = AppBeans.get(ComponentsFactory.NAME);
    setInitialLayout(cf.createComponent(VBoxLayout.class));

    tabbedContainer = createTabbedModeContainer();

    UserSettingsTools userSettingsTools = AppBeans.get(UserSettingsTools.NAME);
    setMode(userSettingsTools.loadAppWindowMode());
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:15,代码来源:WebAppWorkArea.java

示例7: createLinksLayout

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
protected Layout createLinksLayout() {
    CssLayout linksLayout = new CssLayout();
    linksLayout.setPrimaryStyleName("c-breadcrumbs");
    return linksLayout;
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:6,代码来源:WindowBreadCrumbs.java

示例8: createLogoLayout

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
protected Layout createLogoLayout() {
    CssLayout logoLayout = new CssLayout();
    logoLayout.setPrimaryStyleName("c-breadcrumbs-logo");
    return logoLayout;
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:6,代码来源:WindowBreadCrumbs.java

示例9: Menu

import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
public Menu(Navigator navigator) {
    this.navigator = navigator;
    setPrimaryStyleName(ValoTheme.MENU_ROOT);
    menuPart = new CssLayout();
    menuPart.addStyleName(ValoTheme.MENU_PART);

    // header of the menu
    final HorizontalLayout top = new HorizontalLayout();
    top.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT);
    top.addStyleName(ValoTheme.MENU_TITLE);
    top.setSpacing(true);
    Label title = new Label("My CRUD");
    title.addStyleName(ValoTheme.LABEL_H3);
    title.setSizeUndefined();
    Image image = new Image(null, new ThemeResource("img/table-logo.png"));
    image.setStyleName("logo");
    top.addComponent(image);
    top.addComponent(title);
    menuPart.addComponent(top);

    // logout menu item
    MenuBar logoutMenu = new MenuBar();
    logoutMenu.addItem("Logout", FontAwesome.SIGN_OUT, new Command() {

        @Override
        public void menuSelected(MenuItem selectedItem) {
            VaadinSession.getCurrent().getSession().invalidate();
            Page.getCurrent().reload();
        }
    });

    logoutMenu.addStyleName("user-menu");
    menuPart.addComponent(logoutMenu);

    // button for toggling the visibility of the menu when on a small screen
    final Button showMenu = new Button("Menu", new ClickListener() {
        @Override
        public void buttonClick(final ClickEvent event) {
            if (menuPart.getStyleName().contains(VALO_MENU_VISIBLE)) {
                menuPart.removeStyleName(VALO_MENU_VISIBLE);
            } else {
                menuPart.addStyleName(VALO_MENU_VISIBLE);
            }
        }
    });
    showMenu.addStyleName(ValoTheme.BUTTON_PRIMARY);
    showMenu.addStyleName(ValoTheme.BUTTON_SMALL);
    showMenu.addStyleName(VALO_MENU_TOGGLE);
    showMenu.setIcon(FontAwesome.NAVICON);
    menuPart.addComponent(showMenu);

    // container for the navigation buttons, which are added by addView()
    menuItemsLayout = new CssLayout();
    menuItemsLayout.setPrimaryStyleName(VALO_MENUITEMS);
    menuPart.addComponent(menuItemsLayout);

    addComponent(menuPart);
}
 
开发者ID:jvalenciag,项目名称:VaadinSpringShiroMongoDB,代码行数:59,代码来源:Menu.java


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