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


Java TabSheet.addStyleName方法代碼示例

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


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

示例1: 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

示例2: ScheduleView

import com.vaadin.ui.TabSheet; //導入方法依賴的package包/類
public ScheduleView() {
    setSizeFull();
    addStyleName("schedule");
    DashboardEventBus.register(this);

    TabSheet tabs = new TabSheet();
    tabs.setSizeFull();
    tabs.addStyleName(ValoTheme.TABSHEET_PADDED_TABBAR);

    tabs.addComponent(buildCalendarView());
    tabs.addComponent(buildCatalogView());

    addComponent(tabs);

    tray = buildTray();
    addComponent(tray);

    injectMovieCoverStyles();
}
 
開發者ID:mcollovati,項目名稱:vaadin-vertx-samples,代碼行數:20,代碼來源:ScheduleView.java

示例3: 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

示例4: creaSolapas

import com.vaadin.ui.TabSheet; //導入方法依賴的package包/類
private void creaSolapas(){
		log.debug("Creo las pestañas de la pagina.");
		
		parametria = new TabSheet();
		parametria.setHeight(100.0f, Unit.PERCENTAGE);
		parametria.addStyleName(ValoTheme.TABSHEET_EQUAL_WIDTH_TABS);
		parametria.addStyleName(ValoTheme.TABSHEET_PADDED_TABBAR);
/*
		reportes.addTab(parametriaRamo.getTab(), "Ramo");
		reportes.addTab(parametriaProducto.getTab(),  "Producto");
		reportes.addTab(parametriaPlan.getTab(),  "Plan");
		reportes.addTab(parametriaCobertura.getTab(),  "Cobertura");
*/
	}
 
開發者ID:damiancom,項目名稱:garantia,代碼行數:15,代碼來源:ParametriaView.java

示例5: ProfilePreferencesWindow

import com.vaadin.ui.TabSheet; //導入方法依賴的package包/類
private ProfilePreferencesWindow(final User user,
        final boolean preferencesTabOpen) {
    addStyleName("profile-window");
    setId(ID);
    Responsive.makeResponsive(this);

    setModal(true);
    setCloseShortcut(KeyCode.ESCAPE, null);
    setResizable(false);
    setClosable(false);
    setHeight(90.0f, Unit.PERCENTAGE);

    VerticalLayout content = new VerticalLayout();
    content.setSizeFull();
    content.setMargin(new MarginInfo(true, false, false, false));
    setContent(content);

    TabSheet detailsWrapper = new TabSheet();
    detailsWrapper.setSizeFull();
    detailsWrapper.addStyleName(ValoTheme.TABSHEET_PADDED_TABBAR);
    detailsWrapper.addStyleName(ValoTheme.TABSHEET_ICONS_ON_TOP);
    detailsWrapper.addStyleName(ValoTheme.TABSHEET_CENTERED_TABS);
    content.addComponent(detailsWrapper);
    content.setExpandRatio(detailsWrapper, 1f);

    detailsWrapper.addComponent(buildProfileTab());
    detailsWrapper.addComponent(buildPreferencesTab());

    if (preferencesTabOpen) {
        detailsWrapper.setSelectedTab(1);
    }

    content.addComponent(buildFooter());

    fieldGroup = new BeanFieldGroup<User>(User.class);
    fieldGroup.bindMemberFields(this);
    fieldGroup.setItemDataSource(user);
}
 
開發者ID:mcollovati,項目名稱:vaadin-vertx-samples,代碼行數:39,代碼來源:ProfilePreferencesWindow.java

示例6: attach

import com.vaadin.ui.TabSheet; //導入方法依賴的package包/類
@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");
}
 
開發者ID:primecloud-controller-org,項目名稱:primecloud-controller,代碼行數:34,代碼來源:LoadBalancerDesc.java

示例7: attach

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

示例8: attach

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

示例9: styleTabSheet

import com.vaadin.ui.TabSheet; //導入方法依賴的package包/類
public static void styleTabSheet(TabSheet tabSheet) {
    tabSheet.setSizeFull();
    tabSheet.addStyleName(ValoTheme.TABSHEET_FRAMED);
    tabSheet.addStyleName(ValoTheme.TABSHEET_COMPACT_TABBAR);
    tabSheet.addStyleName(ValoTheme.TABSHEET_PADDED_TABBAR);
}
 
開發者ID:JumpMind,項目名稱:sqlexplorer-vaadin,代碼行數:7,代碼來源:CommonUiUtils.java


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