當前位置: 首頁>>代碼示例>>Java>>正文


Java TabSheet.addTab方法代碼示例

本文整理匯總了Java中com.vaadin.ui.TabSheet.addTab方法的典型用法代碼示例。如果您正苦於以下問題:Java TabSheet.addTab方法的具體用法?Java TabSheet.addTab怎麽用?Java TabSheet.addTab使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.vaadin.ui.TabSheet的用法示例。


在下文中一共展示了TabSheet.addTab方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: init

import com.vaadin.ui.TabSheet; //導入方法依賴的package包/類
@Override
public void init() {
    if (dataCollectionDao == null)
        throw new RuntimeException("dataCollectionDao cannot be null.");

    setTheme(Runo.THEME_NAME);

    Logger logger = new SimpleLogger();
    SnmpCollectionPanel scAdmin = new SnmpCollectionPanel(dataCollectionDao, logger);
    DataCollectionGroupAdminPanel dcgAdmin = new DataCollectionGroupAdminPanel(dataCollectionDao);

    TabSheet tabs = new TabSheet();
    tabs.setStyleName(Runo.TABSHEET_SMALL);
    tabs.setSizeFull();
    tabs.addTab(scAdmin);
    tabs.addTab(dcgAdmin);

    final Window mainWindow = new Window("SNMP Collection Administration", tabs);
    setMainWindow(mainWindow);
}
 
開發者ID:qoswork,項目名稱:opennmszh,代碼行數:21,代碼來源:SnmpCollectionAdminApplication.java

示例2: buildTabSheet

import com.vaadin.ui.TabSheet; //導入方法依賴的package包/類
@AutoGenerated
private TabSheet buildTabSheet() {
	// common part: create layout
	tabSheet = new TabSheet();
	tabSheet.setImmediate(true);
	tabSheet.setWidth("100.0%");
	tabSheet.setHeight("-1px");
	
	// verticalLayout_2
	verticalLayout_2 = buildVerticalLayout_2();
	tabSheet.addTab(verticalLayout_2, "Dirección", null);
	
	// verticalLayout_3
	verticalLayout_3 = buildVerticalLayout_3();
	tabSheet.addTab(verticalLayout_3, "Coordenadas", null);
	
	return tabSheet;
}
 
開發者ID:thingtrack,項目名稱:konekti,代碼行數:19,代碼來源:LocationField.java

示例3: createTabSheet

import com.vaadin.ui.TabSheet; //導入方法依賴的package包/類
private TabSheet createTabSheet(boolean lightTheme, boolean captions, boolean icons) {
    TabSheet tabs = new TabSheet();
    tabs.setPrimaryStyleName(lightTheme ? "md-tabsheet-light" : "md-tabsheet-dark");
    tabs.addStyleName("card" + " " + Paddings.Horizontal.LARGE);
    if (!lightTheme) {
        tabs.addStyleName(MaterialColor.BLUE_500.getBackgroundColorStyle());
    }

    if (captions && icons) {
        tabs.addTab(new CssLayout(), "Item One", MaterialIcons.PHONE);
        tabs.addTab(new CssLayout(), "Item Two", MaterialIcons.FAVORITE);
        tabs.addTab(new CssLayout(), "Item Three", MaterialIcons.NEAR_ME);
    } else if (captions) {
        tabs.addTab(new CssLayout(), "Item One");
        tabs.addTab(new CssLayout(), "Item Two");
        tabs.addTab(new CssLayout(), "Item Three");
    } else if (icons) {
        tabs.addTab(new CssLayout(), null, MaterialIcons.PHONE);
        tabs.addTab(new CssLayout(), null, MaterialIcons.FAVORITE);
        tabs.addTab(new CssLayout(), null, MaterialIcons.NEAR_ME);
    }

    return tabs;
}
 
開發者ID:vaadin,項目名稱:material-theme-fw8,代碼行數:25,代碼來源:TabsView.java

示例4: createGroupDefinitionTabs

import com.vaadin.ui.TabSheet; //導入方法依賴的package包/類
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;
}
 
開發者ID:eclipse,項目名稱:hawkbit,代碼行數:20,代碼來源:AddUpdateRolloutWindowLayout.java

示例5: startDemoApp

import com.vaadin.ui.TabSheet; //導入方法依賴的package包/類
private void startDemoApp() {
    layout.setSizeFull();
    layout.setMargin(true);
    layout.setSpacing(true);
    addHeader();


    TabSheet tabSheet = new TabSheet();
    tabSheet.setSizeFull();
    layout.addComponent(tabSheet);

    tabSheet.addTab(new ClassicGridTab(),"Classic Grid");
    tabSheet.addTab(new ClassicGridWithDecoratorTab(),"Classic Grid with Decorator");
    tabSheet.addTab(new ComponentGridTab(), "Typed Component Grid");
    tabSheet.addTab(new NotABeanGridWithDecoratorTab(), "Not a bean grid");
    tabSheet.addTab(new ClassicGridWithStaticContainerTab(), "Classic Grid with Static Container");

    layout.setExpandRatio(tabSheet, 1.0f);
    setContent(layout);

}
 
開發者ID:datenhahn,項目名稱:componentrenderer,代碼行數:22,代碼來源:ComponentRendererDemoUI.java

示例6: wrapByUriFragment

import com.vaadin.ui.TabSheet; //導入方法依賴的package包/類
/**
 * 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;
}
 
開發者ID:tltv,項目名稱:gantt,代碼行數:33,代碼來源:UriFragmentWrapperFactory.java

示例7: createEditFields

import com.vaadin.ui.TabSheet; //導入方法依賴的package包/類
/**
 * {@inheritDoc}
 */
@Override
protected ComponentContainer createEditFields() {

    final TabSheet tab = new TabSheet();
    tab.addTab(createMainForm(), "Данные продажи");

    ////////////////////////////////////////////////////////////////////////////
    if (lookup(UserManagementService.class).isPermitPrivateComments()) {
        privateCommentsField = new PrivateCommentsField<>(SalePrivateComment.class);
        privateCommentsField.addValueChangeListener(forceModified);
        tab.addTab(privateCommentsField, "Закрытые комментарии");
    }

    return tab;
}
 
開發者ID:ExtaSoft,項目名稱:extacrm,代碼行數:19,代碼來源:SaleEditForm.java

示例8: FilterMenu

import com.vaadin.ui.TabSheet; //導入方法依賴的package包/類
public FilterMenu(IIndexCallback callback){
	
    //create the menu
    HorizontalLayout menu = new HorizontalLayout();
    menu.setWidth("100%");        
    
    TabSheet filterMenu = new TabSheet();
    
    //Add filter menus
    tracksView = new TracksView();
    artistView = new ArtistView();
    albumView = new AlbumView();
    
    filterMenu.addTab(tracksView, Messages.getString("tracks")); //$NON-NLS-1$
    filterMenu.addTab(artistView, Messages.getString("artists")); //$NON-NLS-1$
    filterMenu.addTab(albumView, Messages.getString("albums")); //$NON-NLS-1$
    //filterMenu.addTab(new PlaylistView(), "Playlists");
    menu.addComponent(filterMenu);
    menu.setComponentAlignment(filterMenu, Alignment.MIDDLE_CENTER);
    
    setCompositionRoot(menu);
    setSizeFull();
}
 
開發者ID:mwolski89,項目名稱:own-music-cloud,代碼行數:24,代碼來源:FilterMenu.java

示例9: ImportExportView

import com.vaadin.ui.TabSheet; //導入方法依賴的package包/類
public ImportExportView() {
    super("Import / Export");
    TabSheet mainLayout = new TabSheet();
    mainLayout.setWidth(100, PERCENTAGE);
    mainLayout.addTab(new HttpSourceImportExport(), "HTTP Sources");
    mainLayout.addTab(new HttpSourceTestImportExport(), "HTTP Source Tests");
    mainLayout.addTab(new NamedQueryImportExport(), "Named Queries");
    addComponent(mainLayout);
}
 
開發者ID:tokenmill,項目名稱:crawling-framework,代碼行數:10,代碼來源:ImportExportView.java

示例10: init

import com.vaadin.ui.TabSheet; //導入方法依賴的package包/類
/**
 * Initialise la vue
 */
@PostConstruct
public void init() {		
	
	/* Style */
	setSizeFull();
	setSpacing(true);		
	
	/*Layout des mails*/
	VerticalLayout layoutMailModel = new VerticalLayout();
	layoutMailModel.setSizeFull();
	layoutMailModel.setSpacing(true);
	layoutMailModel.setMargin(true);
	
	/*Layout des typ decision*/
	VerticalLayout layoutMailTypeDec = new VerticalLayout();
	layoutMailTypeDec.setSizeFull();
	layoutMailTypeDec.setSpacing(true);
	layoutMailTypeDec.setMargin(true);
	
	/*Le layout a onglet*/
	TabSheet sheet = new TabSheet();
	sheet.setImmediate(true);
	sheet.addStyleName(ValoTheme.TABSHEET_PADDED_TABBAR);
	addComponent(sheet);
	sheet.setSizeFull();
	
	sheet.addTab(layoutMailModel, applicationContext.getMessage("mail.model.title", null, UI.getCurrent().getLocale()),FontAwesome.ENVELOPE_O);
	sheet.addTab(layoutMailTypeDec, applicationContext.getMessage("mail.typdec.title", null, UI.getCurrent().getLocale()),FontAwesome.ENVELOPE);
	
	/*Populate le layoutMailModel*/
	populateMailModelLayout(layoutMailModel);
	
	/*Populate le layoutMailModel*/
	populateMailTypeDecLayout(layoutMailTypeDec);
	
	
	/* Inscrit la vue aux mises à jour de mail */
	mailEntityPusher.registerEntityPushListener(this);
}
 
開發者ID:EsupPortail,項目名稱:esup-ecandidat,代碼行數:43,代碼來源:ScolMailView.java

示例11: init

import com.vaadin.ui.TabSheet; //導入方法依賴的package包/類
@Override
protected void init(VaadinRequest request) {

    Label label = new Label("<h1>Demo of the Graphviz component</h1>",
            ContentMode.HTML);
    label.setHeightUndefined();

    // Show it in the middle of the screen
    final VerticalLayout layout = new VerticalLayout();
    layout.setStyleName("demoContentLayout");
    layout.setSizeFull();
    TabSheet tabs = new TabSheet();
    tabs.setSizeFull();

    layout.addComponent(label);
    layout.addComponent(tabs);
    layout.setMargin(true);
    layout.setExpandRatio(tabs, 1);
    setContent(layout);

    tabs.addTab(new SimpleDemoView(), "Simple demo");
    tabs.addTab(new MoreComplexDemoView(), "More complex demo");
    tabs.addTab(new UMLDemoView(), "An UML demo");
    tabs.addTab(new InteractiveDemoView(), "Interactive demo");
    tabs.addTab(new SubgraphDemoView(), "Subgraph demo");

}
 
開發者ID:pontusbostrom,項目名稱:VaadinGraphvizComponent,代碼行數:28,代碼來源:DemoUI.java

示例12: postInit

import com.vaadin.ui.TabSheet; //導入方法依賴的package包/類
@PostConstruct
private void postInit() {
    TabSheet tabSheet = new TabSheet();
    tabSheet.setStyleName("admin-screen");
    tabSheet.addTab(createServerSettings(), "Server Settings");
    tabSheet.addTab(createUserManagement(), "User Management");
    tabSheet.addTab(batchJobsLayout, "Batch Jobs");
    this.setCompositionRoot(tabSheet);
}
 
開發者ID:felixhusse,項目名稱:bookery,代碼行數:10,代碼來源:AdminView.java

示例13: init

import com.vaadin.ui.TabSheet; //導入方法依賴的package包/類
@Override
protected void init(VaadinRequest request) {

    TabSheet tabSheet = new TabSheet();
    tabSheet.addTab(new CheckBoxDemo(), "Checkbox renderer");
    tabSheet.addTab(new DateTextDemo(), "DateField and TextField renderers");
    tabSheet.addTab(new SparklineDemo(), "Sparkline renderer");
    tabSheet.setSizeFull();
    setContent(tabSheet);
	
}
 
開發者ID:vaadin,項目名稱:grid-renderers-collection-addon,代碼行數:12,代碼來源:DemoUI.java

示例14: init

import com.vaadin.ui.TabSheet; //導入方法依賴的package包/類
@Override
protected void init(VaadinRequest request) {
	TabSheet tabs = new TabSheet();
	tabs.setSizeFull();
	setContent(tabs);
	
	tabs.addTab(getSimpleExamle(), "Basic functionality");
	tabs.addTab(getAnotherExample(), "Sequential add");
}
 
開發者ID:johannest,項目名稱:border-layout,代碼行數:10,代碼來源:BorderlayoutUI.java

示例15: init

import com.vaadin.ui.TabSheet; //導入方法依賴的package包/類
private void init() {

        setSizeFull();
        setMargin(true);
        setSpacing(true);

        TabSheet sheet = new TabSheet();
        sheet.setSizeFull();
        sheet.addTab(createGrid(), "Tab 1");
        sheet.addTab(createGrid(), "Tab 2");

        addComponent(sheet);
        setExpandRatio(sheet, 1.0f);

    }
 
開發者ID:datenhahn,項目名稱:componentrenderer,代碼行數:16,代碼來源:TestbenchCachingGridTab.java


注:本文中的com.vaadin.ui.TabSheet.addTab方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。