Example usage for com.vaadin.ui TabSheet TabSheet

List of usage examples for com.vaadin.ui TabSheet TabSheet

Introduction

In this page you can find the example usage for com.vaadin.ui TabSheet TabSheet.

Prototype

public TabSheet() 

Source Link

Document

Constructs a new TabSheet.

Usage

From source file:org.balisunrise.vaadin.components.content.Content.java

License:Open Source License

private void init() {

    setSizeFull();/* ww  w.  j a  v  a  2 s .co  m*/
    setStyleName("b-content");
    setSpacing(true);

    leftBar = new SideBar();
    leftBar.setStyleName("b-left-side-bar");
    leftBar.setSizeFull();

    rightBar = new SideBar();
    rightBar.setStyleName("b-right-side-bar");
    rightBar.setSizeFull();

    tabs = new TabSheet();
    tabs.setStyleName("b-content-tabs");
    tabs.setSizeFull();

    addComponent(leftBar);
    setExpandRatio(leftBar, 0.15f);
    addComponent(tabs);
    setExpandRatio(tabs, 0.70f);
    addComponent(rightBar);
    setExpandRatio(rightBar, 0.15f);

    tabs.addTab(new Label("Contedo principal"), "Mine");
}

From source file:org.bubblecloud.ilves.component.flow.AbstractFlowViewlet.java

License:Apache License

@Override
public final void attach() {
    super.attach();

    setStyleName("ui-content");

    final CssLayout layout = new CssLayout();
    layout.setSizeFull();/*w ww  .j a v  a2  s  .c om*/
    this.setCompositionRoot(layout);

    topLayout = new CssLayout();
    topLayout.setStyleName("flow-top");

    topBackButton = new Button(getSite().localize("button-back"));
    topBackButton.addClickListener(this);
    topLayout.addComponent(topBackButton);

    topPathLabel = new Label("", ContentMode.HTML);
    topPathLabel.setSizeUndefined();

    topLayout.addComponent(topPathLabel);

    topRightLayout = new CssLayout();
    topLayout.addComponent(topRightLayout);
    topLayout.setWidth(100, Unit.PERCENTAGE);

    bottomLayout = new CssLayout();
    bottomLayout.setStyleName("flow-bottom");

    bottomBackButton = new Button(getSite().localize("button-back"));
    bottomBackButton.addClickListener(this);
    bottomLayout.addComponent(bottomBackButton);

    bottomPathLabel = new Label("", ContentMode.HTML);
    bottomPathLabel.setSizeUndefined();

    bottomLayout.addComponent(bottomPathLabel);

    bottomRightLayout = new CssLayout();
    bottomLayout.addComponent(bottomRightLayout);
    bottomLayout.setWidth(100, Unit.PERCENTAGE);

    tabSheet = new TabSheet();
    tabSheet.setStyleName("flow-sheet");
    tabSheet.hideTabs(true);
    tabSheet.setSizeFull();

    layout.addComponent(topLayout);
    layout.addComponent(tabSheet);
    layout.addComponent(bottomLayout);

    addFlowlets();

    tabSheet.setSelectedTab((Component) getRootFlowlet());
}

From source file:org.bull.examples.vaadin.osgi.portal.PortalOSGiApplication.java

License:Open Source License

@Override
public void init(VaadinRequest request) {
    HorizontalSplitPanel split = new HorizontalSplitPanel();
    split.setSizeFull();/*from  w ww .  j  a  v a 2  s. c om*/
    split.setSplitPosition(250, Unit.PIXELS);
    tree = new Tree();
    for (PortalModule module : getPortalModuleService().getModules()) {
        tree.addItem(module.getId());
        tree.setItemCaption(module.getId(), module.getName());
    }
    tree.addItemClickListener(new ItemClickListener() {

        @Override
        public void itemClick(ItemClickEvent event) {
            PortalModule module = getPortalModuleService().getModule((String) event.getItemId());
            Iterator<Component> it = tabs.iterator();
            Component found = null;
            while (it.hasNext()) {
                Component c = it.next();
                if (tabs.getTab(c).getCaption().equals(module.getName())) {
                    found = c;
                    break;
                }
            }
            if (found == null) {
                Tab addTab = tabs.addTab(module.createComponent(eventBus), module.getName());
                addTab.setClosable(true);
            } else {
                tabs.setSelectedTab(found);
            }
        }
    });
    tabs = new TabSheet();
    tabs.setSizeFull();
    split.setFirstComponent(tree);
    split.setSecondComponent(tabs);
    setContent(split);
    getPortalModuleService().addListener(this);
}

From source file:org.casbah.ui.CasbahMainComponent.java

License:Open Source License

public void init() throws CasbahException {
    VerticalLayout rootLayout = new VerticalLayout();
    rootLayout.setSizeFull();//from  w  ww. j a  v a  2  s.co  m
    Embedded banner = new Embedded(null, new ClassResource("/images/casbah.png", parentApplication));

    rootLayout.addComponent(banner);
    rootLayout.setComponentAlignment(banner, Alignment.MIDDLE_CENTER);

    tabSheet = new TabSheet();

    configView = new ConfigComponent(parentApplication, provider, casbahConfiguration);
    configView.init();
    tabSheet.addTab(configView, "Configuration", null);

    caView = new MainCAView(provider, parentApplication);
    caView.init();
    tabSheet.addTab(caView, "Certificate Authority", null);

    certView = new IssuedCertificateList(parentApplication, provider);
    certView.init();
    tabSheet.addTab(certView, "Issued Certificates", null);

    tabSheet.setWidth("1024px");

    rootLayout.addComponent(tabSheet);
    rootLayout.setComponentAlignment(tabSheet, Alignment.TOP_CENTER);

    Label footer = new Label("Copyright 2010 - Marco Sandrini - CASBaH is released under the"
            + "<a href=\"http://www.gnu.org/licenses/agpl-3.0-standalone.html\"> Affero GPL License v.3</a>"
            + " - Source Code is available through <a href=\"http://github.com/nessche/CASBaH/archives/master\">Github</a>",
            Label.CONTENT_XHTML);
    footer.setSizeUndefined();
    rootLayout.addComponent(footer);
    rootLayout.setComponentAlignment(footer, Alignment.TOP_CENTER);

    setSizeFull();
    setCompositionRoot(rootLayout);
}

From source file:org.diretto.web.richwebclient.view.windows.UploadSettingsWindow.java

/**
 * Constructs an {@link UploadSettingsWindow}.
 * //from ww  w. j a v  a2  s  . com
 * @param mainWindow The corresponding {@code MainWindow}
 * @param uploadSection The corresponding {@code UploadSection}
 * @param fileInfo The {@code FileInfo} object
 * @param mediaType The {@code MediaType} of the file
 * @param uploadSettings The corresponding {@code UploadSettings}
 * @param otherFiles The names of the other upload files
 */
public UploadSettingsWindow(final MainWindow mainWindow, final UploadSection uploadSection, FileInfo fileInfo,
        MediaType mediaType, UploadSettings uploadSettings, List<String> otherFiles) {
    super("Upload Settings");

    this.mainWindow = mainWindow;

    setModal(true);
    setStyleName(Reindeer.WINDOW_BLACK);
    setWidth("940px");
    setHeight((((int) mainWindow.getHeight()) - 160) + "px");
    setResizable(false);
    setClosable(false);
    setDraggable(false);
    setPositionX((int) (mainWindow.getWidth() / 2.0f) - 470);
    setPositionY(126);

    wrapperLayout = new HorizontalLayout();
    wrapperLayout.setSizeFull();
    wrapperLayout.setMargin(true, true, true, true);
    addComponent(wrapperLayout);

    mainLayout = new VerticalLayout();
    mainLayout.setSizeFull();
    mainLayout.setSpacing(true);

    HorizontalLayout titleLayout = new HorizontalLayout();
    titleLayout.setWidth("100%");
    mainLayout.addComponent(titleLayout);

    HorizontalLayout leftTitleLayout = new HorizontalLayout();
    titleLayout.addComponent(leftTitleLayout);
    titleLayout.setComponentAlignment(leftTitleLayout, Alignment.MIDDLE_LEFT);

    Label fileNameLabel = StyleUtils.getLabelH2(fileInfo.getName());
    leftTitleLayout.addComponent(fileNameLabel);
    leftTitleLayout.setComponentAlignment(fileNameLabel, Alignment.MIDDLE_LEFT);

    Label bullLabel = StyleUtils.getLabelHTML(
            "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
    leftTitleLayout.addComponent(bullLabel);
    leftTitleLayout.setComponentAlignment(bullLabel, Alignment.MIDDLE_LEFT);

    Label titleLabel = StyleUtils.getLabelHTML("<b>Title</b>&nbsp;&nbsp;&nbsp;");
    leftTitleLayout.addComponent(titleLabel);
    leftTitleLayout.setComponentAlignment(titleLabel, Alignment.MIDDLE_LEFT);

    final TextField titleField = new TextField();
    titleField.setMaxLength(50);
    titleField.setWidth("100%");
    titleField.setImmediate(true);

    if (uploadSettings != null && uploadSettings.getTitle() != null) {
        titleField.setValue(uploadSettings.getTitle());
    }

    titleField.focus();
    titleField.setCursorPosition(((String) titleField.getValue()).length());

    titleLayout.addComponent(titleField);
    titleLayout.setComponentAlignment(titleField, Alignment.MIDDLE_RIGHT);

    titleLayout.setExpandRatio(leftTitleLayout, 0);
    titleLayout.setExpandRatio(titleField, 1);

    mainLayout.addComponent(StyleUtils.getHorizontalLine());

    GridLayout topGridLayout = new GridLayout(2, 3);
    topGridLayout.setColumnExpandRatio(0, 1.0f);
    topGridLayout.setColumnExpandRatio(1, 0.0f);
    topGridLayout.setWidth("100%");
    topGridLayout.setSpacing(true);
    mainLayout.addComponent(topGridLayout);

    Label descriptionLabel = StyleUtils.getLabelBold("Description");
    topGridLayout.addComponent(descriptionLabel, 0, 0);

    final TextArea descriptionArea = new TextArea();
    descriptionArea.setSizeFull();
    descriptionArea.setImmediate(true);

    if (uploadSettings != null && uploadSettings.getDescription() != null) {
        descriptionArea.setValue(uploadSettings.getDescription());
    }

    topGridLayout.addComponent(descriptionArea, 0, 1);

    VerticalLayout tagsWrapperLayout = new VerticalLayout();
    tagsWrapperLayout.setHeight("30px");
    tagsWrapperLayout.setSpacing(false);
    topGridLayout.addComponent(tagsWrapperLayout, 0, 2);

    HorizontalLayout tagsLayout = new HorizontalLayout();
    tagsLayout.setWidth("100%");
    tagsLayout.setSpacing(true);

    Label tagsLabel = StyleUtils.getLabelBoldHTML("Tags&nbsp;");
    tagsLabel.setSizeUndefined();
    tagsLayout.addComponent(tagsLabel);
    tagsLayout.setComponentAlignment(tagsLabel, Alignment.MIDDLE_LEFT);

    addTagField = new TextField();
    addTagField.setImmediate(true);
    addTagField.setInputPrompt("Enter new Tag");

    addTagField.addShortcutListener(new ShortcutListener(null, KeyCode.ENTER, new int[0]) {
        private static final long serialVersionUID = -4767515198819351723L;

        @Override
        public void handleAction(Object sender, Object target) {
            if (target == addTagField) {
                addTag();
            }
        }
    });

    tagsLayout.addComponent(addTagField);
    tagsLayout.setComponentAlignment(addTagField, Alignment.MIDDLE_LEFT);

    tabSheet = new TabSheet();

    tabSheet.setStyleName(Reindeer.TABSHEET_SMALL);
    tabSheet.addStyleName("view");

    tabSheet.addListener(new ComponentDetachListener() {
        private static final long serialVersionUID = -657657505471281795L;

        @Override
        public void componentDetachedFromContainer(ComponentDetachEvent event) {
            tags.remove(tabSheet.getTab(event.getDetachedComponent()).getCaption());
        }
    });

    Button addTagButton = new Button("Add", new Button.ClickListener() {
        private static final long serialVersionUID = 5914473126402594623L;

        @Override
        public void buttonClick(ClickEvent event) {
            addTag();
        }
    });

    addTagButton.setStyleName(Reindeer.BUTTON_DEFAULT);

    tagsLayout.addComponent(addTagButton);
    tagsLayout.setComponentAlignment(addTagButton, Alignment.MIDDLE_LEFT);

    Label spaceLabel = StyleUtils.getLabelHTML("");
    spaceLabel.setSizeUndefined();
    tagsLayout.addComponent(spaceLabel);
    tagsLayout.setComponentAlignment(spaceLabel, Alignment.MIDDLE_LEFT);

    tagsLayout.addComponent(tabSheet);
    tagsLayout.setComponentAlignment(tabSheet, Alignment.MIDDLE_LEFT);
    tagsLayout.setExpandRatio(tabSheet, 1.0f);

    tagsWrapperLayout.addComponent(tagsLayout);
    tagsWrapperLayout.setComponentAlignment(tagsLayout, Alignment.TOP_LEFT);

    if (uploadSettings != null && uploadSettings.getTags() != null && uploadSettings.getTags().size() > 0) {
        for (String tag : uploadSettings.getTags()) {
            addTagField.setValue(tag);

            addTag();
        }
    }

    Label presettingLabel = StyleUtils.getLabelBold("Presetting");
    topGridLayout.addComponent(presettingLabel, 1, 0);

    final TwinColSelect twinColSelect;

    if (otherFiles != null && otherFiles.size() > 0) {
        twinColSelect = new TwinColSelect(null, otherFiles);
    } else {
        twinColSelect = new TwinColSelect();
    }

    twinColSelect.setWidth("400px");
    twinColSelect.setRows(10);
    topGridLayout.addComponent(twinColSelect, 1, 1);
    topGridLayout.setComponentAlignment(twinColSelect, Alignment.TOP_RIGHT);

    Label otherFilesLabel = StyleUtils
            .getLabelSmallHTML("Select the files which should get the settings of this file as presetting.");
    otherFilesLabel.setSizeUndefined();
    topGridLayout.addComponent(otherFilesLabel, 1, 2);
    topGridLayout.setComponentAlignment(otherFilesLabel, Alignment.MIDDLE_CENTER);

    mainLayout.addComponent(StyleUtils.getHorizontalLine());

    final UploadGoogleMap googleMap;

    if (uploadSettings != null && uploadSettings.getTopographicPoint() != null) {
        googleMap = new UploadGoogleMap(mediaType, 12, uploadSettings.getTopographicPoint().getLatitude(),
                uploadSettings.getTopographicPoint().getLongitude(), MapType.HYBRID);
    } else {
        googleMap = new UploadGoogleMap(mediaType, 12, 48.42255269321401d, 9.956477880477905d, MapType.HYBRID);
    }

    googleMap.setWidth("100%");
    googleMap.setHeight("300px");
    mainLayout.addComponent(googleMap);

    mainLayout.addComponent(StyleUtils.getHorizontalLine());

    GridLayout bottomGridLayout = new GridLayout(3, 3);
    bottomGridLayout.setSizeFull();
    bottomGridLayout.setSpacing(true);
    mainLayout.addComponent(bottomGridLayout);

    Label licenseLabel = StyleUtils.getLabelBold("License");
    bottomGridLayout.addComponent(licenseLabel, 0, 0);

    final TextArea licenseArea = new TextArea();
    licenseArea.setWidth("320px");
    licenseArea.setHeight("175px");
    licenseArea.setImmediate(true);

    if (uploadSettings != null && uploadSettings.getLicense() != null) {
        licenseArea.setValue(uploadSettings.getLicense());
    }

    bottomGridLayout.addComponent(licenseArea, 0, 1);

    final Label startTimeLabel = StyleUtils.getLabelBold("Earliest possible Start Date");
    startTimeLabel.setSizeUndefined();
    bottomGridLayout.setComponentAlignment(startTimeLabel, Alignment.TOP_CENTER);
    bottomGridLayout.addComponent(startTimeLabel, 1, 0);

    final InlineDateField startTimeField = new InlineDateField();
    startTimeField.setImmediate(true);
    startTimeField.setResolution(InlineDateField.RESOLUTION_SEC);

    boolean currentTimeAdjusted = false;

    if (uploadSettings != null && uploadSettings.getTimeRange() != null
            && uploadSettings.getTimeRange().getStartDateTime() != null) {
        startTimeField.setValue(uploadSettings.getTimeRange().getStartDateTime().toDate());
    } else {
        currentTimeAdjusted = true;

        startTimeField.setValue(new Date());
    }

    bottomGridLayout.setComponentAlignment(startTimeField, Alignment.TOP_CENTER);
    bottomGridLayout.addComponent(startTimeField, 1, 1);

    final CheckBox exactTimeCheckBox = new CheckBox("This is the exact point in time.");
    exactTimeCheckBox.setImmediate(true);
    bottomGridLayout.setComponentAlignment(exactTimeCheckBox, Alignment.TOP_CENTER);
    bottomGridLayout.addComponent(exactTimeCheckBox, 1, 2);

    final Label endTimeLabel = StyleUtils.getLabelBold("Latest possible Start Date");
    endTimeLabel.setSizeUndefined();
    bottomGridLayout.setComponentAlignment(endTimeLabel, Alignment.TOP_CENTER);
    bottomGridLayout.addComponent(endTimeLabel, 2, 0);

    final InlineDateField endTimeField = new InlineDateField();
    endTimeField.setImmediate(true);
    endTimeField.setResolution(InlineDateField.RESOLUTION_SEC);

    if (uploadSettings != null && uploadSettings.getTimeRange() != null
            && uploadSettings.getTimeRange().getEndDateTime() != null) {
        endTimeField.setValue(uploadSettings.getTimeRange().getEndDateTime().toDate());
    } else {
        endTimeField.setValue(startTimeField.getValue());
    }

    bottomGridLayout.setComponentAlignment(endTimeField, Alignment.TOP_CENTER);
    bottomGridLayout.addComponent(endTimeField, 2, 1);

    if (!currentTimeAdjusted && ((Date) startTimeField.getValue()).equals((Date) endTimeField.getValue())) {
        exactTimeCheckBox.setValue(true);

        endTimeLabel.setEnabled(false);
        endTimeField.setEnabled(false);
    }

    exactTimeCheckBox.addListener(new ValueChangeListener() {
        private static final long serialVersionUID = 7193545421803538364L;

        @Override
        public void valueChange(ValueChangeEvent event) {
            if ((Boolean) event.getProperty().getValue()) {
                endTimeLabel.setEnabled(false);
                endTimeField.setEnabled(false);
            } else {
                endTimeLabel.setEnabled(true);
                endTimeField.setEnabled(true);
            }
        }
    });

    mainLayout.addComponent(StyleUtils.getHorizontalLine());

    HorizontalLayout buttonLayout = new HorizontalLayout();
    buttonLayout.setMargin(true, false, false, false);
    buttonLayout.setSpacing(false);

    HorizontalLayout uploadButtonLayout = new HorizontalLayout();
    uploadButtonLayout.setMargin(false, true, false, false);

    uploadButton = new Button("Upload File", new Button.ClickListener() {
        private static final long serialVersionUID = 8013811216568950479L;

        @Override
        @SuppressWarnings("unchecked")
        public void buttonClick(ClickEvent event) {
            String titleValue = titleField.getValue().toString().trim();
            Date startTimeValue = (Date) startTimeField.getValue();
            Date endTimeValue = (Date) endTimeField.getValue();
            boolean exactTimeValue = (Boolean) exactTimeCheckBox.getValue();

            if (titleValue.equals("")) {
                ConfirmWindow confirmWindow = new ConfirmWindow(mainWindow, "Title Field",
                        StyleUtils.getLabelHTML("A title entry is required."));

                mainWindow.addWindow(confirmWindow);
            } else if (titleValue.length() < 5 || titleValue.length() > 50) {
                ConfirmWindow confirmWindow = new ConfirmWindow(mainWindow, "Title Field", StyleUtils
                        .getLabelHTML("The number of characters of the title has to be between 5 and 50."));

                mainWindow.addWindow(confirmWindow);
            } else if (!exactTimeValue && startTimeValue.after(endTimeValue)) {
                ConfirmWindow confirmWindow = new ConfirmWindow(mainWindow, "Date Entries",
                        StyleUtils.getLabelHTML("The second date has to be after the first date."));

                mainWindow.addWindow(confirmWindow);
            } else if (startTimeValue.after(new Date())
                    || (!exactTimeValue && endTimeValue.after(new Date()))) {
                ConfirmWindow confirmWindow = new ConfirmWindow(mainWindow, "Date Entries",
                        StyleUtils.getLabelHTML("The dates are not allowed to be in the future."));

                mainWindow.addWindow(confirmWindow);
            } else {
                disableButtons();

                String descriptionValue = descriptionArea.getValue().toString().trim();
                String licenseValue = licenseArea.getValue().toString().trim();
                TopographicPoint topographicPointValue = googleMap.getMarkerPosition();
                Collection<String> presettingValues = (Collection<String>) twinColSelect.getValue();

                if (exactTimeValue) {
                    endTimeValue = startTimeValue;
                }

                TimeRange timeRange = new TimeRange(new DateTime(startTimeValue), new DateTime(endTimeValue));

                UploadSettings uploadSettings = new UploadSettings(titleValue, descriptionValue, licenseValue,
                        new Vector<String>(tags), topographicPointValue, timeRange);

                mainWindow.removeWindow(event.getButton().getWindow());

                requestRepaint();

                uploadSection.upload(uploadSettings, new Vector<String>(presettingValues));
            }
        }
    });

    uploadButton.setStyleName(Reindeer.BUTTON_DEFAULT);
    uploadButtonLayout.addComponent(uploadButton);
    buttonLayout.addComponent(uploadButtonLayout);

    HorizontalLayout cancelButtonLayout = new HorizontalLayout();
    cancelButtonLayout.setMargin(false, true, false, false);

    cancelButton = new Button("Cancel", new Button.ClickListener() {
        private static final long serialVersionUID = -2565870159504952913L;

        @Override
        public void buttonClick(ClickEvent event) {
            disableButtons();

            mainWindow.removeWindow(event.getButton().getWindow());

            requestRepaint();

            uploadSection.cancelUpload();
        }
    });

    cancelButton.setStyleName(Reindeer.BUTTON_DEFAULT);
    cancelButtonLayout.addComponent(cancelButton);
    buttonLayout.addComponent(cancelButtonLayout);

    cancelAllButton = new Button("Cancel All", new Button.ClickListener() {
        private static final long serialVersionUID = -8578124709201789182L;

        @Override
        public void buttonClick(ClickEvent event) {
            disableButtons();

            mainWindow.removeWindow(event.getButton().getWindow());

            requestRepaint();

            uploadSection.cancelAllUploads();
        }
    });

    cancelAllButton.setStyleName(Reindeer.BUTTON_DEFAULT);
    buttonLayout.addComponent(cancelAllButton);

    mainLayout.addComponent(buttonLayout);
    mainLayout.setComponentAlignment(buttonLayout, Alignment.BOTTOM_CENTER);

    wrapperLayout.addComponent(mainLayout);
}

From source file:org.dussan.vaadin.dcharts.test.DChartsTestUI.java

License:Apache License

@Override
protected void init(VaadinRequest request) {
    VerticalLayout layout = new VerticalLayout();
    layout.setSizeFull();//w ww. j  a va2  s.  com
    setContent(layout);
    Page.getCurrent().setTitle("dCharts Application");

    DCharts charts1 = chartsDemo1();
    DCharts charts2 = chartsDemo2();
    DCharts charts3_1 = chartsDemo3_1();
    DCharts charts3_2 = chartsDemo3_2();
    DCharts charts4 = chartsDemo4();
    DCharts charts5 = chartsDemo5();
    DCharts charts6 = chartsDemo6();
    DCharts charts7 = chartsDemo7();
    DCharts charts8 = chartsDemo8();

    HorizontalLayout layout3 = new HorizontalLayout();
    layout3.addComponent(charts3_1);
    layout3.addComponent(charts3_2);

    TabSheet demoTabSheet = new TabSheet();
    layout.addComponent(demoTabSheet);
    demoTabSheet.addTab(charts1, "Demo 1");
    demoTabSheet.addTab(charts2, "Demo 2");
    demoTabSheet.addTab(layout3, "Demo 3");
    demoTabSheet.addTab(charts4, "Demo 4");
    demoTabSheet.addTab(charts5, "Demo 5");
    demoTabSheet.addTab(charts6, "Demo 6");
    demoTabSheet.addTab(charts7, "Demo 7");
    demoTabSheet.addTab(charts8, "Demo 8");
}

From source file:org.eclipse.hawkbit.ui.rollout.rollout.AddUpdateRolloutWindowLayout.java

License:Open Source License

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;
}

From source file:org.escidoc.browser.layout.SimpleLayout.java

License:Open Source License

@SuppressWarnings("unused")
private TabSheet buildTabContainer() {
    mainContentTabs = new TabSheet();
    mainContentTabs.setImmediate(true);/*from   ww w. j a v  a2  s .  c om*/
    mainContentTabs.setWidth("100.0%");
    mainContentTabs.setHeight("100.0%");
    new CloseTabsViewHelper(cssContent, mainContentTabs);
    return mainContentTabs;
}

From source file:org.esn.esobase.view.tab.BookTranslateTab.java

public BookTranslateTab(DBService service) {
    this.service = service;
    this.setSizeFull();
    FilterChangeListener filterChangeListener = new FilterChangeListener();
    bookListlayout = new HorizontalLayout();
    bookListlayout.setWidth(100f, Unit.PERCENTAGE);
    bookTable = new ComboBox("");
    bookTable.setPageLength(20);//from   w ww .ja  va  2  s.  co m
    bookTable.setScrollToSelectedItem(true);
    bookTable.setDataProvider(new ListDataProvider<>(books));
    bookTable.addValueChangeListener(new BookSelectListener());

    bookTable.setWidth(100f, Unit.PERCENTAGE);
    locationTable = new ComboBox("?");
    locationTable.setPageLength(15);
    locationTable.setScrollToSelectedItem(true);

    locationTable.setWidth(100f, Unit.PERCENTAGE);
    locationTable.setDataProvider(new ListDataProvider<>(locations));

    locationTable.addValueChangeListener(filterChangeListener);

    subLocationTable = new ComboBox("?");
    subLocationTable.setPageLength(15);
    subLocationTable.setScrollToSelectedItem(true);
    subLocationTable.addValueChangeListener(filterChangeListener);

    subLocationTable.setWidth(100f, Unit.PERCENTAGE);
    subLocationTable.setDataProvider(new ListDataProvider<>(subLocations));

    FormLayout locationAndBook = new FormLayout(locationTable, subLocationTable, bookTable);
    locationAndBook.addStyleName(ValoTheme.FORMLAYOUT_LIGHT);
    locationAndBook.setSizeFull();

    bookListlayout.addComponent(locationAndBook);
    translateStatus = new ComboBoxMultiselect("? ",
            Arrays.asList(TRANSLATE_STATUS.values()));
    translateStatus.setClearButtonCaption("?");
    translateStatus.addValueChangeListener(new Property.ValueChangeListener() {
        @Override
        public void valueChange(Property.ValueChangeEvent event) {
            LoadFilters();
        }
    });
    noTranslations = new CheckBox("?  ?");
    noTranslations.setValue(Boolean.FALSE);
    noTranslations.addValueChangeListener(filterChangeListener);
    emptyTranslations = new CheckBox("?  ");
    emptyTranslations.setValue(Boolean.FALSE);
    emptyTranslations.addValueChangeListener(filterChangeListener);
    HorizontalLayout checkBoxlayout = new HorizontalLayout(noTranslations, emptyTranslations);
    translatorBox = new ComboBox("");
    translatorBox.setPageLength(15);
    translatorBox.setScrollToSelectedItem(true);
    translatorBox.setDataProvider(new ListDataProvider(service.getSysAccounts()));
    translatorBox.addValueChangeListener(filterChangeListener);
    refreshButton = new Button("");
    refreshButton.addClickListener(new Button.ClickListener() {

        @Override
        public void buttonClick(Button.ClickEvent event) {
            LoadFilters();
            LoadBookContent();
        }
    });
    countLabel = new Label();
    searchField = new TextField("?? ?");
    searchField.setSizeFull();
    searchField.setNullRepresentation("");
    searchField.addValueChangeListener(filterChangeListener);

    FormLayout filtersLayout = new FormLayout(translateStatus, translatorBox, checkBoxlayout, searchField);
    filtersLayout.addStyleName(ValoTheme.FORMLAYOUT_LIGHT);
    filtersLayout.setSizeFull();
    bookListlayout.addComponent(filtersLayout);
    bookListlayout.addComponent(refreshButton);
    bookListlayout.addComponent(countLabel);
    bookListlayout.setExpandRatio(locationAndBook, 0.4f);
    bookListlayout.setExpandRatio(filtersLayout, 0.4f);
    bookListlayout.setExpandRatio(refreshButton, 0.1f);
    bookListlayout.setExpandRatio(countLabel, 0.1f);
    bookListlayout.setHeight(105f, Unit.PIXELS);

    bookContentLayout = new TabSheet();
    bookContentLayout.setSizeFull();
    bookNameLayout = new HorizontalLayout();
    bookNameLayout.setSizeFull();
    bookNameOrigLayout = new VerticalLayout();
    bookNameEn = new TextField("?");
    bookNameEn.setWidth(500f, Unit.PIXELS);
    bookNameRu = new TextField(" ?");
    bookNameRu.setWidth(500f, Unit.PIXELS);
    bookNameRu.setNullRepresentation("");
    bookNameOrigLayout.addComponent(bookNameEn);
    bookNameOrigLayout.addComponent(bookNameRu);
    bookNameLayout.addComponent(bookNameOrigLayout);
    bookNameTranslationsLayout = new VerticalLayout();
    bookNameTranslationsLayout.setSizeFull();
    bookNameLayout.addComponent(bookNameTranslationsLayout);
    bookContentLayout.addTab(bookNameLayout, "?");

    bookTextLayout = new HorizontalLayout();
    bookTextLayout.setSizeFull();
    bookTextOrigLayout = new HorizontalLayout();
    bookTextOrigLayout.setSizeFull();
    bookTextEn = new TextArea("?");
    bookTextEn.setRows(20);
    bookTextEn.setSizeFull();
    bookTextRu = new TextArea(" ?");
    bookTextRu.setRows(20);
    bookTextRu.setSizeFull();
    bookTextRu.setNullRepresentation("");
    bookTextOrigLayout.addComponent(bookTextEn);
    bookTextOrigLayout.addComponent(bookTextRu);
    bookTextLayout.addComponent(bookTextOrigLayout);
    bookTextTranslationsLayout = new VerticalLayout();
    bookTextTranslationsLayout.setSizeFull();
    bookTextLayout.addComponent(bookTextTranslationsLayout);
    bookTextLayout.setExpandRatio(bookTextOrigLayout, 2f);
    bookTextLayout.setExpandRatio(bookTextTranslationsLayout, 1f);
    bookContentLayout.addTab(bookTextLayout, "?");
    bookNameEn.setReadOnly(true);
    bookNameRu.setReadOnly(true);
    bookTextEn.setReadOnly(true);
    bookTextRu.setReadOnly(true);
    this.addComponent(bookListlayout);
    this.addComponent(bookContentLayout);
    this.bookListlayout.setHeight(105f, Unit.PIXELS);
    this.setExpandRatio(bookContentLayout, 1f);
    new NoAutcompleteComboBoxExtension(locationTable);
    new NoAutcompleteComboBoxExtension(subLocationTable);
    new NoAutcompleteComboBoxExtension(translatorBox);
    LoadFilters();
}

From source file:org.esn.esobase.view.tab.DirectTableEditTab.java

public DirectTableEditTab(DBService service_, SearchService searchService_) {
    this.service = service_;
    this.searchService = searchService_;
    this.setSizeFull();
    this.setMargin(false);
    linkedItemClickListener = new LinkedItemClickListener();
    searchTabs = new TabSheet();
    searchTabs.setSizeFull();/*w  w w. j a v a 2s .  c  om*/
    searchTabs.setHeight(250f, Unit.PIXELS);
    VerticalLayout searchInCatalogsLayout = new VerticalLayout();
    searchInCatalogsLayout.setSizeFull();
    searchInCatalogsLayout.setMargin(false);
    HorizontalLayout hl = new HorizontalLayout();
    hl.setDefaultComponentAlignment(Alignment.BOTTOM_LEFT);
    searchField = new TextField();
    searchField.setWidth(500, Unit.PIXELS);
    searchField
            .addShortcutListener(new ShortcutListener("Search shortcut", ShortcutAction.KeyCode.ENTER, null) {
                @Override
                public void handleAction(Object sender, Object target) {
                    search();
                }
            });
    hl.addComponent(searchField);
    searchButton = new Button("?");
    searchButton.setIcon(FontAwesome.SEARCH);
    searchButton.addClickListener(new Button.ClickListener() {

        @Override
        public void buttonClick(Button.ClickEvent event) {
            search();

        }
    });
    hl.addComponent(searchButton);
    hl.addComponent(new Label(""));

    tableNamesList.add("GSpreadSheetsNpcName");
    tableNamesList.add("GSpreadSheetsNpcPhrase");
    tableNamesList.add("GSpreadSheetsPlayerPhrase");
    tableNamesList.add("GSpreadSheetsAbilityDescription");
    tableNamesList.add("GSpreadSheetsAchievement");
    tableNamesList.add("GSpreadSheetsAchievementDescription");
    tableNamesList.add("GSpreadSheetsActivator");
    tableNamesList.add("GSpreadSheetsCollectible");
    tableNamesList.add("GSpreadSheetsCollectibleDescription");
    tableNamesList.add("GSpreadSheetsItemDescription");
    tableNamesList.add("GSpreadSheetsItemName");
    tableNamesList.add("GSpreadSheetsJournalEntry");
    tableNamesList.add("GSpreadSheetsLoadscreen");
    tableNamesList.add("GSpreadSheetsLocationName");
    tableNamesList.add("GSpreadSheetsNote");
    tableNamesList.add("GSpreadSheetsQuestDescription");
    tableNamesList.add("GSpreadSheetsQuestDirection");
    tableNamesList.add("GSpreadSheetsQuestName");
    tableNamesList.add("GSpreadSheetsQuestStartTip");
    tableNamesList.add("GSpreadSheetsQuestEndTip");
    tableNames = new ComboBoxMultiselect(null);
    tableNames.setSelectAllButtonCaption(" ?");
    tableNames.setShowSelectAllButton(new ComboBoxMultiselect.ShowButton() {
        @Override
        public boolean isShow(String filter, int page) {
            return true;
        }
    });
    tableNames.setClearButtonCaption("? ");
    tableNames.setPageLength(0);
    tableNames.addItems(tableNamesList);
    tableNames.selectAll();
    tableNames.setItemCaption("GSpreadSheetsAbilityDescription", "?? ???");
    tableNames.setItemCaption("GSpreadSheetsAchievement", "??");
    tableNames.setItemCaption("GSpreadSheetsAchievementDescription", "?? ?");
    tableNames.setItemCaption("GSpreadSheetsActivator", "?");
    tableNames.setItemCaption("GSpreadSheetsCollectible", " ");
    tableNames.setItemCaption("GSpreadSheetsCollectibleDescription",
            "??  ");
    tableNames.setItemCaption("GSpreadSheetsItemDescription", "?? ");
    tableNames.setItemCaption("GSpreadSheetsItemName", "?? ");
    tableNames.setItemCaption("GSpreadSheetsJournalEntry", "? ");
    tableNames.setItemCaption("GSpreadSheetsLoadscreen", " ?");
    tableNames.setItemCaption("GSpreadSheetsLocationName", "");
    tableNames.setItemCaption("GSpreadSheetsNote", "?");
    tableNames.setItemCaption("GSpreadSheetsNpcName", "NPC");
    tableNames.setItemCaption("GSpreadSheetsNpcPhrase", " NPC");
    tableNames.setItemCaption("GSpreadSheetsPlayerPhrase", " ");
    tableNames.setItemCaption("GSpreadSheetsQuestDescription", "?? ?");
    tableNames.setItemCaption("GSpreadSheetsQuestDirection", " ?");
    tableNames.setItemCaption("GSpreadSheetsQuestEndTip", " ");
    tableNames.setItemCaption("GSpreadSheetsQuestName", "?? ?");
    tableNames.setItemCaption("GSpreadSheetsQuestStartTip", "? ");
    hl.addComponent(tableNames);
    regularExpression = new CheckBox("regexp", false);
    hl.addComponent(regularExpression);
    withTranslatedNeighbours = new CheckBox(
            "? ?  ???", false);
    hl.addComponent(withTranslatedNeighbours);
    neighboursCount = new Slider(null, 1, 200);
    neighboursCount.setValue(20d);
    hl.addComponent(neighboursCount);
    searchInCatalogsLayout.addComponent(hl);
    translatedTextSpecification = new TranslatedTextSpecification();
    resultTable = new Table(" ?");
    resultTable.addStyleName(ValoTheme.TABLE_SMALL);
    resultTable.addStyleName(ValoTheme.TABLE_COMPACT);
    resultTable.setSizeFull();
    resultTable.setPageLength(0);
    hc.addContainerProperty("textEn", String.class, null);
    hc.addContainerProperty("textRu", String.class, null);
    hc.addContainerProperty("catalogType", String.class, null);
    hc.addContainerProperty("translator", String.class, null);
    hc.addContainerProperty("weight", Integer.class, null);
    resultTable.setContainerDataSource(hc);
    resultTable.setVisibleColumns(new Object[] { "textEn", "textRu", "catalogType", "translator" });
    resultTable.setColumnHeaders(
            new String[] { "?", "?? ?", "", "" });
    resultTable.addItemClickListener(new SearchTableRowClickListener());

    searchInCatalogsLayout.addComponent(resultTable);
    searchInCatalogsLayout.setExpandRatio(resultTable, 5f);

    searchTabs.addTab(searchInCatalogsLayout, "?");
    VerticalLayout translationsLayout = new VerticalLayout();
    translationsLayout.setMargin(false);
    translationsLayout.setSpacing(false);
    translationsLayout.setSizeFull();
    HorizontalLayout traslationsFilterslayout = new HorizontalLayout();
    statusFilter = new ComboBox("?", Arrays.asList(TRANSLATE_STATUS.values()));
    statusFilter.setNullSelectionAllowed(false);
    statusFilter.setValue(TRANSLATE_STATUS.NEW);
    traslationsFilterslayout.addComponent(statusFilter);
    translatorBox = new ComboBox("");
    translatorBox.setPageLength(15);
    sysAccountContainer = service.loadBeanItems(sysAccountContainer);
    translatorBox.setContainerDataSource(sysAccountContainer);
    translatorBox.setFilteringMode(FilteringMode.CONTAINS);
    traslationsFilterslayout.addComponent(translatorBox);
    translateTypeBox = new ComboBox("");
    translateTypeBox.setNullSelectionAllowed(true);
    translateTypeBox.setPageLength(15);
    translateTypeBox.addItem("spreadSheetsActivator");
    translateTypeBox.setItemCaption("spreadSheetsActivator", "?");
    translateTypeBox.addItem("spreadSheetsAchievement");
    translateTypeBox.setItemCaption("spreadSheetsAchievement", "??");
    translateTypeBox.addItem("spreadSheetsAchievementDescription");
    translateTypeBox.setItemCaption("spreadSheetsAchievementDescription",
            "?? ?");
    translateTypeBox.addItem("spreadSheetsNote");
    translateTypeBox.setItemCaption("spreadSheetsNote", "?");
    translateTypeBox.addItem("spreadSheetsItemDescription");
    translateTypeBox.setItemCaption("spreadSheetsItemDescription", "?? ");
    translateTypeBox.addItem("spreadSheetsItemName");
    translateTypeBox.setItemCaption("spreadSheetsItemName", "?? ");
    translateTypeBox.addItem("spreadSheetsJournalEntry");
    translateTypeBox.setItemCaption("spreadSheetsJournalEntry", "?  ");
    translateTypeBox.addItem("spreadSheetsLocationName");
    translateTypeBox.setItemCaption("spreadSheetsLocationName", "?? ");
    translateTypeBox.addItem("spreadSheetsNpcName");
    translateTypeBox.setItemCaption("spreadSheetsNpcName", " NPC");
    translateTypeBox.addItem("spreadSheetsNpcPhrase");
    translateTypeBox.setItemCaption("spreadSheetsNpcPhrase", " NPC");
    translateTypeBox.addItem("spreadSheetsPlayerPhrase");
    translateTypeBox.setItemCaption("spreadSheetsPlayerPhrase", " ");
    translateTypeBox.addItem("spreadSheetsQuestDescription");
    translateTypeBox.setItemCaption("spreadSheetsQuestDescription", "?? ?");
    translateTypeBox.addItem("spreadSheetsQuestDirection");
    translateTypeBox.setItemCaption("spreadSheetsQuestDirection", " ?");
    translateTypeBox.addItem("spreadSheetsQuestName");
    translateTypeBox.setItemCaption("spreadSheetsQuestName", "?? ?");
    translateTypeBox.addItem("spreadSheetsQuestStartTip");
    translateTypeBox.setItemCaption("spreadSheetsQuestStartTip", "? ");
    translateTypeBox.addItem("spreadSheetsQuestEndTip");
    translateTypeBox.setItemCaption("spreadSheetsQuestEndTip", " ");
    translateTypeBox.addItem("sheetsCollectible");
    translateTypeBox.setItemCaption("sheetsCollectible",
            "??  ");
    translateTypeBox.addItem("sheetsCollectibleDescription");
    translateTypeBox.setItemCaption("sheetsCollectibleDescription",
            "??  ");
    translateTypeBox.addItem("sheetsLoadscreen");
    translateTypeBox.setItemCaption("sheetsLoadscreen", " ?");
    translateTypeBox.setFilteringMode(FilteringMode.CONTAINS);
    traslationsFilterslayout.addComponent(translateTypeBox);
    filterTranslationButton = new Button("?");
    filterTranslationButton.addClickListener(new ClickListener() {

        @Override
        public void buttonClick(Button.ClickEvent event) {
            filterTranslations();
        }
    });
    traslationsFilterslayout.addComponent(filterTranslationButton);
    traslationsFilterslayout.setComponentAlignment(filterTranslationButton, Alignment.BOTTOM_LEFT);
    translationsLayout.addComponent(traslationsFilterslayout);
    newTranslationsTable = new MGrid();
    newTranslationsTable.setSizeFull();
    newTranslationsContainer = new GeneratedPropertyListContainer<>(TranslatedText.class);
    newTranslationsTable.setContainerDataSource(newTranslationsContainer);
    filterTranslations();
    newTranslationsContainer.sort(new Object[] { "id" }, new boolean[] { true });
    newTranslationsTable.setContainerDataSource(newTranslationsContainer);
    newTranslationsTable.setColumns("author", "createTime", "text");
    newTranslationsTable.getColumn("author").setHeaderCaption("?").setMaximumWidth(200);
    newTranslationsTable.getColumn("createTime").setHeaderCaption("").setWidth(140);
    newTranslationsTable.getColumn("text").setHeaderCaption("").setMaximumWidth(800)
            .setMinimumWidth(600);
    newTranslationsTable.addItemClickListener(new TranslationsTableRowClickListener());
    translationsLayout.addComponent(newTranslationsTable);
    translationsLayout.setExpandRatio(newTranslationsTable, 5f);
    searchTabs.addTab(translationsLayout, "");
    this.addComponent(searchTabs);
    filterLayout = new HorizontalLayout();
    Label itemTypeLabel = new Label("");
    itemType = new ComboBox();
    itemType.addItems(service.getTypes());
    itemType.setNullSelectionAllowed(true);
    itemType.setFilteringMode(FilteringMode.CONTAINS);
    filterLayout.addComponent(itemTypeLabel);
    filterLayout.addComponent(itemType);
    Label itemSubTypeLabel = new Label("");
    itemSubType = new ComboBox();
    itemSubType.addItems(service.getSubTypes());
    itemSubType.setNullSelectionAllowed(true);
    itemSubType.setFilteringMode(FilteringMode.CONTAINS);
    filterLayout.addComponent(itemSubTypeLabel);
    filterLayout.addComponent(itemSubType);
    notTranslated = new CheckBox("? ");
    notTranslated.setValue(Boolean.FALSE);
    filterLayout.addComponent(notTranslated);
    filterLayout.setComponentAlignment(notTranslated, Alignment.MIDDLE_LEFT);
    this.addComponent(filterLayout);
    tableTabs = new TabSheet();
    tableTabs.setSizeFull();
    gSpreadSheetsNpcNameContainer = new GeneratedPropertyListContainer<>(GSpreadSheetsNpcName.class);
    npcNameTable = new GspreadSheetTable(gSpreadSheetsNpcNameContainer, PAGESIZE,
            service.getgSpreadSheetsNpcNameRepository(), specification);
    npcNameTable.addGeneratedColumn("infoColumn", new InfoColumnGenerator());
    npcNameTable.addGeneratedColumn("translateColumn", new TranslateColumnGenerator(npcNameTable));
    tableTabs.addTab(npcNameTable, "NPC");
    npcNameTable.build();
    npcNameTable.setVisibleColumns(
            new Object[] { "rowNum", "sex", "textEn", "textRu", "infoColumn", "translateColumn" });
    npcNameTable.setColumnWidth("sex", 87);
    npcNameTable.setColumnHeader("sex", "");

    locationNameContainer = new GeneratedPropertyListContainer<>(GSpreadSheetsLocationName.class);
    locationNameTable = new GspreadSheetTable(locationNameContainer, PAGESIZE,
            service.getgSpreadSheetsLocationNameRepository(), specification);
    locationNameTable.addGeneratedColumn("infoColumn", new InfoColumnGenerator());
    locationNameTable.addGeneratedColumn("translateColumn", new TranslateColumnGenerator(locationNameTable));
    tableTabs.addTab(locationNameTable, "");
    locationNameTable.build();
    locationNameTable
            .setVisibleColumns(new Object[] { "rowNum", "textEn", "textRu", "infoColumn", "translateColumn" });

    activatorContainer = new GeneratedPropertyListContainer<>(GSpreadSheetsActivator.class);
    activatorTable = new GspreadSheetTable(activatorContainer, PAGESIZE,
            service.getgSpreadSheetsActivatorRepository(), specification);
    activatorTable.addGeneratedColumn("infoColumn", new InfoColumnGenerator());
    activatorTable.addGeneratedColumn("translateColumn", new TranslateColumnGenerator(activatorTable));
    tableTabs.addTab(activatorTable, "?");
    activatorTable.build();
    activatorTable
            .setVisibleColumns(new Object[] { "rowNum", "textEn", "textRu", "infoColumn", "translateColumn" });

    playerPhraseContainer = new GeneratedPropertyListContainer<>(GSpreadSheetsPlayerPhrase.class);
    playerPhraseTable = new GspreadSheetTable(playerPhraseContainer, PAGESIZE,
            service.getgSpreadSheetsPlayerPhraseRepository(), specification);
    playerPhraseTable.addGeneratedColumn("infoColumn", new InfoColumnGenerator());
    playerPhraseTable.addGeneratedColumn("translateColumn", new TranslateColumnGenerator(playerPhraseTable));
    tableTabs.addTab(playerPhraseTable, " ");
    playerPhraseTable.build();
    playerPhraseTable
            .setVisibleColumns(new Object[] { "rowNum", "textEn", "textRu", "infoColumn", "translateColumn" });

    Page.Styles styles = Page.getCurrent().getStyles();
    styles.add(".wrapped-text {\n" + "    white-space: normal;\n" + "    overflow: hidden;\n" + "}");
    npcPhraseContainer = new GeneratedPropertyListContainer<>(GSpreadSheetsNpcPhrase.class);
    npcPhraseTable = new GspreadSheetTable(npcPhraseContainer, PAGESIZE,
            service.getgSpreadSheetsNpcPhraseRepository(), specification);
    npcPhraseTable.addGeneratedColumn("infoColumn", new InfoColumnGenerator());
    npcPhraseTable.addGeneratedColumn("translateColumn", new TranslateColumnGenerator(npcPhraseTable));
    tableTabs.addTab(npcPhraseTable, " NPC");
    npcPhraseTable.build();
    npcPhraseTable
            .setVisibleColumns(new Object[] { "rowNum", "textEn", "textRu", "infoColumn", "translateColumn" });

    questNameContainer = new GeneratedPropertyListContainer<>(GSpreadSheetsQuestName.class);
    questNameTable = new GspreadSheetTable(questNameContainer, PAGESIZE,
            service.getgSpreadSheetsQuestNameRepository(), specification);
    questNameTable.addGeneratedColumn("infoColumn", new InfoColumnGenerator());
    questNameTable.addGeneratedColumn("translateColumn", new TranslateColumnGenerator(questNameTable));
    tableTabs.addTab(questNameTable, "?? ?");
    questNameTable.build();
    questNameTable
            .setVisibleColumns(new Object[] { "rowNum", "textEn", "textRu", "infoColumn", "translateColumn" });

    questDescriptionContainer = new GeneratedPropertyListContainer<>(GSpreadSheetsQuestDescription.class);
    questDescriptionTable = new GspreadSheetTable(questDescriptionContainer, PAGESIZE,
            service.getgSpreadSheetsQuestDescriptionRepository(), specification);
    questDescriptionTable.addGeneratedColumn("infoColumn", new InfoColumnGenerator());
    questDescriptionTable.addGeneratedColumn("translateColumn",
            new TranslateColumnGenerator(questDescriptionTable));
    tableTabs.addTab(questDescriptionTable, "?? ?");
    questDescriptionTable.build();
    questDescriptionTable
            .setVisibleColumns(new Object[] { "rowNum", "textEn", "textRu", "infoColumn", "translateColumn" });

    questDirectionContainer = new GeneratedPropertyListContainer<>(GSpreadSheetsQuestDirection.class);
    questDirectionTable = new GspreadSheetTable(questDirectionContainer, PAGESIZE,
            service.getgSpreadSheetsQuestDirectionRepository(), specification);
    questDirectionTable.addGeneratedColumn("infoColumn", new InfoColumnGenerator());
    questDirectionTable.addGeneratedColumn("translateColumn",
            new TranslateColumnGenerator(questDirectionTable));
    tableTabs.addTab(questDirectionTable, " ?");
    questDirectionTable.build();
    questDirectionTable
            .setVisibleColumns(new Object[] { "rowNum", "textEn", "textRu", "infoColumn", "translateColumn" });

    questStartTipContainer = new GeneratedPropertyListContainer<>(GSpreadSheetsQuestStartTip.class);
    questStartTipTable = new GspreadSheetTable(questStartTipContainer, PAGESIZE,
            service.getgSpreadSheetsQuestStartTipRepository(), specification);
    questStartTipTable.addGeneratedColumn("infoColumn", new InfoColumnGenerator());
    questStartTipTable.addGeneratedColumn("translateColumn", new TranslateColumnGenerator(questStartTipTable));
    tableTabs.addTab(questStartTipTable, "? ");
    questStartTipTable.build();
    questStartTipTable
            .setVisibleColumns(new Object[] { "rowNum", "textEn", "textRu", "infoColumn", "translateColumn" });

    questEndTipContainer = new GeneratedPropertyListContainer<>(GSpreadSheetsQuestEndTip.class);
    questEndTipTable = new GspreadSheetTable(questEndTipContainer, PAGESIZE,
            service.getgSpreadSheetsQuestEndTipRepository(), specification);
    questEndTipTable.addGeneratedColumn("infoColumn", new InfoColumnGenerator());
    questEndTipTable.addGeneratedColumn("translateColumn", new TranslateColumnGenerator(questEndTipTable));
    tableTabs.addTab(questEndTipTable, " ");
    questEndTipTable.build();
    questEndTipTable
            .setVisibleColumns(new Object[] { "rowNum", "textEn", "textRu", "infoColumn", "translateColumn" });

    itemNameLayout = new VerticalLayout();
    itemNameLayout.setMargin(false);
    itemNameLayout.setSpacing(false);
    itemNameLayout.setSizeFull();
    Label itemNameLabel = new Label(
            "???!  ?  ?:   ? ?, ? ? ? ? .");
    itemNameLabel.setStyleName(ValoTheme.LABEL_COLORED);
    itemNameContainer = new GeneratedPropertyListContainer<>(GSpreadSheetsItemName.class);
    itemNameTable = new GspreadSheetTable(itemNameContainer, PAGESIZE,
            service.getgSpreadSheetsItemNameRepository(), itemNameSpecification);
    itemNameTable.addGeneratedColumn("itemTypeColumn", new ItemInfoColumnGenerator());
    itemNameTable.addGeneratedColumn("infoColumn", new InfoColumnGenerator());
    itemNameTable.addGeneratedColumn("translateColumn", new TranslateColumnGenerator(itemNameTable));
    itemNameLayout.addComponent(itemNameLabel);
    itemNameLayout.addComponent(itemNameTable);
    itemNameLayout.setExpandRatio(itemNameTable, 1f);
    tableTabs.addTab(itemNameLayout, "?? ");
    itemNameTable.build();
    itemNameTable.setVisibleColumns(
            new Object[] { "rowNum", "textEn", "textRu", "itemTypeColumn", "infoColumn", "translateColumn" });
    itemNameTable.setColumnHeader("itemTypeColumn", "");
    itemNameTable.setColumnExpandRatio("itemTypeColumn", 0.5f);

    itemDescriptionContainer = new GeneratedPropertyListContainer<>(GSpreadSheetsItemDescription.class);
    itemDescriptionTable = new GspreadSheetTable(itemDescriptionContainer, PAGESIZE,
            service.getgSpreadSheetsItemDescriptionRepository(), specification);
    itemDescriptionTable.addGeneratedColumn("infoColumn", new InfoColumnGenerator());
    itemDescriptionTable.addGeneratedColumn("translateColumn",
            new TranslateColumnGenerator(itemDescriptionTable));
    tableTabs.addTab(itemDescriptionTable, "?? ");
    itemDescriptionTable.build();
    itemDescriptionTable
            .setVisibleColumns(new Object[] { "rowNum", "textEn", "textRu", "infoColumn", "translateColumn" });

    journalEntryContainer = new GeneratedPropertyListContainer<>(GSpreadSheetsJournalEntry.class);
    journalEntryTable = new GspreadSheetTable(journalEntryContainer, PAGESIZE,
            service.getgSpreadSheetsJournalEntryRepository(), specification);
    journalEntryTable.addGeneratedColumn("infoColumn", new InfoColumnGenerator());
    journalEntryTable.addGeneratedColumn("translateColumn", new TranslateColumnGenerator(journalEntryTable));
    tableTabs.addTab(journalEntryTable, "? ");
    journalEntryTable.build();
    journalEntryTable
            .setVisibleColumns(new Object[] { "rowNum", "textEn", "textRu", "infoColumn", "translateColumn" });

    achievementContainer = new GeneratedPropertyListContainer<>(GSpreadSheetsAchievement.class);
    achievementTable = new GspreadSheetTable(achievementContainer, PAGESIZE,
            service.getgSpreadSheetsAchievementRepository(), specification);
    achievementTable.addGeneratedColumn("infoColumn", new InfoColumnGenerator());
    achievementTable.addGeneratedColumn("translateColumn", new TranslateColumnGenerator(achievementTable));
    tableTabs.addTab(achievementTable, "??");
    achievementTable.build();
    achievementTable
            .setVisibleColumns(new Object[] { "rowNum", "textEn", "textRu", "infoColumn", "translateColumn" });

    achievementDescriptionContainer = new GeneratedPropertyListContainer<>(
            GSpreadSheetsAchievementDescription.class);
    achievementDescriptionTable = new GspreadSheetTable(achievementDescriptionContainer, PAGESIZE,
            service.getgSpreadSheetsAchievementDescriptionRepository(), specification);
    achievementDescriptionTable.addGeneratedColumn("infoColumn", new InfoColumnGenerator());
    achievementDescriptionTable.addGeneratedColumn("translateColumn",
            new TranslateColumnGenerator(achievementDescriptionTable));
    tableTabs.addTab(achievementDescriptionTable, "?? ?");
    achievementDescriptionTable.build();
    achievementDescriptionTable
            .setVisibleColumns(new Object[] { "rowNum", "textEn", "textRu", "infoColumn", "translateColumn" });

    abilityDescriptionContainer = new GeneratedPropertyListContainer<>(GSpreadSheetsAbilityDescription.class);
    abilityDescriptionTable = new GspreadSheetTable(abilityDescriptionContainer, PAGESIZE,
            service.getgSpreadSheetsAbilityDescriptionRepository(), specification);
    abilityDescriptionTable.addGeneratedColumn("infoColumn", new InfoColumnGenerator());
    abilityDescriptionTable.addGeneratedColumn("translateColumn",
            new TranslateColumnGenerator(abilityDescriptionTable));
    tableTabs.addTab(abilityDescriptionTable, "?? ???");
    abilityDescriptionTable.build();
    abilityDescriptionTable
            .setVisibleColumns(new Object[] { "rowNum", "textEn", "textRu", "infoColumn", "translateColumn" });

    noteContainer = new GeneratedPropertyListContainer<>(GSpreadSheetsNote.class);
    noteTable = new GspreadSheetTable(noteContainer, PAGESIZE, service.getgSpreadSheetsNoteRepository(),
            specification);
    noteTable.addGeneratedColumn("infoColumn", new InfoColumnGenerator());
    noteTable.addGeneratedColumn("translateColumn", new TranslateColumnGenerator(noteTable));
    tableTabs.addTab(noteTable, "?");
    noteTable.build();
    noteTable.setVisibleColumns(new Object[] { "rowNum", "textEn", "textRu", "infoColumn", "translateColumn" });

    collectibleContainer = new GeneratedPropertyListContainer<>(GSpreadSheetsCollectible.class);
    collectibleTable = new GspreadSheetTable(collectibleContainer, PAGESIZE,
            service.getgSpreadSheetsCollectibleRepository(), specification);
    collectibleTable.addGeneratedColumn("infoColumn", new InfoColumnGenerator());
    collectibleTable.addGeneratedColumn("translateColumn", new TranslateColumnGenerator(collectibleTable));
    tableTabs.addTab(collectibleTable, " ");
    collectibleTable.build();
    collectibleTable
            .setVisibleColumns(new Object[] { "rowNum", "textEn", "textRu", "infoColumn", "translateColumn" });

    collectibleDescriptionContainer = new GeneratedPropertyListContainer<>(
            GSpreadSheetsCollectibleDescription.class);
    collectibleDescriptionTable = new GspreadSheetTable(collectibleDescriptionContainer, PAGESIZE,
            service.getgSpreadSheetsCollectibleDescriptionRepository(), specification);
    collectibleDescriptionTable.addGeneratedColumn("infoColumn", new InfoColumnGenerator());
    collectibleDescriptionTable.addGeneratedColumn("translateColumn",
            new TranslateColumnGenerator(collectibleDescriptionTable));
    tableTabs.addTab(collectibleDescriptionTable,
            "??  ");
    collectibleDescriptionTable.build();
    collectibleDescriptionTable
            .setVisibleColumns(new Object[] { "rowNum", "textEn", "textRu", "infoColumn", "translateColumn" });

    loadscreenContainer = new GeneratedPropertyListContainer<>(GSpreadSheetsLoadscreen.class);
    loadscreenTable = new GspreadSheetTable(loadscreenContainer, PAGESIZE,
            service.getgSpreadSheetsLoadscreenRepository(), specification);
    loadscreenTable.addGeneratedColumn("infoColumn", new InfoColumnGenerator());
    loadscreenTable.addGeneratedColumn("translateColumn", new TranslateColumnGenerator(loadscreenTable));
    tableTabs.addTab(loadscreenTable, " ?");
    loadscreenTable.build();
    loadscreenTable
            .setVisibleColumns(new Object[] { "rowNum", "textEn", "textRu", "infoColumn", "translateColumn" });
    LoadTables();
    itemType.addValueChangeListener(new Property.ValueChangeListener() {
        @Override
        public void valueChange(Property.ValueChangeEvent event) {
            LoadTables();
        }
    });
    itemSubType.addValueChangeListener(new Property.ValueChangeListener() {
        @Override
        public void valueChange(Property.ValueChangeEvent event) {
            LoadTables();
        }
    });
    notTranslated.addValueChangeListener(new HasValue.ValueChangeListener<Boolean>() {
        @Override
        public void valueChange(HasValue.ValueChangeEvent<Boolean> event) {
            LoadTables();
        }
    });

    this.addComponent(tableTabs);
    this.setExpandRatio(tableTabs, 20f);
}