Java 类com.vaadin.ui.TabSheet 实例源码

项目:tinypounder    文件:TinyPounderMainUI.java   
private void addExitCloseTab() {
  VerticalLayout exitLayout = new VerticalLayout();
  exitLayout.addComponentsAndExpand(new Label("We hope you had fun using the TinyPounder, it is now shutdown, " +
      "as well as all the DatasetManagers, CacheManagers, and Terracotta servers you started with it"));
  TabSheet.Tab tab = mainLayout.addTab(exitLayout, "EXIT : Close TinyPounder " + VERSION);
  tab.setStyleName("tab-absolute-right");
  mainLayout.addSelectedTabChangeListener(tabEvent -> {
    if (tabEvent.getTabSheet().getSelectedTab().equals(tab.getComponent())) {
      new Thread(() -> {
        runningServers.values().forEach(RunningServer::stop);
        consoleRefresher.cancel(true);
        SpringApplication.exit(appContext);
      }).start();
    }
  });
}
项目:material-theme-fw8    文件:TabsView.java   
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;
}
项目:vaadin-vertx-samples    文件:ScheduleView.java   
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();
}
项目:dungeonstory-java    文件:SpellChoiceForm.java   
@Override
protected Component createContent() {

    VerticalLayout layout = new VerticalLayout();

    layout.addComponent(spellSound);

    title = new Label();
    classe = new LabelField<>("Classe : ");
    classLevel = new LabelField<>("Niveau de classe : ");
    layout.addComponents(title);

    tabs = new TabSheet();

    panel = new HorizontalSplitPanel();
    panel.setSizeFull();
    panel.setCaption(Messages.getInstance().getMessage("spellStep.spell.label"));
    panel.setFirstComponent(tabs);
    layout.addComponent(panel);

    return layout;
}
项目:cuba    文件:WebWindow.java   
@Override
public void setDescription(String description) {
    this.description = description;

    if (component.isAttached()) {
        com.vaadin.ui.Window dialogWindow = asDialogWindow();
        if (dialogWindow != null) {
            dialogWindow.setDescription(description);
        } else {
            TabSheet.Tab tabWindow = asTabWindow();
            if (tabWindow != null) {
                setTabCaptionAndDescription(tabWindow);
                windowManager.getBreadCrumbs((ComponentContainer) tabWindow.getComponent()).update();
            }
        }
    }
}
项目:cuba    文件:WebWindow.java   
@Override
public void setIcon(String icon) {
    this.icon = icon;

    if (component.isAttached()) {
        com.vaadin.ui.Window dialogWindow = asDialogWindow();
        if (dialogWindow != null) {
            dialogWindow.setIcon(WebComponentsHelper.getIcon(icon));
        }

        TabSheet.Tab tabWindow = asTabWindow();
        if (tabWindow != null) {
            tabWindow.setIcon(WebComponentsHelper.getIcon(icon));
        }
    }
}
项目:cuba    文件:WebComponentsHelper.java   
/**
 * Tests if component visible and its container visible.
 *
 * @param child component
 * @return component visibility
 */
public static boolean isComponentVisible(Component child) {
    if (child.getParent() instanceof TabSheet) {
        TabSheet tabSheet = (TabSheet) child.getParent();
        TabSheet.Tab tab = tabSheet.getTab(child);
        if (!tab.isVisible()) {
            return false;
        }
    }

    if (child.getParent() instanceof CubaGroupBox) {
        // ignore groupbox content container visibility
        return isComponentVisible(child.getParent());
    }

    return child.isVisible() && (child.getParent() == null || isComponentVisible(child.getParent()));
}
项目:incubator-openaz    文件:PolicyWorkspace.java   
@AutoGenerated
private VerticalLayout buildVerticalLayoutRightPanel() {
    // common part: create layout
    verticalLayoutRightPanel = new VerticalLayout();
    verticalLayoutRightPanel.setImmediate(false);
    verticalLayoutRightPanel.setWidth("100.0%");
    verticalLayoutRightPanel.setHeight("-1px");
    verticalLayoutRightPanel.setMargin(true);
    verticalLayoutRightPanel.setSpacing(true);

    // horizontalLayoutRightToolbar
    horizontalLayoutRightToolbar = buildHorizontalLayoutRightToolbar();
    verticalLayoutRightPanel.addComponent(horizontalLayoutRightToolbar);

    // tabSheet
    tabSheet = new TabSheet();
    tabSheet.setImmediate(true);
    tabSheet.setWidth("100.0%");
    tabSheet.setHeight("-1px");
    verticalLayoutRightPanel.addComponent(tabSheet);
    verticalLayoutRightPanel.setExpandRatio(tabSheet, 1.0f);

    return verticalLayoutRightPanel;
}
项目:hybridbpm    文件:DashboardView.java   
@Override
    public void onTabClose(final TabSheet tabsheet, final Component tabContent) {
        if (tabContent instanceof DashboardTab) {
            final DashboardTab dashboardTab = (DashboardTab) tabContent;

            ConfirmDialog.show(UI.getCurrent(), Translate.getMessage("windowTitleConfirm"), "Delete tab?", Translate.getMessage("btnOK"), Translate.getMessage("btnCancel"), new ConfirmDialog.Listener() {

                @Override
                public void onClose(ConfirmDialog dialog) {
                    if (dialog.isConfirmed()) {
                        HybridbpmUI.getDashboardAPI().deleteTabDefinition(dashboardTab.getTabDefinition().getId(), true);

                        tabsheet.removeComponent(tabContent);
                        tabsheet.setSelectedTab(0);
                    } else {
//                                this.close();
                    }
                }
            });
        }
    }
项目:hybridbpm    文件:TaskListLayout.java   
@Override
public void buttonClick(final Button.ClickEvent event) {
    try {
        if (event.getButton().equals(btnAdd)) {
            addNew();
        } else if (event.getButton().equals(btnRefresh)) {
            refreshTable();
            HybridbpmUI.getBpmAPI().notifyTaskList();
        } else if (event.getButton().getData() != null && event.getButton().getData() instanceof Task) {
            Task task = (Task) event.getButton().getData();
            TabSheet.Tab tab = tabSheet.addTab(new TaskLayout(task.getId().toString(), task.getProcessModelName(), task.getTaskName(), true), task.getTaskTitle());
            tab.setClosable(true);
            tabSheet.setSelectedTab(tab);
        }
    } catch (Exception ex) {
        logger.log(Level.SEVERE, ex.getMessage(), ex);
        Notification.show("Error", ex.getMessage(), Notification.Type.ERROR_MESSAGE);
    }
}
项目:hawkbit    文件:AddUpdateRolloutWindowLayout.java   
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;
}
项目:hawkbit    文件:CommonDialogWindow.java   
private static List<AbstractField<?>> getAllComponents(final AbstractLayout abstractLayout) {
    final List<AbstractField<?>> components = new ArrayList<>();

    final Iterator<Component> iterate = abstractLayout.iterator();
    while (iterate.hasNext()) {
        final Component c = iterate.next();
        if (c instanceof AbstractLayout) {
            components.addAll(getAllComponents((AbstractLayout) c));
        }

        if (c instanceof AbstractField) {
            components.add((AbstractField<?>) c);
        }

        if (c instanceof FlexibleOptionGroupItemComponent) {
            components.add(((FlexibleOptionGroupItemComponent) c).getOwner());
        }

        if (c instanceof TabSheet) {
            final TabSheet tabSheet = (TabSheet) c;
            components.addAll(getAllComponentsFromTabSheet(tabSheet));
        }
    }
    return components;
}
项目:componentrenderer    文件:ComponentRendererDemoUI.java   
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);

}
项目:sqlexplorer-vaadin    文件:SqlExplorerTabPanel.java   
public SqlExplorerTabPanel() {
    super();

    setSizeFull();
       addStyleName(ValoTheme.TABSHEET_FRAMED);
       addStyleName(ValoTheme.TABSHEET_COMPACT_TABBAR);
       addStyleName(ValoTheme.TABSHEET_PADDED_TABBAR);

       setCloseHandler(new CloseHandler() {

        private static final long serialVersionUID = 1L;

        @Override
        public void onTabClose(TabSheet tabsheet, Component tabContent) {
            if (tabContent instanceof QueryPanel && ((QueryPanel) tabContent).commitButtonValue) {
                NotifyDialog.show("Cannot Close Tab",
                        "You must commit or rollback queries before closing this tab.",
                        null, Type.WARNING_MESSAGE);
            } else {
                tabsheet.removeComponent(tabContent);
            }
        }
       });
}
项目:zklogtool    文件:MainLayout.java   
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_3() {
    // common part: create layout
    horizontalLayout_3 = new HorizontalLayout();
    horizontalLayout_3.setImmediate(false);
    horizontalLayout_3.setWidth("100.0%");
    horizontalLayout_3.setHeight("100.0%");
    horizontalLayout_3.setMargin(false);

    // tabSheet_1
    tabSheet_1 = new TabSheet();
    tabSheet_1.setImmediate(false);
    tabSheet_1.setWidth("100.0%");
    tabSheet_1.setHeight("100.0%");
    horizontalLayout_3.addComponent(tabSheet_1);

    return horizontalLayout_3;
}
项目:XACML    文件:PolicyWorkspace.java   
@AutoGenerated
private VerticalLayout buildVerticalLayoutRightPanel() {
    // common part: create layout
    verticalLayoutRightPanel = new VerticalLayout();
    verticalLayoutRightPanel.setImmediate(false);
    verticalLayoutRightPanel.setWidth("100.0%");
    verticalLayoutRightPanel.setHeight("-1px");
    verticalLayoutRightPanel.setMargin(true);
    verticalLayoutRightPanel.setSpacing(true);

    // horizontalLayoutRightToolbar
    horizontalLayoutRightToolbar = buildHorizontalLayoutRightToolbar();
    verticalLayoutRightPanel.addComponent(horizontalLayoutRightToolbar);

    // tabSheet
    tabSheet = new TabSheet();
    tabSheet.setImmediate(true);
    tabSheet.setWidth("100.0%");
    tabSheet.setHeight("-1px");
    verticalLayoutRightPanel.addComponent(tabSheet);
    verticalLayoutRightPanel.setExpandRatio(tabSheet, 1.0f);

    return verticalLayoutRightPanel;
}
项目:opennmszh    文件:SnmpCollectionAdminApplication.java   
@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);
}
项目:gantt    文件:UriFragmentWrapperFactory.java   
/**
 * 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;
}
项目:extacrm    文件:SubdomainView.java   
/**
 * {@inheritDoc}
 */
@Override
protected Component createContent() {
    logger.debug("Creating view content...");

    initTabsheet();
    final ExtaUri uri = new ExtaUri();
    final TabSheet.Tab tabCandidat = getTab4Uri(uri).orElse(tabs.get(0));

    // Делаем текущей нужную закладку
    final SubdomainUI selectedTab = (SubdomainUI) tabsheet.getSelectedTab();
    if(selectedTab.equals(tabCandidat.getComponent()))
        selectedTab.show();
    else
        tabsheet.setSelectedTab(tabCandidat);

    return contentContainer;
}
项目:extacrm    文件:SaleEditForm.java   
/**
 * {@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;
}
项目:konekti    文件:CaptureView.java   
@AutoGenerated
private VerticalLayout buildMainLayout() {
    // common part: create layout
    mainLayout = new VerticalLayout();
    mainLayout.setImmediate(false);
    mainLayout.setWidth("100%");
    mainLayout.setHeight("100%");
    mainLayout.setMargin(false);

    // top-level component properties
    setWidth("100.0%");
    setHeight("100.0%");

    // tabSheetMessage
    tabSheetMessage = new TabSheet();
    tabSheetMessage.setImmediate(false);
    tabSheetMessage.setWidth("100.0%");
    tabSheetMessage.setHeight("100.0%");
    mainLayout.addComponent(tabSheetMessage);
    mainLayout.setExpandRatio(tabSheetMessage, 1.0f);

    return mainLayout;
}
项目:konekti    文件:OrganizationView.java   
@AutoGenerated
private HorizontalSplitPanel buildHorizontalSplitPanelOrganization() {
    // common part: create layout
    horizontalSplitPanelOrganization = new HorizontalSplitPanel();
    horizontalSplitPanelOrganization.setSplitPosition(25, Sizeable.UNITS_PERCENTAGE);
    horizontalSplitPanelOrganization.setImmediate(false);
    horizontalSplitPanelOrganization.setWidth("100.0%");
    horizontalSplitPanelOrganization.setHeight("100.0%");
    horizontalSplitPanelOrganization.setMargin(false);

    // tabSheetOrganization     
    tabSheetOrganization = new TabSheet();      
    tabSheetOrganization.setImmediate(true);
    tabSheetOrganization.setWidth("100.0%");
    tabSheetOrganization.setHeight("100.0%");
    horizontalSplitPanelOrganization.addComponent(tabSheetOrganization);

    return horizontalSplitPanelOrganization;
}
项目:konekti    文件:LocationField.java   
@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;
}
项目:konekti    文件:UserField.java   
public void setTabSheet(TabSheet tabSheet) {
    this.tabSheet = tabSheet;

    // get userOrganizationCollectionField from Tab component
    Tab userOrganization = tabSheet.getTab(TAB_USER_ORGANIZATION);
    VerticalLayout userOrganizationLayout = (VerticalLayout)userOrganization.getComponent();
    userOrganizationCollectionField = (UserOrganizationCollectionField) userOrganizationLayout.getComponent(0);

    Tab userApplication = tabSheet.getTab(TAB_USER_APPLICATION);
    VerticalLayout userApplicationLayout = (VerticalLayout)userApplication.getComponent();
    userApplicationCollectionField = (UserApplicationCollectionField) userApplicationLayout.getComponent(0);

    Tab userRole = tabSheet.getTab(TAB_USER_ROLE);
    VerticalLayout userRoleLayout = (VerticalLayout)userRole.getComponent();
    userRoleCollectionField = (UserRoleCollectionField) userRoleLayout.getComponent(0); 
}
项目:konekti    文件:LocalizationField.java   
@AutoGenerated
private VerticalLayout buildMainLayout() {
    // common part: create layout
    mainLayout = new VerticalLayout();
    mainLayout.setImmediate(false);
    mainLayout.setWidth("100%");
    mainLayout.setHeight("-1px");
    mainLayout.setMargin(false);

    // top-level component properties
    setWidth("100.0%");
    setHeight("-1px");

    // tabSheet
    tabSheet = new TabSheet();
    tabSheet.setImmediate(false);
    tabSheet.setWidth("100.0%");
    tabSheet.setHeight("100.0%");
    mainLayout.addComponent(tabSheet);
    mainLayout.setExpandRatio(tabSheet, 1.0f);

    return mainLayout;
}
项目:konekti    文件:LogoutViewForm.java   
@AutoGenerated
private VerticalLayout buildProfileLayout() {
    // common part: create layout
    profileLayout = new VerticalLayout();
    profileLayout.setImmediate(false);
    profileLayout.setWidth("100.0%");
    profileLayout.setHeight("100.0%");
    profileLayout.setMargin(true);
    profileLayout.setSpacing(true);

    // profileTabsheet
    profileTabsheet = new TabSheet();
    profileTabsheet.setImmediate(false);
    profileTabsheet.setWidth("100.0%");
    profileTabsheet.setHeight("100.0%");
    profileLayout.addComponent(profileTabsheet);
    profileLayout.setExpandRatio(profileTabsheet, 1.0f);

    return profileLayout;
}
项目:konekti    文件:WorkbenchPanel.java   
@AutoGenerated
private VerticalLayout buildVerticalLayoutPanel() {
    // common part: create layout
    verticalLayoutPanel = new VerticalLayout();
    verticalLayoutPanel.setImmediate(false);
    verticalLayoutPanel.setWidth("100.0%");
    verticalLayoutPanel.setHeight("100.0%");
    verticalLayoutPanel.setMargin(false);

    // tabSheetModule
    tabSheetModule = new TabSheet();
    tabSheetModule.setImmediate(false);
    tabSheetModule.setWidth("100.0%");
    tabSheetModule.setHeight("100.0%");

    verticalLayoutPanel.addComponent(tabSheetModule);
    verticalLayoutPanel.setExpandRatio(tabSheetModule, 1.0f);

    return verticalLayoutPanel;
}
项目:VaadinUtils    文件:BaseCrudView.java   
protected void selectFirstFieldAndShowTab()
{
    for (Field<?> field : fieldGroup.getFields())
    {
        Component childField = field;

        for (int i = 0; i < 10; i++)
        {
            Component parentField = childField.getParent();
            if (parentField instanceof TabSheet)
            {
                ((TabSheet) parentField).setSelectedTab(childField);
                break;
            }
            if (parentField == null)
            {
                // out of luck, didn't find a parent tab
                break;
            }
            childField = parentField;
        }
        field.focus();
        break;
    }
}
项目:academ    文件:PanelOpciones.java   
@AutoGenerated
private AbsoluteLayout buildMainLayout() {
    // common part: create layout
    mainLayout = new AbsoluteLayout();
    mainLayout.setImmediate(false);
    mainLayout.setWidth("100%");
    mainLayout.setHeight("100%");

    // top-level component properties
    setWidth("100.0%");
    setHeight("100.0%");

    // tabSheetOpciones
    tabSheetOpciones = new TabSheet();
    tabSheetOpciones.setImmediate(false);
    tabSheetOpciones.setWidth("100.0%");
    tabSheetOpciones.setHeight("100.0%");
    mainLayout.addComponent(tabSheetOpciones,
            "top:20.0px;bottom:20.0px;left:0.0px;");

    return mainLayout;
}
项目:academ    文件:PanelOpciones.java   
@AutoGenerated
private AbsoluteLayout buildMainLayout() {
    // common part: create layout
    mainLayout = new AbsoluteLayout();
    mainLayout.setImmediate(false);
    mainLayout.setWidth("100%");
    mainLayout.setHeight("100%");

    // top-level component properties
    setWidth("100.0%");
    setHeight("100.0%");

    // tabSheetOpciones
    tabSheetOpciones = new TabSheet();
    tabSheetOpciones.setImmediate(false);
    tabSheetOpciones.setWidth("100.0%");
    tabSheetOpciones.setHeight("100.0%");
    mainLayout.addComponent(tabSheetOpciones,
            "top:20.0px;bottom:20.0px;left:0.0px;");

    return mainLayout;
}
项目:own-music-cloud    文件:FilterMenu.java   
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();
}
项目:crawling-framework    文件:ImportExportView.java   
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);
}
项目:esup-ecandidat    文件:ScolMailView.java   
/**
 * 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);
}
项目:garantia    文件:ParametriaView.java   
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");
*/
    }
项目:vaadin-vertx-samples    文件:ProfilePreferencesWindow.java   
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);
}
项目:VaadinGraphvizComponent    文件:DemoUI.java   
@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");

}
项目:cuba    文件:WebWindow.java   
protected com.vaadin.ui.Component.Focusable getComponentToFocus(ComponentContainer container) {
    for (com.vaadin.ui.Component child : container) {
        if (child instanceof Panel) {
            child = ((Panel) child).getContent();
        }
        if (child instanceof TabSheet) {
            // #PL-3176
            // we don't know about selected tab after request
            // may be focused component lays on not selected tab
            // it may break component tree
            continue;
        }
        if (child instanceof ComponentContainer) {
            com.vaadin.ui.Component.Focusable result = getComponentToFocus((ComponentContainer) child);
            if (result != null) {
                return result;
            }
        } else {
            if (child instanceof com.vaadin.ui.Component.Focusable
                    && !child.isReadOnly()
                    && WebComponentsHelper.isComponentVisible(child)
                    && WebComponentsHelper.isComponentEnabled(child)
                    && !(child instanceof Button)) {

                return (com.vaadin.ui.Component.Focusable) child;
            }
        }
    }
    return null;
}
项目:cuba    文件:WebWindow.java   
@Nullable
protected TabSheet.Tab asTabWindow() {
    if (component.isAttached()) {
        com.vaadin.ui.Component parent = component;
        while (parent != null) {
            if (parent.getParent() instanceof TabSheet) {
                return ((TabSheet) parent.getParent()).getTab(parent);
            }

            parent = parent.getParent();
        }
    }
    return null;
}
项目:cuba    文件:WebWindow.java   
@Override
public void setCaption(String caption) {
    this.caption = caption;

    if (component.isAttached()) {
        com.vaadin.ui.Window dialogWindow = asDialogWindow();
        if (dialogWindow != null) {
            dialogWindow.setCaption(caption);
        } else {
            TabSheet.Tab tabWindow = asTabWindow();
            if (tabWindow != null) {
                setTabCaptionAndDescription(tabWindow);
                windowManager.getBreadCrumbs((ComponentContainer) tabWindow.getComponent()).update();
            } else {
                Layout singleModeWindow = asSingleWindow();
                if (singleModeWindow != null) {
                    windowManager.getBreadCrumbs(singleModeWindow).update();
                }
            }
        }

    }

    if (getWrapper() instanceof TopLevelWindow) {
        Page.getCurrent().setTitle(caption);
    }
}
项目:cuba    文件:WebWindow.java   
protected void setTabCaptionAndDescription(TabSheet.Tab tabWindow) {
    String formattedCaption = formatTabCaption(caption, description);
    String formattedDescription = formatTabDescription(caption, description);

    tabWindow.setCaption(formattedCaption);
    if (!Objects.equals(formattedCaption, formattedDescription)) {
        tabWindow.setDescription(formatTabDescription(caption, description));
    } else {
        tabWindow.setDescription(null);
    }
}