List of usage examples for com.vaadin.ui VerticalLayout addStyleName
@Override public void addStyleName(String style)
From source file:jp.primecloud.auto.ui.ServerDesc.java
License:Open Source License
public ServerDesc() { setWidth("100%"); setHeight("100%"); setCaption(ViewProperties.getCaption("panel.serverDesc")); addStyleName(Reindeer.PANEL_LIGHT);/*from w ww .j a v a 2s.c om*/ addStyleName("server-desc-panel"); VerticalLayout layout = (VerticalLayout) getContent(); layout.setWidth("100%"); layout.setHeight("100%"); layout.setMargin(false); layout.setSpacing(false); layout.addStyleName("server-desc-layout"); tabDesc.addStyleName(Reindeer.TABSHEET_BORDERLESS); tabDesc.setWidth("100%"); tabDesc.setHeight("100%"); tabDesc.addTab(serverDescBasic, ViewProperties.getCaption("tab.serverDescBasic"), Icons.BASIC.resource()); tabDesc.addTab(serverDescDetail, ViewProperties.getCaption("tab.serverDescDetail"), Icons.DETAIL.resource()); // tabDesc.addListener(TabSheet.SelectedTabChangeEvent.class, this, "selectedTabChange"); addComponent(tabDesc); }
From source file:jp.primecloud.auto.ui.ServerDescBasic.java
License:Open Source License
public ServerDescBasic() { setHeight("100%"); addStyleName(Reindeer.PANEL_LIGHT);//from w w w . j a v a 2s . c om VerticalLayout panel = (VerticalLayout) getContent(); panel.setWidth("100%"); panel.setHeight("100%"); panel.setMargin(true); panel.setSpacing(false); panel.addStyleName("server-desc-basic"); HorizontalLayout hlPanels = new HorizontalLayout(); hlPanels.setWidth("100%"); hlPanels.setHeight("100%"); hlPanels.setMargin(true); hlPanels.setSpacing(true); hlPanels.addStyleName("server-desc-basic"); // setContent(hlPanels); left.setWidth("100%"); right.setHeight("100%"); right.setWidth("100%"); //???? Label padding = new Label(" "); padding.setWidth("7px"); padding.setHeight("99%"); padding.addStyleName("desc-padding"); Label padding2 = new Label(""); padding2.setWidth("1px"); hlPanels.addComponent(left); hlPanels.addComponent(padding); hlPanels.addComponent(padding2); hlPanels.addComponent(right); hlPanels.setExpandRatio(left, 40); hlPanels.setExpandRatio(right, 60); panel.addComponent(hlPanels); panel.setExpandRatio(hlPanels, 1.0f); }
From source file:jp.primecloud.auto.ui.ServerDescDetail.java
License:Open Source License
public ServerDescDetail() { setHeight("100%"); addStyleName(Reindeer.PANEL_LIGHT);/* ww w . ja v a2 s.c o m*/ VerticalLayout panel = (VerticalLayout) getContent(); panel.setWidth("100%"); panel.setHeight("100%"); panel.setMargin(true); panel.setSpacing(false); panel.addStyleName("server-desc-detail"); HorizontalLayout hlPanels = new HorizontalLayout(); hlPanels.setWidth("100%"); hlPanels.setHeight("100%"); hlPanels.setMargin(true); hlPanels.setSpacing(true); hlPanels.addStyleName("server-desc-detail"); // setContent(hlPanels); left.setWidth("200px"); right.setWidth("100%"); right.setHeight("100%"); hlPanels.addComponent(left); hlPanels.addComponent(right); hlPanels.setExpandRatio(right, 100); panel.addComponent(hlPanels); panel.setExpandRatio(hlPanels, 1.0f); }
From source file:jp.primecloud.auto.ui.ServerPanel.java
License:Open Source License
@Override public void attach() { setSizeFull();/*from w ww . ja va2 s . com*/ addStyleName(Reindeer.PANEL_LIGHT); VerticalLayout layout = (VerticalLayout) getContent(); layout.setSizeFull(); layout.addStyleName("server-tab"); layout.setSpacing(false); layout.setMargin(false); // ? SplitPanel splitPanel = new SplitPanel(); splitPanel.setOrientation(SplitPanel.ORIENTATION_VERTICAL); splitPanel.setSplitPosition(40); splitPanel.setSizeFull(); layout.addComponent(splitPanel); // ? VerticalLayout upperLayout = new VerticalLayout(); upperLayout.setSizeFull(); upperLayout.setSpacing(false); upperLayout.setMargin(false); serverButtonsTop = new ServerButtonsTop(sender); upperLayout.addComponent(serverButtonsTop); serverTable = new ServerTable(sender); serverTable.setContainerDataSource(new InstanceDtoContainer()); upperLayout.addComponent(serverTable); serverTable.addListener(new ValueChangeListener() { @Override public void valueChange(ValueChangeEvent event) { tableRowSelected(event); } }); serverButtonsBottom = new ServerButtonsBottom(sender); upperLayout.addComponent(serverButtonsBottom); upperLayout.setExpandRatio(serverTable, 10); splitPanel.addComponent(upperLayout); // ? serverDesc = new ServerDesc(sender); splitPanel.addComponent(serverDesc); }
From source file:jp.primecloud.auto.ui.ServiceDesc.java
License:Open Source License
public ServiceDesc() { setWidth("100%"); setHeight("100%"); setCaption(ViewProperties.getCaption("panel.serviceDesc")); addStyleName("service-desc-panel"); addStyleName(Reindeer.PANEL_LIGHT);/* w ww .j a va 2 s. c o m*/ VerticalLayout layout = (VerticalLayout) getContent(); layout.setWidth("100%"); layout.setHeight("100%"); layout.setMargin(false); layout.setSpacing(false); layout.addStyleName("service-desc-layout"); tabDesc.addStyleName(Reindeer.TABSHEET_BORDERLESS); tabDesc.setWidth("100%"); tabDesc.setHeight("100%"); tabDesc.addTab(serviceDescBasic, ViewProperties.getCaption("tab.serviceDescBasic"), Icons.BASIC.resource()); tabDesc.addTab(serviceDescDetail, ViewProperties.getCaption("tab.serviceDescDetail"), Icons.DETAIL.resource()); // tabDesc.addListener(TabSheet.SelectedTabChangeEvent.class, this, "selectedTabChange"); addComponent(tabDesc); }
From source file:jp.primecloud.auto.ui.ServicePanel.java
License:Open Source License
@Override public void attach() { setSizeFull();/*w w w . ja v a 2s . c om*/ addStyleName(Reindeer.PANEL_LIGHT); VerticalLayout layout = (VerticalLayout) getContent(); layout.setSizeFull(); layout.addStyleName("service-tab"); layout.setSpacing(false); layout.setMargin(false); // ? SplitPanel splitPanel = new SplitPanel(); splitPanel.setOrientation(SplitPanel.ORIENTATION_VERTICAL); splitPanel.setSplitPosition(40); splitPanel.setSizeFull(); layout.addComponent(splitPanel); layout.setExpandRatio(splitPanel, 10); // ? VerticalLayout upperLayout = new VerticalLayout(); upperLayout.setSizeFull(); upperLayout.setSpacing(false); upperLayout.setMargin(false); serviceButtonsTop = new ServiceButtonsTop(sender); upperLayout.addComponent(serviceButtonsTop); serviceTable = new ServiceTable(sender); serviceTable.setContainerDataSource(new ComponentDtoContainer()); upperLayout.addComponent(serviceTable); serviceTable.addListener(new ValueChangeListener() { @Override public void valueChange(ValueChangeEvent event) { tableRowSelected(event); } }); serviceButtonsBottom = new ServiceButtonsBottom(sender); upperLayout.addComponent(serviceButtonsBottom); upperLayout.setExpandRatio(serviceTable, 10); splitPanel.addComponent(upperLayout); // ? serviceDesc = new ServiceDesc(sender); splitPanel.addComponent(serviceDesc); }
From source file:module.pandabox.presentation.PandaBox.java
License:Open Source License
private Layout getSotisFrontPage() { GridSystemLayout layout = new GridSystemLayout(12); Label title = new Label( "O <strong>SOTIS</strong> o Repositrio Institucional do Instituto Superior Tcnico.", Label.CONTENT_XHTML); title.addStyleName(BennuTheme.LABEL_BIG); layout.setCell("title", 12, title); Label description = new Label( "Aqui poder encontrar artigos publicados em <a href=\"\">Revistas</a>, <a href=\"\">Conferncias</a>, <a href=\"\">Livros</a>, <a href=\"\">Manuais</a> e <a href=\"\">Outros</a>, categorizados por <a href=\"\">Unidades de Investigao</a> e <a href=\"\">Unidades Acadmicas</a>.", Label.CONTENT_XHTML); description.addStyleName(BennuTheme.LABEL_BIG); layout.setCell("description", 12, description); VerticalLayout searchPanel = new VerticalLayout(); layout.setCell("search", 2, 8, 2, searchPanel); searchPanel.addStyleName("big"); searchPanel.addStyleName("inset"); searchPanel.setMargin(true);/* w w w . ja v a2 s. com*/ searchPanel.setSpacing(true); HorizontalLayout searchForm = new HorizontalLayout(); searchPanel.addComponent(searchForm); searchForm.setSpacing(true); searchForm.setWidth("100%"); TextField searchText = new TextField(); searchForm.addComponent(searchText); searchText.setInputPrompt("Introduza o termo a pesquisar"); searchText.setWidth("100%"); Button searchSubmit = new Button("Pesquisar"); searchForm.addComponent(searchSubmit); searchSubmit.addStyleName(BennuTheme.BUTTON_DEFAULT); searchForm.setExpandRatio(searchText, 1f); Link advanced = new Link("advanced search", null); searchPanel.addComponent(advanced); Panel browseByType = new Panel("Publicaes por Tipo"); browseByType.addStyleName(BennuTheme.PANEL_LIGHT); layout.setCell("type", 4, browseByType); Panel browseByDept = new Panel("Publicaes por Departamento"); browseByDept.addStyleName(BennuTheme.PANEL_LIGHT); layout.setCell("dept", 4, browseByDept); Panel contacts = new Panel("Contactos"); contacts.addStyleName(BennuTheme.PANEL_LIGHT); layout.setCell("contacts", 4, contacts); return layout; }
From source file:nl.info.magnolia.solr.app.SolrManagementAppViewImpl.java
License:Open Source License
protected Component createSolrServerInformationSection() { FormLayout layout = new FormLayout(); Label serverInformationSectionTitle = new Label(i18n.translate("solr.app.serverInformation.label.title")); serverInformationSectionTitle.addStyleName(STYLE_SECTION_TITLE); // build and bind fields Component solrServerStatus = buildAndBind(SolrManagementSubApp.SOLR_SERVER_STATUS, i18n.translate("solr.app.serverInformation.serverStatus")); Component nrDocumentsInIndex = buildAndBind(SolrManagementSubApp.SOLR_SERVER_NUMBER_OF_DOCUMENTS, i18n.translate("solr.app.serverInformation.numberOfDocsInIndex")); Button refreshSolrServerStatusButton = new Button( i18n.translate("solr.app.serverInformation.button.refreshSolrServerStatus.caption"), event -> listener.refreshView()); refreshSolrServerStatusButton.addStyleName(STYLE_V_BUTTON_SMALLAPP); refreshSolrServerStatusButton.addStyleName(STYLE_COMMIT); VerticalLayout buttons = new VerticalLayout(); buttons.addStyleName(STYLE_BUTTONS); buttons.setSpacing(true);/*from w ww . j ava 2 s . c om*/ buttons.addComponent(refreshSolrServerStatusButton); layout.addComponent(serverInformationSectionTitle); layout.addComponent(solrServerStatus); layout.addComponent(nrDocumentsInIndex); layout.addComponent(buttons); return layout; }
From source file:nl.info.magnolia.solr.app.SolrManagementAppViewImpl.java
License:Open Source License
protected Component createSolrIndexManagementSection() { FormLayout layout = new FormLayout(); Label manageSolrSectionTitle = new Label(i18n.translate("solr.app.manageSolrIndex.label.intro")); manageSolrSectionTitle.addStyleName(STYLE_SECTION_TITLE); layout.addComponent(manageSolrSectionTitle); layout.addComponent(new Label(i18n.translate("solr.app.manageSolrIndex.label.description"))); Button clearSolrIndexButton = new Button( i18n.translate("solr.app.management.button.clearSolrIndex.caption"), event -> listener.clearSolrIndex()); clearSolrIndexButton.addStyleName(STYLE_V_BUTTON_SMALLAPP); clearSolrIndexButton.addStyleName(STYLE_COMMIT); VerticalLayout buttons = new VerticalLayout(); buttons.addStyleName(STYLE_BUTTONS); buttons.setSpacing(true);// w w w . ja v a2 s.com buttons.addComponent(clearSolrIndexButton); layout.addComponent(buttons); return layout; }
From source file:nl.info.magnolia.solr.app.SolrManagementAppViewImpl.java
License:Open Source License
protected Component createSolrCrawlerManagementSection() { FormLayout layout = new FormLayout(); Label manageSolrSectionTitle = new Label(i18n.translate("solr.app.manageSolrCrawlers.label.intro")); manageSolrSectionTitle.addStyleName(STYLE_SECTION_TITLE); layout.addComponent(manageSolrSectionTitle); Map<String, CrawlerConfig> crawlers = contentIndexerModule.getCrawlers(); if (crawlers.isEmpty()) { layout.addComponent(/*from ww w . j a va 2s . com*/ new Label(i18n.translate("solr.app.manageSolrCrawlers.noCrawlers.label.description"))); } else { layout.addComponent(new Label(i18n.translate("solr.app.manageSolrCrawlers.label.description"))); VerticalLayout buttons = new VerticalLayout(); buttons.addStyleName(STYLE_BUTTONS); buttons.setSpacing(true); // only create buttons for crawlers that have been configured and are enabled in the content-indexer module. for (Map.Entry<String, CrawlerConfig> crawler : crawlers.entrySet()) { CrawlerConfig crawlerConfig = crawler.getValue(); Button runSolrCrawlerButton = new Button( i18n.translate("solr.app.management.button.runSolrCrawler.caption") + " " + crawlerConfig.getName(), event -> listener.runSolrCrawlerCommand(crawlerConfig.getName())); runSolrCrawlerButton.addStyleName(STYLE_V_BUTTON_SMALLAPP); runSolrCrawlerButton.addStyleName(STYLE_COMMIT); buttons.addComponent(runSolrCrawlerButton); } layout.addComponent(buttons); } return layout; }