本文整理匯總了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);
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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();
}
示例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);
}
示例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);
}
示例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");
}
示例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);
}
示例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);
}
示例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");
}
示例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);
}