本文整理汇总了Java中com.vaadin.ui.CssLayout.setSizeFull方法的典型用法代码示例。如果您正苦于以下问题:Java CssLayout.setSizeFull方法的具体用法?Java CssLayout.setSizeFull怎么用?Java CssLayout.setSizeFull使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vaadin.ui.CssLayout
的用法示例。
在下文中一共展示了CssLayout.setSizeFull方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildSubmenu
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
private void buildSubmenu(CssLayout submenu, Set<OSCViewProvider<?>> views) {
for (final OSCViewProvider<?> view : views) {
String viewName = view.getName();
NativeButton b = new NativeButton(viewName);
// selecting default menu button
if (view.getName().equals(VIEW_FRAGMENT_ALERTS)) {
b.addStyleName("selected");
}
b.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
clearMenuSelection();
event.getButton().addStyleName("selected");
if (!MainUI.this.nav.getState().equals(viewName)) {
MainUI.this.nav.navigateTo(viewName);
}
}
});
submenu.setSizeFull();
submenu.addComponent(b);
}
}
示例2: 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();
}
示例3: init
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
@PostConstruct
void init() {
Label header = new Label("Control Panel");
header.setStyleName(ValoTheme.LABEL_H1);
addComponent(header);
dashboard = new CssLayout();
dashboard.setSizeFull();
widgetMap = new HashMap<>();
panelMap = new HashMap<>();
generateDashboard();
addComponent(dashboard);
ui.setPollInterval(2000);
ui.addPollListener(event -> {
generateDashboard();
});
}
示例4: 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);
}
示例5: MainScreen
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
public MainScreen(MyUI ui) {
setStyleName("main-screen");
CssLayout viewContainer = new CssLayout();
viewContainer.addStyleName("valo-content");
viewContainer.setSizeFull();
//final Navigator navigator = new Navigator(ui, viewContainer);
final Navigator navigator = new DiscoveryNavigator(ui, viewContainer);
navigator.setErrorView(ErrorView.class);
menu = new Menu(navigator);
menu.addView(new SampleCrudView(), SampleCrudView.VIEW_NAME,
SampleCrudView.VIEW_NAME, FontAwesome.EDIT);
menu.addView(new AboutView(), AboutView.VIEW_NAME, AboutView.VIEW_NAME,
FontAwesome.INFO_CIRCLE);
navigator.addViewChangeListener(viewChangeListener);
addComponent(menu);
addComponent(viewContainer);
setExpandRatio(viewContainer, 1);
setSizeFull();
}
示例6: init
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
@Override
protected void init(VaadinRequest request) {
final VerticalLayout mainLayout = new VerticalLayout();
HorizontalLayout horizontalLayout = new HorizontalLayout();
CssLayout viewLayout = new CssLayout();
Page.getCurrent().setTitle("Vaadin Demo");
mainLayout.setSizeFull();
viewLayout.setSizeFull();
mainLayout.setMargin(true);
setContent(mainLayout);
mainLayout.addComponent(horizontalLayout);
mainLayout.addComponent(viewLayout);
mainLayout.setExpandRatio(viewLayout, 1f);
Navigator navigator = new Navigator(this, viewLayout);
setNavigator(navigator);
setupHeader(horizontalLayout);
Map<String, Class<? extends MyView>> myViews = getViewProvider();
navigator.addView("", new HomeView(myViews.keySet()));
navigator.addProvider(new CachedViewProvider(myViews));
}
示例7: DetailPanel
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
public DetailPanel() {
setSizeFull();
addStyleName(ExplorerLayout.STYLE_DETAIL_PANEL);
setMargin(true);
CssLayout cssLayout = new CssLayout(); // Needed for rounded corners
cssLayout.addStyleName(ExplorerLayout.STYLE_DETAIL_PANEL);
cssLayout.setSizeFull();
super.addComponent(cssLayout);
mainPanel = new Panel();
mainPanel.addStyleName(Reindeer.PANEL_LIGHT);
mainPanel.setSizeFull();
cssLayout.addComponent(mainPanel);
// Use default layout
VerticalLayout verticalLayout = new VerticalLayout();
verticalLayout.setWidth(100, UNITS_PERCENTAGE);
verticalLayout.setMargin(true);
mainPanel.setContent(verticalLayout);
}
示例8: MainScreen
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
public MainScreen(MockAppUI ui) {
setStyleName("main-screen");
CssLayout viewContainer = new CssLayout();
viewContainer.addStyleName("valo-content");
viewContainer.setSizeFull();
final Navigator navigator = new Navigator(ui, viewContainer);
navigator.setErrorView(ErrorView.class);
menu = new Menu(navigator);
menu.addView(new SampleCrudView(), SampleCrudView.VIEW_NAME,
SampleCrudView.VIEW_NAME, FontAwesome.EDIT);
menu.addView(new AboutView(), AboutView.VIEW_NAME, AboutView.VIEW_NAME,
FontAwesome.INFO_CIRCLE);
navigator.addViewChangeListener(viewChangeListener);
addComponent(menu);
addComponent(viewContainer);
setExpandRatio(viewContainer, 1);
setSizeFull();
}
示例9: MainScreen
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
@Autowired
public MainScreen(final VaadinSecurity vaadinSecurity, SpringViewProvider springViewProvider, ValoSideBar sideBar) {
HorizontalLayout layout = new HorizontalLayout();
layout.setSizeFull();
setCompositionRoot(layout);
setSizeFull();
// By adding a security item filter, only views that are accessible to the user will show up in the side bar.
sideBar.setItemFilter(new VaadinSecurityItemFilter(vaadinSecurity));
layout.addComponent(sideBar);
CssLayout viewContainer = new CssLayout();
viewContainer.setSizeFull();
layout.addComponent(viewContainer);
layout.setExpandRatio(viewContainer, 1f);
Navigator navigator = new Navigator(UI.getCurrent(), viewContainer);
// Without an AccessDeniedView, the view provider would act like the restricted views did not exist at all.
springViewProvider.setAccessDeniedViewClass(AccessDeniedView.class);
navigator.addProvider(springViewProvider);
navigator.setErrorView(ErrorView.class);
navigator.navigateTo(navigator.getState());
}
示例10: AttachmentPreviewView
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
public AttachmentPreviewView() {
CssLayout imgWrap = new CssLayout();
imgWrap.setStyleName("image-wrap");
imgWrap.setSizeFull();
this.setStyleName("attachment-preview-view");
this.setSizeFull();
this.addComponent(imgWrap, "top: 0px left: 0px; z-index: 0;");
backBtn = new NavigationButton(UserUIContext.getMessage(GenericI18Enum.M_BUTTON_BACK));
backBtn.setStyleName("back-btn");
this.addComponent(backBtn, "top: 15px; left: 15px; z-index: 1;");
previewImage = new Image();
imgWrap.addComponent(previewImage);
}
示例11: mainLayout
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
private HorizontalLayout mainLayout() {
menuLayout = new VerticalLayout();
menuLayout.setStyleName(ValoTheme.MENU_ROOT);
menuLayout.setWidth(100, Unit.PERCENTAGE);
menuLayout.setHeight(100, Unit.PERCENTAGE);
menuLayout.setSizeFull();
final CssLayout menuButtons = new CssLayout();
menuButtons.setSizeFull();
menuButtons.addStyleName(ValoTheme.MENU_PART);
menuButtons.addStyleName(ValoTheme.MENU_PART_LARGE_ICONS);
menuButtons.addComponents(
createMenuButton(VaadinIcons.VIEWPORT, "Dashboard", DashboardComponent::new),
createMenuButton(VaadinIcons.SITEMAP, "Sitemap", DashboardComponent::new),
createMenuButton(VaadinIcons.CALC_BOOK, "Calculate", CalcComponent::new),
createMenuButton(VaadinIcons.NOTEBOOK, "Write", WriteComponent::new),
createMenuButtonForNotification(VaadinIcons.EXIT, "Logout", "You want to go?")
);
menuLayout.addComponent(menuButtons);
contentLayout = new CssLayout(new Label("Content"));
contentLayout.setSizeFull();
final HorizontalLayout layout = new HorizontalLayout();
layout.setSizeFull();
layout.addComponent(menuLayout);
layout.addComponent(contentLayout);
layout.setExpandRatio(menuLayout, 0.20f);
layout.setExpandRatio(contentLayout, 0.80f);
return layout;
}
示例12: createComponent
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
@Override
protected Component createComponent() {
final CssLayout menuButtons = new CssLayout();
menuButtons.setSizeFull();
menuButtons.addStyleName(ValoTheme.MENU_PART);
menuButtons.addStyleName(ValoTheme.MENU_PART_LARGE_ICONS);
menuButtons.addComponents(getComponents());
return menuButtons;
}
示例13: createComponent
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
@Override
protected Component createComponent() {
final CssLayout contentLayout = new CssLayout(new Label("Content"));
contentLayout.setSizeFull();
contentLayout.setId(cssLayoutID().apply(MainUI.class, "Content"));
final VerticalLayout menuLayout = new VerticalLayout();
menuLayout.setId(verticalLayoutID().apply(MainUI.class, "MenuLayout"));
menuLayout.setStyleName(ValoTheme.MENU_ROOT);
menuLayout.setWidth(100, Unit.PERCENTAGE);
menuLayout.setHeight(100, Unit.PERCENTAGE);
menuLayout.setSizeFull();
// to hard bound
menuLayout.addComponent(new MenuComponent(contentLayout));
final HorizontalLayout mainLayout = new HorizontalLayout();
mainLayout.setId(horizontalLayoutID().apply(MainUI.class, "MainLayout"));
mainLayout.setSizeFull();
mainLayout.addComponent(menuLayout);
mainLayout.addComponent(contentLayout);
mainLayout.setExpandRatio(menuLayout, 0.20f);
mainLayout.setExpandRatio(contentLayout, 0.80f);
return mainLayout;
}
示例14: init
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
@Override
protected void init(VaadinRequest request) {
final CssLayout root = new CssLayout();
root.setSizeFull();
setContent(root);
Navigator navigator = new Navigator(this, root);
navigator.addProvider(viewProvider);
}
示例15: createPaperItemWrapper
import com.vaadin.ui.CssLayout; //导入方法依赖的package包/类
public static CssLayout createPaperItemWrapper(Component ... content) {
CssLayout paperWrapper = new CssLayout();
applyPaperItem(paperWrapper);
paperWrapper.setSizeFull();
Arrays.stream(content).forEach(c -> paperWrapper.addComponent(c));
return paperWrapper;
}