Example usage for com.vaadin.ui Panel Panel

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

Introduction

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

Prototype

public Panel() 

Source Link

Document

Creates a new empty panel.

Usage

From source file:org.escidoc.browser.elabsmodul.views.StudyView.java

License:Open Source License

/**
 * This is the inner Right Cell within a Context By default a set of Organizational Unit / Admin Description /
 * RelatedItem / Resources are bound/*ww w  .  j  av a2  s  .  c  o  m*/
 * 
 * @param comptoBind
 */
private void rightCell(final Component comptoBind) {
    final Panel rightpnl = new Panel();
    rightpnl.setDescription(RIGHT_PANEL);
    rightpnl.setStyleName("floatright");
    rightpnl.addStyleName(Runo.PANEL_LIGHT);
    rightpnl.setSizeFull();
    VerticalLayout vlRightPnl = new VerticalLayout();
    vlRightPnl.setSizeFull();
    vlRightPnl.setMargin(false);
    vlRightPnl.addComponent(comptoBind);
    rightpnl.setContent(vlRightPnl);
    this.directMemberExperimentContainer.addComponent(rightpnl);
    this.directMemberExperimentContainer.setExpandRatio(rightpnl, 7.0f);
}

From source file:org.escidoc.browser.elabsmodul.views.StudyView.java

License:Open Source License

private void leftCell() throws EscidocClientException {
    final Panel leftPanel = new Panel();
    leftPanel.setStyleName("directmembers floatleft");
    leftPanel.setScrollable(false);/*from w  ww  . j a v  a 2  s  .  c  o  m*/
    leftPanel.setSizeFull();
    VerticalLayout vlLeftPanel = new VerticalLayout();
    vlLeftPanel.setSizeFull();
    vlLeftPanel.setMargin(false);
    leftPanel.setContent(vlLeftPanel);
    new DirectMember(this.router.getServiceLocation(), this.router, this.containerProxy.getId(),
            this.router.getMainWindow(), this.router.getRepositories(), leftPanel,
            ResourceType.CONTAINER.toString()).containerAsTree();
    this.directMemberExperimentContainer.addComponent(leftPanel);
    this.directMemberExperimentContainer.setExpandRatio(leftPanel, 3.0f);
}

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

License:Open Source License

public Panel buildNavigationPanel()
        throws EscidocClientException, UnsupportedOperationException, URISyntaxException {
    // common part: create layout
    navigationPanel = new Panel();
    navigationPanel.setImmediate(false);
    navigationPanel.setWidth("100.0%");
    navigationPanel.setHeight("100.0%");

    // vlNavigationPanel
    vlNavigationPanel = new VerticalLayout();
    vlNavigationPanel.setImmediate(false);
    vlNavigationPanel.setWidth("100.0%");
    vlNavigationPanel.setHeight("100.0%");
    vlNavigationPanel.setMargin(false);//  w w  w  . ja  v a  2s .  c om

    // Binding the tree to the NavigationPanel
    NavigationTreeView mainNavigationTree = addNavigationTree();
    addAccordion();
    navigationPanel.setContent(vlNavigationPanel);
    return navigationPanel;
}

From source file:org.escidoc.browser.ui.maincontent.ContainerMetadataRecordsView.java

License:Open Source License

public Panel asPanel() {
    final Panel pnlmetadataRecs = new Panel();
    pnlmetadataRecs.setSizeFull();/*from   ww w .j  av a2 s. co m*/
    VerticalLayout vl = new VerticalLayout();
    vl.setImmediate(false);
    vl.setWidth("100.0%");
    vl.setHeight("100.0%");
    vl.setMargin(false);
    vl.addComponent(lblMetadaRecs());

    pnlmetadataRecs.setContent(vl);
    return pnlmetadataRecs;
}

From source file:org.escidoc.browser.ui.maincontent.ContainerMetadataRecordsView.java

License:Open Source License

@SuppressWarnings("serial")
private Panel lblAddtionalResources() {
    final Panel pnl = new Panel();
    pnl.setSizeFull();//from   w  ww .j ava  2  s  .com
    VerticalLayout hl = new VerticalLayout();
    hl.setSizeFull();
    final Button btnVersionHistoryContainer = new Button("Container Version History",
            new VersionHistoryClickListener(resourceProxy, mainWindow, repositories));
    btnVersionHistoryContainer.setStyleName(BaseTheme.BUTTON_LINK);
    btnVersionHistoryContainer.setDescription("Show Version history in a Pop-up");

    final CssLayout cssLayout = new CssLayout();
    buildPanelHeader(cssLayout, "Additional Resources");
    ThemeResource ICON = new ThemeResource("images/assets/plus.png");

    final Button addResourceButton = new Button();
    addResourceButton.setStyleName(BaseTheme.BUTTON_LINK);
    addResourceButton.addStyleName("floatright paddingtop3");
    addResourceButton.setWidth("20px");
    addResourceButton.setIcon(ICON);
    addResourceButton.addListener(new ClickListener() {

        @Override
        public void buttonClick(final ClickEvent event) {
            final Window subwindow = new Window("A modal subwindow");
            subwindow.setModal(true);
            subwindow.setWidth("650px");
            VerticalLayout layout = (VerticalLayout) subwindow.getContent();
            layout.setMargin(true);
            layout.setSpacing(true);

            subwindow.addComponent(new Label("Not yet implemented"));
            Button close = new Button("Close", new Button.ClickListener() {
                @Override
                public void buttonClick(@SuppressWarnings("unused") ClickEvent event) {
                    (subwindow.getParent()).removeWindow(subwindow);
                }
            });
            layout.addComponent(close);
            layout.setComponentAlignment(close, Alignment.TOP_RIGHT);

            router.getMainWindow().addWindow(subwindow);

        }

    });
    cssLayout.addComponent(addResourceButton);
    hl.addComponent(cssLayout);

    hl.addComponent(btnVersionHistoryContainer);
    pnl.setContent(hl);
    return pnl;
}

From source file:org.escidoc.browser.ui.maincontent.ContainerView.java

License:Open Source License

private Panel buildMetaViewsPanel() throws EscidocClientException {
    // common part: create layout
    Panel metaViewsPanel = new Panel();
    metaViewsPanel.setImmediate(false);//www .  j av  a 2  s  . c  o m
    metaViewsPanel.setWidth("100.0%");
    metaViewsPanel.setHeight("100.0%");
    metaViewsPanel.setStyleName(Runo.PANEL_LIGHT);

    // hlMetaViews
    HorizontalLayout hlMetaViews = buildHlMetaViews();
    metaViewsPanel.setContent(hlMetaViews);

    return metaViewsPanel;
}

From source file:org.escidoc.browser.ui.maincontent.ContainerView.java

License:Open Source License

private Panel buildLeftPanel() throws EscidocClientException {
    // common part: create layout
    Panel leftPanel = new Panel();
    leftPanel.setImmediate(false);/*from   w  w  w  .  j a  v  a2 s.  com*/
    leftPanel.setWidth("100.0%");
    leftPanel.setHeight("100.0%");

    // vlLeftPanel
    VerticalLayout vlLeftPanel = buildVlLeftPanel();
    leftPanel.setContent(vlLeftPanel);

    return leftPanel;
}

From source file:org.escidoc.browser.ui.maincontent.ContainerView.java

License:Open Source License

private Panel buildDirectMembersPanel() throws EscidocClientException {
    // common part: create layout
    Panel directMembersPanel = new Panel();
    directMembersPanel.setImmediate(true);
    directMembersPanel.setSizeFull();//from   w ww  .j  ava2s  . c  o  m
    directMembersPanel.setScrollable(true);
    directMembersPanel.setStyleName(Runo.PANEL_LIGHT);

    // vlDirectMember
    VerticalLayout vlDirectMember = new VerticalLayout();
    vlDirectMember.setImmediate(true);
    vlDirectMember.setWidth("100.0%");
    vlDirectMember.setHeight("100.0%");
    vlDirectMember.setMargin(false);
    directMembersPanel.setContent(vlDirectMember);
    new DirectMember(serviceLocation, router, resourceProxy.getId(), mainWindow, repositories,
            directMembersPanel, ResourceType.CONTAINER.toString()).containerAsTree();

    return directMembersPanel;
}

From source file:org.escidoc.browser.ui.maincontent.ContainerView.java

License:Open Source License

private Panel buildResourcePropertiesPanel() {
    // common part: create layout
    Panel resourcePropertiesPanel = new Panel();
    resourcePropertiesPanel.setImmediate(false);
    resourcePropertiesPanel.setWidth("100.0%");
    resourcePropertiesPanel.setHeight("100.0%");
    resourcePropertiesPanel.setStyleName(Runo.PANEL_LIGHT);

    // vlResourceProperties
    VerticalLayout vlResourceProperties = buildVlResourceProperties();
    resourcePropertiesPanel.setContent(vlResourceProperties);

    return resourcePropertiesPanel;
}

From source file:org.escidoc.browser.ui.maincontent.ContainerView.java

License:Open Source License

private static Panel buildLeftPropertiesPnl() {
    Panel pnlPropertiesLeft = new Panel();
    pnlPropertiesLeft.setWidth("40%");
    pnlPropertiesLeft.setHeight("60px");
    pnlPropertiesLeft.setStyleName("floatleft");
    pnlPropertiesLeft.addStyleName(Runo.PANEL_LIGHT);

    VerticalLayout vl = new VerticalLayout();
    vl.setMargin(false);//from   w  w w  . j  av a2s  .c o m
    pnlPropertiesLeft.setContent(vl);
    return pnlPropertiesLeft;
}