Example usage for com.vaadin.ui Component setSizeFull

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

Introduction

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

Prototype

public void setSizeFull();

Source Link

Document

Sets the size to 100% x 100%.

Usage

From source file:com.vaadHL.window.base.BaseWindow.java

License:Apache License

/**
 * Creates the content of the window but does not set (display). The content
 * consists of three vertically placed areas: the upper, middle and bottom
 * area. Create content but don't bind data.
 * //from  ww w  . j  ava 2  s . c  o  m
 * @return The just created content of the window.
 */
public Component getCompositeContent() {
    VerticalLayout content = new VerticalLayout();
    Component c;
    c = makeUpperArea();
    if (c != null)
        content.addComponent(c);
    c = makeMiddleArea();
    if (c != null) {
        c.setSizeFull();
        content.addComponent(c);
        content.setExpandRatio(c, 1);
    }
    c = makeBottomArea();
    if (c != null) {
        VerticalLayout v = new VerticalLayout();
        v.addComponent(c);
        v.setComponentAlignment(c, Alignment.BOTTOM_CENTER);
        /*
         * Label gap = new Label(); gap.setHeight("5px");
         * v.addComponent(gap);
         */
        content.addComponent(v);
        content.setComponentAlignment(v, Alignment.BOTTOM_CENTER);
    }
    content.setSpacing(true);
    return (content);
}

From source file:com.vaadHL.window.base.BaseWindow.java

License:Apache License

/**
 * Creates and sets the content of the window. Uses
 * {@link #getCompositeContent getCompositeContent} for the content
 * creation. Create content but don't bind data.
 *///from w w w.  jav  a 2s  . c o m
public void setCompositeContent() {
    Component c = getCompositeContent();
    c.setSizeFull();
    VerticalLayout l = new VerticalLayout();
    l.addComponent(c);
    l.setSizeFull();
    l.setMargin(true);
    setContent(l);
}

From source file:de.catma.ui.analyzer.AnalyzerView.java

License:Open Source License

private void initComponents() {
    setSizeFull();/*www  . j ava2 s.c  o  m*/

    Component searchPanel = createSearchPanel();

    Component convenienceButtonPanel = createConvenienceButtonPanel();

    VerticalLayout searchAndConveniencePanel = new VerticalLayout();
    searchAndConveniencePanel.setSpacing(true);
    searchAndConveniencePanel.setMargin(true);
    searchAndConveniencePanel.addComponent(searchPanel);
    searchAndConveniencePanel.addComponent(convenienceButtonPanel);

    Component documentsPanel = createDocumentsPanel();

    HorizontalSplitPanel topPanel = new HorizontalSplitPanel();
    topPanel.setSplitPosition(70);
    topPanel.addComponent(searchAndConveniencePanel);
    topPanel.addComponent(documentsPanel);
    addComponent(topPanel);

    setExpandRatio(topPanel, 0.25f);

    Component resultPanel = createResultPanel();
    resultPanel.setSizeFull();

    addComponent(resultPanel);
    setExpandRatio(resultPanel, 0.75f);
}

From source file:de.dimm.vsm.vaadin.GuiElems.FileSystem.FSTreePanel.java

public void mount(MountEntry me) {
    if (viewWrapper != null) {
        main.getGuiServerApi().closePoolView(viewWrapper);
        viewWrapper = null;//from ww  w.  j a va 2  s  .  c  o  m
    }

    User usr = getUser(me);

    StoragePoolQry qry = StoragePoolQry.createMountEntryStoragePoolQry(usr, me);
    viewWrapper = main.getGuiServerApi().openPoolView(me.getPool(), qry, "");

    Component c = initFsTree(viewWrapper);
    c.setSizeFull();
    addComponent(tree);
    this.setExpandRatio(tree, 1.0f);

    mounted = true;
}

From source file:de.metas.ui.web.vaadin.window.editor.FieldEditor.java

License:Open Source License

public FieldEditor(final ViewPropertyDescriptor descriptor) {
    super(descriptor);
    addStyleName(STYLE_Field);/*from  w w w.  ja v  a2  s.c  om*/

    valueField = createValueField();
    valueField.addStyleName(STYLE_ValueField);
    valueField.setCaption(descriptor.getCaption());

    final Component content = valueField;
    content.setSizeFull();
    setCompositionRoot(content);

    valueField.addValueChangeListener(new Property.ValueChangeListener() {

        @Override
        public void valueChange(final Property.ValueChangeEvent event) {
            final T valueNew = valueField.getValue();
            listener().valueChange(getPropertyPath(), valueNew);
        }
    });
}

From source file:de.metas.ui.web.vaadin.window.editor.FieldEditorsContainer.java

License:Open Source License

private void addChildEditor(final Label label, final Component editorComp,
        final PropertyLayoutInfo layoutInfo) {
    final GridLayout content = getContent();
    int labelColumn = contentNextColumn * 2;
    int labelRow = contentNextRow;

    if (layoutInfo.isNextColumn()) {
        labelColumn = content.getColumns();
        labelRow = 0;/*  ww  w .j ava2  s  . co m*/
    }

    final int editorRowsSpan = layoutInfo.getRowsSpan();
    final int editorColumnFrom = labelColumn + 1;
    final int editorColumnTo = editorColumnFrom;
    final int editorRowFrom = labelRow;
    final int editorRowTo = editorRowFrom + (editorRowsSpan - 1);
    if (editorColumnTo >= content.getColumns()) {
        content.setColumns(editorColumnTo + 1);
    }
    if (editorRowTo >= content.getRows()) {
        content.setRows(editorRowTo + 1);
    }

    //
    //
    if (label != null) {
        content.addComponent(label, labelColumn, labelRow);
        content.setComponentAlignment(label, Alignment.MIDDLE_RIGHT);
    }
    content.addComponent(editorComp, editorColumnFrom, editorRowFrom, editorColumnTo, editorRowTo);
    content.setComponentAlignment(editorComp, Alignment.MIDDLE_LEFT);
    editorComp.setSizeFull();

    //
    //
    // contentNextColumn;
    contentNextRow = editorRowTo + 1;
}

From source file:de.steinwedel.messagebox.MessageBox.java

License:Apache License

/**
 * Sets a component as content to the message dialog.
 *
 * @param messageComponent The component as content
 * @return The {@link MessageBox} instance itself
 *///from  w  w w.j  a  v a  2s . c o m
public MessageBox withMessage(Component messageComponent) {
    if (this.messageComponent != null) {
        contentLayout.removeComponent(this.messageComponent);
    }

    this.messageComponent = messageComponent;

    if (messageComponent != null) {
        messageComponent.setSizeFull();
        contentLayout.addComponent(messageComponent, contentLayout.getComponentCount());
        contentLayout.setExpandRatio(messageComponent, 1.0f);
        contentLayout.setComponentAlignment(messageComponent, Alignment.MIDDLE_CENTER);
    }
    return this;
}

From source file:info.magnolia.ui.contentapp.detail.DetailEditorViewImpl.java

License:Open Source License

@Override
public void setViewType(final DetailView.ViewType type) {

    itemViewContainer.removeComponent(itemViews.get(currentViewType).asVaadinComponent());
    final Component c = itemViews.get(type).asVaadinComponent();

    c.setSizeFull();
    itemViewContainer.addComponent(c);/*from  w w w .j  a va2s  . com*/

    this.currentViewType = type;
    refresh();
    this.contentWorkbenchViewListener.onViewTypeChanged(currentViewType);
}

From source file:org.jumpmind.metl.ui.common.TabbedPanel.java

License:Open Source License

public void setMainTab(String caption, Resource icon, Component component) {
    component.setSizeFull();
    this.mainTab = addTab(component, caption, icon, 0);
}

From source file:org.jumpmind.metl.ui.common.TabbedPanel.java

License:Open Source License

public void addCloseableTab(String id, String caption, Resource icon, Component component) {
    Tab tab = tabsById.get(id);//w ww .  j  ava 2  s.  c om
    if (tab == null) {
        component.setSizeFull();
        contentToId.put(component, id);
        tab = addTab(component, caption, icon);
        tab.setClosable(true);
        tabsById.put(id, tab);
        setSelectedTab(tab);
    } else {
        setSelectedTab(tab);
    }
}