本文整理汇总了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();
}
示例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);
}
示例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();
}
}
}
});
}
示例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());
}
});
}
示例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();
}
示例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());
}
示例7: createLinksLayout
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
protected Layout createLinksLayout() {
CssLayout linksLayout = new CssLayout();
linksLayout.setPrimaryStyleName("c-breadcrumbs");
return linksLayout;
}
示例8: createLogoLayout
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
protected Layout createLogoLayout() {
CssLayout logoLayout = new CssLayout();
logoLayout.setPrimaryStyleName("c-breadcrumbs-logo");
return logoLayout;
}
示例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);
}