Java Code Examples for com.vaadin.ui.TabSheet#addTab()
The following examples show how to use
com.vaadin.ui.TabSheet#addTab() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AddUpdateRolloutWindowLayout.java From hawkbit with Eclipse Public License 1.0 | 6 votes |
private TabSheet createGroupDefinitionTabs() { final TabSheet tabSheet = new TabSheet(); tabSheet.setId(UIComponentIdProvider.ROLLOUT_GROUPS); tabSheet.setWidth(850, Unit.PIXELS); tabSheet.setHeight(300, Unit.PIXELS); tabSheet.setStyleName(SPUIStyleDefinitions.ROLLOUT_GROUPS); final TabSheet.Tab simpleTab = tabSheet.addTab(createSimpleGroupDefinitionTab(), i18n.getMessage("caption.rollout.tabs.simple")); simpleTab.setId(UIComponentIdProvider.ROLLOUT_SIMPLE_TAB); final TabSheet.Tab advancedTab = tabSheet.addTab(defineGroupsLayout, i18n.getMessage("caption.rollout.tabs.advanced")); advancedTab.setId(UIComponentIdProvider.ROLLOUT_ADVANCED_TAB); tabSheet.addSelectedTabChangeListener(event -> validateGroups()); return tabSheet; }
Example 2
Source File: UriFragmentWrapperFactory.java From gantt with Apache License 2.0 | 6 votes |
/** * Wrap the given component into a component identified by the given uri * fragment. * <p> * 'tabsheet' wraps it to Tabsheet component. * <p> * Returns by default the component itself. * * @param uriragment * @param component * @return */ public static Component wrapByUriFragment(String uriragment, Gantt gantt) { if (uriragment == null) { return gantt; } if (uriragment.contains("tabsheet")) { TabSheet tabsheet = new TabSheet(); tabsheet.setSizeFull(); Tab tab = tabsheet.addTab(gantt); tab.setCaption("Tabsheet test"); return tabsheet; } else if (uriragment.startsWith("grid")) { return new GridGanttLayout(gantt); } else if (uriragment.startsWith("treegrid")) { return new TreeGridGanttLayout(gantt); } return gantt; }
Example 3
Source File: DemoUI.java From GridExtensionPack with Apache License 2.0 | 5 votes |
@Override protected void init(VaadinRequest request) { TabSheet tabSheet = new TabSheet(); tabSheet.addTab(new DemoContentLayout(), "main demo"); tabSheet.addTab(new SidebarMenuExtensionLayout(), "sidebar extension demo"); tabSheet.addTab(new HeaderWrapExtensionLayout(), "header wrap demo"); tabSheet.setSizeFull(); setContent(tabSheet); }
Example 4
Source File: AbstractPageModContentFactoryImpl.java From cia with Apache License 2.0 | 5 votes |
/** * Creates the page visit history. * * @param pageName * the page name * @param pageId * the page id * @param panelContent * the panel content */ protected final void createPageVisitHistory(final String pageName, final String pageId, final VerticalLayout panelContent) { final TabSheet tabsheet = new TabSheet(); tabsheet.setWidth(100, Unit.PERCENTAGE); tabsheet.setHeight(100, Unit.PERCENTAGE); panelContent.addComponent(tabsheet); panelContent.setExpandRatio(tabsheet, ContentRatio.LARGE); final HorizontalLayout tabContentPageItemRankHistory = new HorizontalLayout(); tabContentPageItemRankHistory.setWidth(100, Unit.PERCENTAGE); tabContentPageItemRankHistory.setHeight(100, Unit.PERCENTAGE); final Tab tabPageItemRankHistory = tabsheet.addTab(tabContentPageItemRankHistory); tabPageItemRankHistory.setCaption(CURRENT_PAGE_VISIT_HISTORY); adminChartDataManager.createApplicationActionEventPageElementDailySummaryChart(tabContentPageItemRankHistory, pageName, pageId); final HorizontalLayout tabContentPageModeSummary = new HorizontalLayout(); tabContentPageModeSummary.setWidth(100, Unit.PERCENTAGE); tabContentPageModeSummary.setHeight(100, Unit.PERCENTAGE); final Tab tabPageModeSummary = tabsheet.addTab(tabContentPageModeSummary); tabPageModeSummary.setCaption(GENERAL_PAGE_MODE_PAGE_VISIT); adminChartDataManager.createApplicationActionEventPageModeDailySummaryChart(tabContentPageModeSummary, pageName); }
Example 5
Source File: LoadBalancerDesc.java From primecloud-controller with GNU General Public License v2.0 | 5 votes |
@Override public void attach() { setWidth("100%"); setHeight("100%"); setCaption(ViewProperties.getCaption("panel.loadBalancerDesc")); addStyleName("loadbalancer-desc-panel"); addStyleName(Reindeer.PANEL_LIGHT); VerticalLayout layout = (VerticalLayout) getContent(); layout.setWidth("100%"); layout.setHeight("100%"); layout.setMargin(false); layout.setSpacing(false); layout.addStyleName("loadbalancer-desc-layout"); tab = new TabSheet(); tab.addStyleName(Reindeer.TABSHEET_BORDERLESS); tab.setWidth("100%"); tab.setHeight("100%"); addComponent(tab); // 基本情報 loadBalancerDescBasic = new LoadBalancerDescBasic(sender); tab.addTab(loadBalancerDescBasic, ViewProperties.getCaption("tab.loadBalancerDescBasic"), Icons.BASIC.resource()); // 詳細情報 loadBalancerDescServer = new LoadBalancerDescServer(sender); tab.addTab(loadBalancerDescServer, ViewProperties.getCaption("tab.loadBalancerDescServer"), Icons.DETAIL.resource()); tab.addListener(TabSheet.SelectedTabChangeEvent.class, this, "selectedTabChange"); }
Example 6
Source File: ServerDesc.java From primecloud-controller with GNU General Public License v2.0 | 5 votes |
@Override public void attach() { setWidth("100%"); setHeight("100%"); setCaption(ViewProperties.getCaption("panel.serverDesc")); addStyleName(Reindeer.PANEL_LIGHT); 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"); tab = new TabSheet(); tab.addStyleName(Reindeer.TABSHEET_BORDERLESS); tab.setWidth("100%"); tab.setHeight("100%"); addComponent(tab); // 基本情報タブ serverDescBasic = new ServerDescBasic(sender); tab.addTab(serverDescBasic, ViewProperties.getCaption("tab.serverDescBasic"), Icons.BASIC.resource()); // 詳細情報タブ serverDescDetail = new ServerDescDetail(); tab.addTab(serverDescDetail, ViewProperties.getCaption("tab.serverDescDetail"), Icons.DETAIL.resource()); tab.addListener(new SelectedTabChangeListener() { @Override public void selectedTabChange(SelectedTabChangeEvent event) { ServerDesc.this.selectedTabChange(event); } }); }
Example 7
Source File: ServiceDesc.java From primecloud-controller with GNU General Public License v2.0 | 5 votes |
@Override public void attach() { setWidth("100%"); setHeight("100%"); setCaption(ViewProperties.getCaption("panel.serviceDesc")); addStyleName("service-desc-panel"); addStyleName(Reindeer.PANEL_LIGHT); VerticalLayout layout = (VerticalLayout) getContent(); layout.setWidth("100%"); layout.setHeight("100%"); layout.setMargin(false); layout.setSpacing(false); layout.addStyleName("service-desc-layout"); tab = new TabSheet(); tab.addStyleName(Reindeer.TABSHEET_BORDERLESS); tab.setWidth("100%"); tab.setHeight("100%"); addComponent(tab); // 基本情報タブ serviceDescBasic = new ServiceDescBasic(sender); tab.addTab(serviceDescBasic, ViewProperties.getCaption("tab.serviceDescBasic"), Icons.BASIC.resource()); // 詳細情報タブ serviceDescDetail = new ServiceDescDetail(); tab.addTab(serviceDescDetail, ViewProperties.getCaption("tab.serviceDescDetail"), Icons.DETAIL.resource()); tab.addListener(new SelectedTabChangeListener() { @Override public void selectedTabChange(SelectedTabChangeEvent event) { ServiceDesc.this.selectedTabChange(event); } }); }
Example 8
Source File: StatView.java From chipster with MIT License | 5 votes |
public StatView(ChipsterAdminUI app) { super(app, TIMEOUT); this.addComponent(getToolbar()); this.addComponent(super.getProggressIndicator()); tabSheet = new TabSheet(); tabSheet.setSizeFull(); this.addComponent(tabSheet); this.setExpandRatio(tabSheet, 1); this.setSizeFull(); tabSheet.addTab(monthlyStats, "Monthly statistics"); tabSheet.addTab(yearlyStats, "Yearly statistics"); tabSheet.addTab(toolUsage, "Tools usage (1 year)"); tabSheet.addTab(topUsers, "Top users (1 year)"); tabSheet.addTab(toolFails, "Tool fails (1 year)"); tabSheet.addTab(moduleUsage, "Module job counts (beta)"); tabSheet.addSelectedTabChangeListener(new SelectedTabChangeListener() { @Override public void selectedTabChange(SelectedTabChangeEvent e) { update(); } }); }
Example 9
Source File: ReportView.java From chipster with MIT License | 5 votes |
public ReportView(ChipsterAdminUI app) { super(app, UPDATE_WAIT); this.addComponent(getToolbar()); this.addComponent(super.getProggressIndicator()); tabSheet = new TabSheet(); dataSource = new ReportDataSource(app.getEndpoint()); tabSheet.setSizeFull(); this.addComponent(tabSheet); this.setExpandRatio(tabSheet, 1); this.setSizeFull(); filebrokerLabel = createReportLabel("waiting for status report..."); compLabel = createReportLabel("waiting for status report..."); jobmanagerLabel = createReportLabel("waiting for status report..."); filebrokerLayout.addComponent(filebrokerLabel); tabSheet.addTab(filebrokerLayout, "Filebroker"); compLayout.addComponent(compLabel); tabSheet.addTab(compLayout, "Comp"); jobmanagerLayout.addComponent(jobmanagerLabel); tabSheet.addTab(jobmanagerLayout, "Jobmanager"); tabSheet.addSelectedTabChangeListener(new SelectedTabChangeListener() { @Override public void selectedTabChange(SelectedTabChangeEvent e) { update(); } }); }