List of usage examples for com.vaadin.ui HorizontalLayout setWidth
@Override public void setWidth(float width, Unit unit)
From source file:com.purebred.core.view.Results.java
License:Open Source License
/** * Called after Spring constructs this bean. Overriding methods should call super. *///from w ww . j a v a 2 s. co m @PostConstruct public void postConstruct() { addStyleName("p-results-component"); configureFields(displayFields); resultsTable = new ResultsTable(this); configureTable(resultsTable); VerticalLayout verticalLayout = new VerticalLayout(); setCompositionRoot(verticalLayout); crudButtons = new HorizontalLayout(); HorizontalLayout navigationLine = createNavigationLine(); if (resultsTable.getWidth() > 0) { navigationLine.setWidth(resultsTable.getWidth(), resultsTable.getWidthUnits()); } addComponent(crudButtons); addComponent(navigationLine); addComponent(resultsTable); setCustomSizeUndefined(); labelDepot.trackLabels(displayFields); }
From source file:com.rdonasco.security.application.views.ApplicationListPanelView.java
License:Apache License
@Override public void initWidget() throws WidgetInitalizeException { getAddButton().setCaption(I18NResource.localize("Add new")); getAddButton().setDescription(I18NResource.localize("Add new application")); getAddButton().setIcon(new ThemeResource(SecurityDefaultTheme.ICON_16x16_ADD)); getAddButton().setWidth(100, UNITS_PERCENTAGE); getAddButton().addStyleName(SecurityDefaultTheme.CSS_SMALL); getRefreshButton().setCaption(I18NResource.localize("Refresh")); getRefreshButton().setIcon(new ThemeResource(SecurityDefaultTheme.ICON_16x16_REFRESH)); getRefreshButton().addStyleName(SecurityDefaultTheme.CSS_SMALL); VerticalLayout content = ((VerticalLayout) getContent()); content.setMargin(true);//from w ww. jav a 2 s . c o m content.setHeight(600, UNITS_PIXELS); content.removeAllComponents(); if (null != getDataViewListTable()) { getDataViewListTable().setSizeFull(); HorizontalLayout buttonLayout = new HorizontalLayout(); buttonLayout.setSpacing(true); buttonLayout.setWidth(100F, UNITS_PERCENTAGE); buttonLayout.addComponent(getAddButton()); buttonLayout.addComponent(getRefreshButton()); buttonLayout.setExpandRatio(getAddButton(), 1); content.addComponent(buttonLayout); content.addComponent(getDataViewListTable()); content.setExpandRatio(getDataViewListTable(), 1); content.setSpacing(true); } }
From source file:com.rdonasco.security.group.views.GroupListPanelView.java
License:Apache License
@Override public void initWidget() throws WidgetInitalizeException { setCaption(I18NResource.localize("Groups")); setStyleName(SecurityDefaultTheme.CSS_PANEL_BUBBLE); VerticalLayout content = (VerticalLayout) getContent(); content.setMargin(true);/* w ww . j a v a 2 s . c om*/ content.setHeight(600, UNITS_PIXELS); content.removeAllComponents(); getGroupListTable().setSizeFull(); HorizontalLayout buttonLayout = new HorizontalLayout(); buttonLayout.setSpacing(true); buttonLayout.setWidth(100F, UNITS_PERCENTAGE); buttonLayout.addComponent(getAddGroupButton()); buttonLayout.addComponent(getRefreshButton()); buttonLayout.setExpandRatio(getAddGroupButton(), 1); content.addComponent(buttonLayout); content.addComponent(getGroupListTable()); content.setExpandRatio(getGroupListTable(), 1); content.setSpacing(true); }
From source file:com.rdonasco.security.role.views.RoleListPanelView.java
License:Apache License
@Override public void initWidget() throws WidgetInitalizeException { setCaption(I18NResource.localize("Roles")); setStyleName(SecurityDefaultTheme.CSS_PANEL_BUBBLE); VerticalLayout content = (VerticalLayout) getContent(); content.setMargin(true);//from w ww . jav a 2 s. com content.setHeight(600, UNITS_PIXELS); content.removeAllComponents(); getRoleListTable().setSizeFull(); HorizontalLayout buttonLayout = new HorizontalLayout(); buttonLayout.setSpacing(true); buttonLayout.setWidth(100F, UNITS_PERCENTAGE); buttonLayout.addComponent(addRoleButton); buttonLayout.addComponent(refreshButton); buttonLayout.setExpandRatio(addRoleButton, 1); content.addComponent(buttonLayout); content.addComponent(getRoleListTable()); content.setExpandRatio(getRoleListTable(), 1); content.setSpacing(true); }
From source file:com.rdonasco.security.user.views.UserListPanelView.java
License:Apache License
@Override public void initWidget() throws WidgetInitalizeException { getAddUserButton().setCaption(I18NResource.localize("Add new user")); getAddUserButton().setIcon(new ThemeResource(SecurityDefaultTheme.ICON_16x16_ADD)); getAddUserButton().setWidth(100, UNITS_PERCENTAGE); getAddUserButton().addStyleName(SecurityDefaultTheme.CSS_SMALL); getRefreshButton().setCaption("Refresh"); getRefreshButton().setIcon(new ThemeResource(SecurityDefaultTheme.ICON_16x16_REFRESH)); getRefreshButton().addStyleName(SecurityDefaultTheme.CSS_SMALL); VerticalLayout content = ((VerticalLayout) getContent()); content.setMargin(true);/* w ww. j av a 2 s.c o m*/ content.setHeight(600, UNITS_PIXELS); content.removeAllComponents(); if (null != getDataViewListTable()) { getDataViewListTable().setSizeFull(); HorizontalLayout buttonLayout = new HorizontalLayout(); buttonLayout.setSpacing(true); buttonLayout.setWidth(100F, UNITS_PERCENTAGE); buttonLayout.addComponent(getAddUserButton()); buttonLayout.addComponent(getRefreshButton()); buttonLayout.setExpandRatio(getAddUserButton(), 1); content.addComponent(buttonLayout); content.addComponent(getDataViewListTable()); content.setExpandRatio(getDataViewListTable(), 1); content.setSpacing(true); } }
From source file:com.wcs.wcslib.vaadin.widget.recaptcha.demo.DummyRegWithReCaptcha.java
License:Apache License
private void buildContent() { content.setMargin(true);//from w w w.j a v a 2 s .co m content.addComponent(createForm()); content.addComponent(reCaptcha); Button reconfigBtn = createCancelBtn(); Button submitBtn = new Button("Register", this); submitBtn.setClickShortcut(ShortcutAction.KeyCode.ENTER); submitBtn.addStyleName(Reindeer.BUTTON_DEFAULT); HorizontalLayout actionsLayout = new HorizontalLayout(submitBtn, reconfigBtn); actionsLayout.setSpacing(true); actionsLayout.setWidth(100, Unit.PERCENTAGE); actionsLayout.setComponentAlignment(reconfigBtn, Alignment.MIDDLE_RIGHT); content.addComponent(actionsLayout); }
From source file:cz.zcu.pia.social.network.frontend.views.ViewHome.java
/** * PostConstruct/*from www.j a v a 2s . com*/ */ @PostConstruct @Override public void postConstruct() { super.postConstruct(); postPaginator = applicationContext.getBean(ComponentPostPaginator.class); postsFilter = applicationContext.getBean(ComponentPostsFilter.class, postWrapper, postPaginator); //postsFilter.setPostPaginator(postPaginator); postPaginator.setFilter(postsFilter); addPost = new Button("+"); if (!securityHelper.isAuthenticated()) { addPost.setVisible(false); } addPost.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { addButtonFunction(event); } }); addPost.setDescription(msgs.getMessage(BUTTON_DESCRIPTION)); addPost.setWidth(25, Unit.PIXELS); HorizontalLayout addButtonWrapper = new HorizontalLayout(); addButtonWrapper.setWidth(ComponentPost.POST_WIDTH, Unit.PIXELS); addButtonWrapper.addComponent(postsFilter); addButtonWrapper.addComponent(addPost); addButtonWrapper.setComponentAlignment(addPost, Alignment.TOP_RIGHT); addButtonWrapper.setExpandRatio(postsFilter, 10); addButtonWrapper.setExpandRatio(addPost, 1); this.getContentWrapper().addComponent(addButtonWrapper); this.getContentWrapper().addComponent(postWrapper); this.getContentWrapper().addComponent(postPaginator); }
From source file:de.escidoc.admintool.view.admintask.filter.FilterView.java
License:Open Source License
private void addContent() { final HorizontalLayout hLayout = new HorizontalLayout(); hLayout.setWidth(100, UNITS_PERCENTAGE); hLayout.setHeight(100, UNITS_PERCENTAGE); final FilterResourceView filterView = new FilterResourceView(services, mainWindow, pdpRequest); filterView.init();/* w w w .ja v a 2s .c o m*/ hLayout.addComponent(filterView); cssLayout.addComponent(hLayout); }
From source file:de.escidoc.admintool.view.admintask.loadexamples.LoadExample.java
License:Open Source License
@Override public void addView() { Label text = new H2(ViewConstants.LOAD_EXAMPLES_TITLE); text.setContentMode(Label.CONTENT_XHTML); cssLayout.addComponent(text);//from w w w . jav a 2 s . c o m cssLayout.addComponent(new Ruler()); text = new Label(ViewConstants.LOAD_EXAMPLE_TEXT, Label.CONTENT_XHTML); cssLayout.addComponent(text); final HorizontalLayout hLayout = new HorizontalLayout(); hLayout.setWidth(100, UNITS_PERCENTAGE); hLayout.setHeight(100, UNITS_PERCENTAGE); final LoadExampleView filterView = new LoadExampleResourceViewImpl(mainWindow, services.getAdminService()); hLayout.addComponent(filterView); cssLayout.addComponent(hLayout); }
From source file:de.escidoc.admintool.view.admintask.repositoryinfo.RepositoryInfoMainView.java
License:Open Source License
@Override public void addView() { Label text = new H2(ViewConstants.REPOSITORY_INFORMATION_TITLE); text.setContentMode(Label.CONTENT_XHTML); cssLayout.addComponent(text);//from w w w.j av a2 s . co m cssLayout.addComponent(new Ruler()); text = new Label(ViewConstants.REPO_INFO_TEXT, Label.CONTENT_XHTML); cssLayout.addComponent(text); final HorizontalLayout hLayout = new HorizontalLayout(); hLayout.setWidth(100, UNITS_PERCENTAGE); hLayout.setHeight(100, UNITS_PERCENTAGE); final RepoInfoClickListener listener = new RepoInfoClickListener(mainWindow, services.getAdminService()); hLayout.addComponent(new RepositoryInfoView(listener)); cssLayout.addComponent(hLayout); }