Example usage for com.vaadin.ui Panel setSizeFull

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

Introduction

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

Prototype

@Override
    public void setSizeFull() 

Source Link

Usage

From source file:de.catma.ui.repository.CorpusPanel.java

License:Open Source License

private Component createCorporaPanel() {
    Panel corporaPanel = new Panel();
    corporaPanel.getContent().setSizeUndefined();
    corporaPanel.setSizeFull();

    corporaContainer = new HierarchicalContainer();
    corporaTree = new Tree();
    corporaTree.setContainerDataSource(corporaContainer);

    corporaTree.addStyleName("bold-label-caption");
    corporaTree.setCaption("Corpora");
    corporaTree.addItem(allDocuments);/*from www . ja  v a 2s .c  o m*/
    corporaTree.setChildrenAllowed(allDocuments, false);
    corporaTree.setImmediate(true);

    corporaContainer.addContainerProperty(SORTCAP_PROP, String.class, null);

    for (Corpus c : repository.getCorpora()) {
        addCorpusToTree(c);
    }
    corporaContainer.sort(new Object[] { SORTCAP_PROP }, new boolean[] { true });

    corporaTree.setValue(allDocuments);

    corporaPanel.addComponent(corporaTree);

    return corporaPanel;
}

From source file:de.catma.ui.repository.SourceDocumentPanel.java

License:Open Source License

private Component createDocumentsPanel() {

    Panel documentsPanel = new Panel();

    documentsContainer = new HierarchicalContainer();
    documentsTree = new Tree();
    documentsTree.setContainerDataSource(documentsContainer);
    documentsTree.setCaption("Documents");
    documentsTree.addStyleName("bold-label-caption");
    documentsTree.setImmediate(true);/*from  ww  w .  java  2  s  .  co m*/
    documentsTree.setItemCaptionMode(Tree.ITEM_CAPTION_MODE_ID);
    documentsTree.setDragMode(TreeDragMode.NODE);

    documentsPanel.addComponent(documentsTree);
    documentsPanel.getContent().setSizeUndefined();
    documentsPanel.setSizeFull();

    documentsContainer.addContainerProperty(SORTCAP_PROP, String.class, null);

    for (SourceDocument sd : repository.getSourceDocuments()) {
        addSourceDocumentToTree(sd);
    }

    documentsContainer.sort(new Object[] { SORTCAP_PROP }, new boolean[] { true });

    return documentsPanel;
}

From source file:de.catma.ui.repository.SourceDocumentPanel.java

License:Open Source License

private Component createContentInfoForm() {

    Panel contentInfoPanel = new Panel();
    contentInfoPanel.getContent().setSizeUndefined();
    contentInfoPanel.getContent().setWidth("100%");
    contentInfoPanel.setSizeFull();

    contentInfoForm = new Form();
    contentInfoForm.setSizeFull();//from   w w  w.j  av  a  2 s  . c om
    contentInfoForm.setCaption("Information");
    contentInfoForm.setWriteThrough(false);
    contentInfoForm.setReadOnly(true);
    contentInfoForm.setEnabled(false);

    BeanItem<ContentInfoSet> contentInfoItem = new BeanItem<ContentInfoSet>(emptyContentInfoSet);
    contentInfoForm.setItemDataSource(contentInfoItem);
    contentInfoForm.setVisibleItemProperties(new String[] { "title", "author", "description", "publisher" });

    contentInfoForm.setReadOnly(true);
    contentInfoPanel.addComponent(contentInfoForm);

    return contentInfoPanel;
}

From source file:de.catma.ui.repository.TagLibraryPanel.java

License:Open Source License

private Component createTagLibraryTreePanel() {

    Panel tagLibraryPanel = new Panel();
    tagLibraryPanel.getContent().setSizeUndefined();
    tagLibraryPanel.setSizeFull();

    tagLibraryContainer = new HierarchicalContainer();

    tagLibrariesTree = new Tree();
    tagLibrariesTree.setContainerDataSource(tagLibraryContainer);

    tagLibrariesTree.setCaption("Tag Libraries");
    tagLibrariesTree.addStyleName("bold-label-caption");
    tagLibrariesTree.setImmediate(true);
    tagLibrariesTree.setItemCaptionMode(Tree.ITEM_CAPTION_MODE_ID);

    tagLibraryContainer.addContainerProperty(SORTCAP_PROP, String.class, null);

    for (TagLibraryReference tlr : repository.getTagLibraryReferences()) {
        addTagLibraryReferenceToTree(tlr);
    }/*from   w  w  w.  j ava2  s .c o m*/
    tagLibraryContainer.sort(new Object[] { SORTCAP_PROP }, new boolean[] { true });

    tagLibraryPanel.addComponent(tagLibrariesTree);

    return tagLibraryPanel;
}

From source file:de.escidoc.admintool.view.context.ContextAddView.java

License:Open Source License

private void addAdminDescriptorField() {
    adminDescriptorAccordion = new Accordion();
    adminDescriptorAccordion.setWidth(ViewConstants.FIELD_WIDTH);
    adminDescriptorAccordion.setSizeFull();

    final Panel accordionPanel = new Panel();
    accordionPanel.setContent(adminDescriptorAccordion);
    accordionPanel.setSizeFull();
    accordionPanel.setWidth(ViewConstants.FIELD_WIDTH);

    final Button addButton = new Button(ViewConstants.ADD_LABEL);
    final Button editButton = new Button(ViewConstants.EDIT_LABEL);
    final Button delButton = new Button(ViewConstants.REMOVE_LABEL);

    addButton.setStyleName("small");
    editButton.setStyleName("small");
    delButton.setStyleName("small");

    addButton.addListener(new NewAdminDescriptorListener(mainWindow, adminDescriptorAccordion));
    editButton.addListener(new EditAdminDescriptorListener(mainWindow, adminDescriptorAccordion));
    delButton.addListener(new RemoveAdminDescriptorListener(adminDescriptorAccordion));

    panel.addComponent(LayoutHelper.create("Admin Descriptors", accordionPanel, LABEL_WIDTH + 2, 300, false,
            new Button[] { addButton, editButton, delButton }));
}

From source file:de.escidoc.admintool.view.context.ContextEditForm.java

License:Open Source License

private void addAdminDescriptor() {
    adminDescriptorAccordion = new Accordion();
    adminDescriptorAccordion.setWidth(ViewConstants.FIELD_WIDTH);
    adminDescriptorAccordion.setSizeFull();

    final Panel accordionPanel = new Panel();
    accordionPanel.setContent(adminDescriptorAccordion);
    accordionPanel.setSizeFull();
    accordionPanel.setWidth(ViewConstants.FIELD_WIDTH);

    addAdminDescButton.setStyleName(AppConstants.SMALL_BUTTON);
    editAdminDescButton.setStyleName(AppConstants.SMALL_BUTTON);
    delAdminDescButton.setStyleName(AppConstants.SMALL_BUTTON);

    addAdminDescButton.addListener(new NewAdminDescriptorListener(mainWindow, adminDescriptorAccordion));
    editAdminDescButton.addListener(new EditAdminDescriptorListener(mainWindow, adminDescriptorAccordion));
    delAdminDescButton.addListener(new RemoveAdminDescriptorListener(adminDescriptorAccordion));

    form.addComponent(LayoutHelper.create("Admin Descriptors", accordionPanel, LABEL_WIDTH, 300, false,
            new Button[] { addAdminDescButton, editAdminDescButton, delAdminDescButton }));
}

From source file:de.escidoc.admintool.view.util.LayoutHelper.java

License:Open Source License

/**
 * Helper method. Puts a blank in front of a component.
 * //from w ww. jav a 2  s .  c  o  m
 * @param label
 *            The label in front of the control.
 * @param accordion
 *            The accordion to display.
 * @param width
 *            the fixed size of the label. The parameter has to be in CSS style, i.e. 400px for instance.
 * @param height
 * @param required
 *            should it be marked with an asterisk.
 * @return The component in an horizontal layout. A blank in front and afterwards is inserted.
 */
public static synchronized HorizontalLayout create(final String label, final Accordion accordion,
        final int width, final int height, final boolean required) {
    final HorizontalLayout hor = new HorizontalLayout();
    hor.setHeight(height + Constants.PX);
    hor.addComponent(new Label(" "));
    final String text = Constants.P_ALIGN_RIGHT + label + Constants.P;
    Label l;
    hor.addComponent(l = new Label(text, Label.CONTENT_XHTML));
    l.setSizeUndefined();
    l.setWidth(width + Constants.PX);
    hor.setComponentAlignment(l, Alignment.MIDDLE_RIGHT);
    if (required) {
        hor.addComponent(new Label(
                "&nbsp;<span style=\"color:red; position:relative; top:" + (height / 2 - 13) + "px;\">*</span>",
                Label.CONTENT_XHTML));
    } else {
        hor.addComponent(new Label("&nbsp;&nbsp;", Label.CONTENT_XHTML));
    }

    final Panel pan = new Panel();
    pan.setSizeFull();
    // Have it take all space available in the layout.
    accordion.setSizeFull();
    // Some components to put in the Accordion.

    final String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n\t<X>\n\t\t<today>\n\t\t</today>\n\t\t<today/>\n\t\t<today/>\n\t</X>\n</root>";

    for (int i = 0; i < 30; i++) {
        accordion.addTab(new Label(xml, Label.CONTENT_PREFORMATTED), "Tab" + i, null);
    }

    pan.addComponent(accordion);
    // pan.setSizeUndefined();
    pan.setWidth(accordion.getWidth() + Constants.PX);
    // pan.setHeight("500px");
    pan.setStyleName(Reindeer.PANEL_LIGHT);
    hor.addComponent(pan);
    hor.setComponentAlignment(pan, Alignment.MIDDLE_RIGHT);
    hor.addComponent(new Label(" "));
    hor.setSpacing(false);
    return hor;
}

From source file:de.fatalix.lighty.web.LightyApp.java

@Override
protected void init(VaadinRequest request) {
    setSizeFull();/*from ww w.  ja v a 2 s. c om*/
    VerticalLayout navigatorLayout = new VerticalLayout();
    navigatorLayout.setSizeFull();
    navigatorLayout.setSpacing(true);

    Panel contentPanel = new Panel(navigatorLayout);
    contentPanel.setSizeFull();
    contentPanel.addStyleName(LightyTheme.BACKGROUND);

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

    VerticalLayout rootLayout = new VerticalLayout();
    rootLayout.addComponent(new LightyHeader());
    rootLayout.addComponent(new LightyNavigation());
    rootLayout.addComponent(notificationBar);

    rootLayout.addComponent(contentPanel);
    rootLayout.setExpandRatio(contentPanel, 1.0f);
    rootLayout.setSizeFull();
    setContent(rootLayout);
}

From source file:de.fatalix.timeline.web.VaadinWebProjectApp.java

@Override
protected void init(VaadinRequest request) {
    setSizeFull();/*from w w w .j a  va 2 s .  c o m*/
    VerticalLayout navigatorLayout = new VerticalLayout();
    navigatorLayout.setSizeFull();
    navigatorLayout.setSpacing(true);

    Panel contentPanel = new Panel(navigatorLayout);
    contentPanel.setSizeFull();

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

    VerticalLayout rootLayout = new VerticalLayout();
    //rootLayout.addComponent(header);
    rootLayout.addComponent(contentPanel);
    rootLayout.setExpandRatio(contentPanel, 1.0f);
    rootLayout.setSizeFull();
    setContent(rootLayout);
}

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

/**Could be overwritten, contains the content to display*/
@Override//from   w  w w .  ja va2 s  .c  o  m
public AbstractComponent getContentPanel() {
    Panel panel = new Panel();
    VerticalLayout layout = new VerticalLayout();
    this.detailsTable = this.createDetailsTable();
    layout.addComponent(this.detailsTable);
    this.tabSheet = this.createTabSheet();
    layout.addComponent(this.tabSheet);
    layout.setSizeFull();
    panel.addComponent(layout);
    panel.setSizeFull();
    return (panel);
}