Example usage for com.vaadin.ui HorizontalLayout setSizeFull

List of usage examples for com.vaadin.ui HorizontalLayout setSizeFull

Introduction

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

Prototype

@Override
    public void setSizeFull() 

Source Link

Usage

From source file:com.swifta.mats.web.usermanagement.UserDetailsModule.java

private HorizontalLayout getActLog() {
    HorizontalLayout c = new HorizontalLayout();
    c.setSizeFull();
    Label lb = new Label("No Data Available!");
    c.addComponent(lb);//www .jav  a  2 s .c om
    c.setComponentAlignment(lb, Alignment.MIDDLE_CENTER);
    c.setMargin(true);
    return c;
}

From source file:com.wft.ui.welcome.WFTWelcomeWindow.java

License:Apache License

public void afterPropertiesSet() throws Exception {
    HorizontalLayout layout = new HorizontalLayout();
    layout.setSizeFull();
    setContent(layout);/*from  w  ww .j  ava  2 s.co  m*/

    VerticalLayout leftLayout = new VerticalLayout();
    leftLayout.setSizeFull();
    layout.addComponent(leftLayout);
    layout.setExpandRatio(leftLayout, 1);

    VerticalLayout middleLayout = new VerticalLayout();
    middleLayout.setSizeFull();
    layout.addComponent(middleLayout);
    layout.setExpandRatio(middleLayout, 3);

    VerticalLayout rightLayout = new VerticalLayout();
    rightLayout.setSizeFull();
    layout.addComponent(rightLayout);
    layout.setExpandRatio(rightLayout, 1);

    leftLayout.addComponent(wftWelcomeProfilePanel);
    leftLayout.setExpandRatio(wftWelcomeProfilePanel, 1);

    leftLayout.addComponent(wftWelcomeTournamentsPanel);
    leftLayout.setExpandRatio(wftWelcomeTournamentsPanel, 1);

    leftLayout.addComponent(wftWelcomeCalendarPanel);
    leftLayout.setExpandRatio(wftWelcomeCalendarPanel, 1);

    middleLayout.addComponent(wftWelcomeMainPanel);

    rightLayout.addComponent(wftWelcomeMessagesPanel);
    rightLayout.setExpandRatio(wftWelcomeMessagesPanel, 1);

    rightLayout.addComponent(wftWelcomeChatPanel);
    rightLayout.setExpandRatio(wftWelcomeChatPanel, 1);

    setImmediate(true);
}

From source file:de.catma.ui.analyzer.querybuilder.TagPanel.java

License:Open Source License

private void initComponents() {
    contentPanel = new VerticalLayout();
    contentPanel.setSizeFull();/*from   w w  w.  j  av a 2 s.  co m*/
    addComponent(contentPanel);

    if (tagsetDefinitionDictionary.isEmpty()) {
        tagLibraryPanel = createTagLibraryPanel();
        contentPanel.addComponent(tagLibraryPanel);
    }

    HorizontalLayout tagSearchPanel = new HorizontalLayout();
    tagSearchPanel.setSizeFull();
    tagSearchPanel.setSpacing(true);

    tagsetTree = new TagsetTree(queryOptions.getRepository().getTagManager(), null, false, false, null);
    tagSearchPanel.addComponent(tagsetTree);
    tagSearchPanel.setExpandRatio(tagsetTree, 0.8f);

    tagMatchModeCombo = new ComboBox("Please choose what you consider a match:");
    tagMatchModeCombo.setImmediate(true);
    TagMatchModeItem exactMatchItem = new TagMatchModeItem("exact match", TagMatchMode.EXACT);
    tagMatchModeCombo.addItem(exactMatchItem);
    tagMatchModeCombo.addItem(new TagMatchModeItem("boundary match", TagMatchMode.BOUNDARY));
    tagMatchModeCombo.addItem(new TagMatchModeItem("overlap match", TagMatchMode.OVERLAP));
    tagMatchModeCombo.setNullSelectionAllowed(false);
    tagMatchModeCombo.setNewItemsAllowed(false);

    tagMatchModeCombo.setDescription(
            "The three different match modes influence the way tags refine" + " your search results:" + "<ul>"
                    + "<li>exact match - the tag boundaries have to match exactly to "
                    + "keep a result item in the result set</li>"
                    + "<li>boundary match - result items that should be kept in the "
                    + "result set must start and end within the boundaries of the tag</li>"
                    + "<li>overlap - the result items that should be kept in the result "
                    + "set must overlap with the range of the tag</li>" + "</ul>");
    tagMatchModeCombo.setValue(exactMatchItem);

    tagSearchPanel.addComponent(tagMatchModeCombo);
    tagSearchPanel.setExpandRatio(tagMatchModeCombo, 0.2f);

    splitPanel = new VerticalSplitPanel();
    contentPanel.addComponent(splitPanel);

    splitPanel.addComponent(tagSearchPanel);
    if (tagsetDefinitionDictionary.isEmpty()) {
        splitPanel.setVisible(false);
    } else {
        tagsetTree.addTagsetDefinition(tagsetDefinitionDictionary.values());
    }

    resultPanel = new ResultPanel(queryOptions);
    splitPanel.addComponent(resultPanel);

    initSearchPanelComponents(contentPanel);

}

From source file:de.catma.ui.repository.wizard.IndexerOptionsPanel.java

License:Open Source License

private void initComponents() {
    setSpacing(true);//from w  ww  .  j a  v a2 s.  co  m
    setSizeFull();

    Label infoLabel = new Label();

    infoLabel.setContentMode(Label.CONTENT_XHTML);
    infoLabel.setValue("<p>This section allows you to finetune the creation "
            + "of the word list of your Source Document.</p>"
            + "<p>If you are unsure what to do, just select the language "
            + "and leave everything else unmodified.</p>");
    addComponent(infoLabel, 0, 0, 2, 0);

    cbUseApostrophe = new CheckBox("always use the apostrophe as a word separator");

    addComponent(cbUseApostrophe, 0, 1, 2, 1);

    Locale[] all = Locale.getAvailableLocales();

    sortedLangs = new TreeSet<LanguageItem>();
    for (Locale locale : all) {
        sortedLangs.add(new LanguageItem(locale));
    }

    languagesListSelect = new ListSelect("Please select the predominant language of the Source Document:",
            sortedLangs);
    languagesListSelect.setNullSelectionAllowed(false);
    languagesListSelect.setSizeFull();
    languagesListSelect.setImmediate(true);

    addComponent(languagesListSelect, 0, 2, 0, 3);

    unseparableCharacterSequencesListSelect = new ListSelect("Unseparable character sequences:");
    unseparableCharacterSequencesListSelect.setNullSelectionAllowed(false);
    unseparableCharacterSequencesListSelect.setSizeFull();
    unseparableCharacterSequencesListSelect.setImmediate(true);

    addComponent(unseparableCharacterSequencesListSelect, 1, 2, 1, 3);

    HorizontalLayout ucsAddRemoveLayout = new HorizontalLayout();
    Panel ucsAddRemovePanel = new Panel(ucsAddRemoveLayout);
    ucsAddRemovePanel.setStyleName(Reindeer.PANEL_LIGHT);
    ucsAddRemoveLayout.setSpacing(true);
    ucsAddRemoveLayout.setSizeFull();

    btAddUcs = new Button("Add entry");
    btAddUcs.setEnabled(false);
    ucsAddRemovePanel.addComponent(btAddUcs);
    tfUcs = new TextField();
    tfUcs.setInputPrompt("Add things like 'e.g.' as you see fit.");
    tfUcs.setImmediate(true);
    tfUcs.setTextChangeEventMode(TextChangeEventMode.EAGER);
    tfUcs.setWidth("100%");

    ucsAddRemovePanel.addComponent(tfUcs);
    ucsAddRemoveLayout.setExpandRatio(tfUcs, 2);
    btRemoveUcs = new Button("Remove entry");
    btRemoveUcs.setEnabled(false);
    ucsAddRemovePanel.addComponent(btRemoveUcs);

    addComponent(ucsAddRemovePanel, 1, 4);

    VerticalLayout loadSavePanel = new VerticalLayout();
    loadSavePanel.setSpacing(true);
    loadSavePanel.setWidth("80px");

    btLoadUcsList = new Button("Load list");
    loadSavePanel.addComponent(btLoadUcsList);
    btSaveUcsList = new Button("Save list");
    loadSavePanel.addComponent(btSaveUcsList);

    addComponent(loadSavePanel, 2, 2);

    setColumnExpandRatio(0, 2);
    setColumnExpandRatio(1, 2);

    setRowExpandRatio(2, 2);
    setRowExpandRatio(3, 2);
}

From source file:de.catma.ui.repository.wizard.LocationPanel.java

License:Open Source License

private void initComponents() {
    setSpacing(true);//from   w ww  . ja v  a2  s  .  c om
    setMargin(true, false, false, false);

    setSizeFull();
    HorizontalLayout remoteLayout = new HorizontalLayout();
    remoteLayout.setMargin(true);
    remoteLayout.setSpacing(true);
    remoteLayout.setSizeFull();

    remoteURIInputPanel = new Panel(remoteLayout);

    remoteURIInput = new TextField();
    remoteURIInput.setCaption("Enter an URI that is accessible over the internet:");
    remoteURIInput.setWidth("100%");
    remoteURIInput.setTextChangeEventMode(TextChangeEventMode.EAGER);
    remoteURIInputPanel.addComponent(remoteURIInput);
    remoteLayout.setExpandRatio(remoteURIInput, 2);

    addComponent(remoteURIInputPanel);

    Label localFileLabel = new Label("or upload a local file from your computer:");
    addComponent(localFileLabel);

    uploadPanel = new UploadPanel();

    addComponent(uploadPanel);
}

From source file:de.kaiserpfalzEdv.vaadin.PiraccUI.java

License:Apache License

protected void showMainView() {
    HorizontalLayout screen = new HorizontalLayout();

    CssLayout viewContainer = new CssLayout();
    viewContainer.addStyleName("valo-content");
    viewContainer.setSizeFull();//from  w w w.  java 2s .  c  o  m

    screen.setStyleName("main-screen");
    screen.addComponent(menu);
    screen.addComponent(viewContainer);
    screen.setExpandRatio(viewContainer, 1);
    screen.setSizeFull();

    Navigator navigator = new Navigator(this, viewContainer);
    navigator.addProvider(viewProvider);

    addStyleName(ValoTheme.UI_WITH_MENU);
    setContent(screen);

    if (isNotBlank(getNavigator().getState())) {
        getNavigator().navigateTo(getNavigator().getState());
    }

    menu.generate();
}

From source file:de.lmu.ifi.dbs.knowing.vaadin.MainApplication.java

License:Apache License

@Override
public void init() {
    main = new Window("Knowing Vaadin Application");
    mainLayout = (VerticalLayout) main.getContent();
    mainLayout.setMargin(false);// w  w w . ja va  2  s . c  o  m
    // mainLayout.setStyleName("blue");
    setMainWindow(main);

    mainLayout.setSizeFull();
    mainLayout.addComponent(getMenu());

    HorizontalLayout content = new HorizontalLayout();
    contentPanel.setSizeFull();
    content.setSizeFull();
    content.addComponent(contentPanel);

    mainLayout.addComponent(content);
    mainLayout.setExpandRatio(content, 1);

    uiFactory = TypedActor.newInstance(UIFactory.class, new TypedActorFactory() {
        @Override
        public TypedActor create() {
            return new VaadinUIFactory(main);
        }
    });
}

From source file:de.mendelson.comm.as2.webclient2.AS2WebUI.java

private HorizontalLayout createButtonBar() {
    HorizontalLayout buttonLayout = new HorizontalLayout();
    buttonLayout.setSizeFull();
    Button buttonRefresh = new Button("Refresh");
    buttonRefresh.setIcon(new ThemeResource("images/refresh16x16.gif"));
    buttonRefresh.setEnabled(true);/*  w w  w  .  j  ava 2s.  c  o  m*/
    buttonRefresh.addListener(new ClickListener() {
        @Override
        public void buttonClick(ClickEvent event) {
            AS2WebUI.this.refreshOverviewTableData();
        }
    });
    buttonLayout.addComponent(buttonRefresh);
    this.buttonDetails = new Button("Message details");
    this.buttonDetails.setIcon(new ThemeResource("images/messagedetails16x16.gif"));
    this.buttonDetails.setEnabled(false);
    this.buttonDetails.addListener(new ClickListener() {
        @Override
        public void buttonClick(ClickEvent event) {
            AS2WebUI.this.displayMessageDetailsOfSelectedRow();
        }
    });
    buttonLayout.addComponent(this.buttonDetails);
    this.labelUsername.setWidth(null);
    buttonLayout.addComponent(this.labelUsername);
    buttonLayout.setComponentAlignment(this.labelUsername, Alignment.MIDDLE_RIGHT);
    buttonLayout.setExpandRatio(buttonRefresh, 0.0f);
    buttonLayout.setExpandRatio(this.buttonDetails, 0.0f);
    buttonLayout.setExpandRatio(this.labelUsername, 1.0f);
    return (buttonLayout);
}

From source file:de.mendelson.comm.as2.webclient2.OkDialog.java

public void init() {
    this.setModal(true);
    VerticalLayout okDialogLayout = new VerticalLayout();
    HorizontalLayout contentLayout = new HorizontalLayout();
    AbstractComponent contentPanel = this.getContentPanel();
    contentLayout.addComponent(contentPanel);
    contentLayout.setMargin(true);// w w  w  .  j a  v a2  s  . c om
    contentLayout.setSizeFull();
    okDialogLayout.addComponent(contentLayout);
    HorizontalLayout buttonLayout = new HorizontalLayout();
    buttonLayout.setSizeFull();
    buttonLayout.setMargin(false, true, false, false);
    buttonLayout.addComponent(this.okButton);
    buttonLayout.setComponentAlignment(this.okButton, Alignment.MIDDLE_RIGHT);
    this.okButton.addListener(this);
    okDialogLayout.addComponent(buttonLayout);
    okDialogLayout.setExpandRatio(contentLayout, 1.0f);
    okDialogLayout.setExpandRatio(buttonLayout, 0.0f);
    this.setContent(okDialogLayout);
    this.setHeight(this.height + "px");
    this.setWidth(this.width + "px");
}

From source file:de.uni_tuebingen.qbic.qbicmainportlet.BiologicalSamplesComponent.java

License:Open Source License

/**
 * Precondition: {DatasetView#table} has to be initialized. e.g. with
 * {DatasetView#buildFilterTable} If it is not, strange behaviour has to be expected. builds the
 * Layout of this view.//from w w w  .j av  a2  s .c o  m
 */
private void buildLayout() {
    this.vert.removeAllComponents();
    this.vert.setSizeFull();
    vert.setResponsive(true);

    // Table (containing datasets) section
    VerticalLayout tableSection = new VerticalLayout();
    HorizontalLayout tableSectionContent = new HorizontalLayout();
    HorizontalLayout sampletableSectionContent = new HorizontalLayout();
    tableSection.setResponsive(true);
    tableSectionContent.setResponsive(true);
    sampletableSectionContent.setResponsive(true);

    tableSectionContent.setMargin(new MarginInfo(true, false, false, false));
    sampletableSectionContent.setMargin(new MarginInfo(true, false, false, false));

    // tableSectionContent.setCaption("Datasets");
    // tableSectionContent.setIcon(FontAwesome.FLASK);
    tableSection.addComponent(new Label(String.format(
            "This view shows the sample sources (e.g., human, mouse) to be studied and the corresponding extracted samples. With sample sources, information specific to the subject (e.g., age or BMI in the case of patient data) can be stored. The extracted sample is a sample which has been extracted from the corresponding sample source. This is the raw sample material that can be later prepared for specific analytical methods such as MS or NGS.<br> "
                    + "\n\n There are %s extracted  samples coming from %s distinct sample sources in this study.",
            numberOfBioSamples, numberOfEntitySamples), ContentMode.HTML));

    tableSectionContent.addComponent(sampleBioGrid);
    sampletableSectionContent.addComponent(sampleEntityGrid);

    sampleEntityGrid.setCaption("Sample Sources");
    sampleBioGrid.setCaption("Extracted Samples");

    tableSection.setMargin(new MarginInfo(true, false, true, true));
    tableSection.setSpacing(true);

    tableSection.addComponent(sampletableSectionContent);
    tableSection.addComponent(exportSources);
    tableSection.addComponent(tableSectionContent);
    tableSection.addComponent(exportSamples);
    this.vert.addComponent(tableSection);

    sampleBioGrid.setWidth(100, Unit.PERCENTAGE);
    sampleEntityGrid.setWidth(100, Unit.PERCENTAGE);

    // sampleBioGrid.setHeightMode(HeightMode.ROW);
    // sampleEntityGrid.setHeightMode(HeightMode.ROW);

    // sampleBioGrid.setHeightByRows(Math.min(10, numberOfBioSamples));
    // sampleEntityGrid.setHeightByRows(Math.min(10, 5));

    tableSection.setSizeFull();
    sampletableSectionContent.setSizeFull();
    tableSectionContent.setSizeFull();
}