Example usage for com.vaadin.ui Panel setStyleName

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

Introduction

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

Prototype

@Override
    public void setStyleName(String style) 

Source Link

Usage

From source file:org.escidoc.browser.controller.ContentModelView.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%");
    resourcePropertiesPanel.setStyleName(Runo.PANEL_LIGHT);

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

    return resourcePropertiesPanel;
}

From source file:org.escidoc.browser.controller.ContentModelView.java

License:Open Source License

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

    // vlBreadCrump
    VerticalLayout vlBreadCrump = new VerticalLayout();
    vlBreadCrump.setImmediate(false);//  w  w w .  j ava2  s.c  om
    vlBreadCrump.setWidth("100.0%");
    vlBreadCrump.setHeight("100.0%");
    vlBreadCrump.setMargin(false);
    breadCrumpPanel.setContent(vlBreadCrump);

    // BreadCreumb
    new BreadCrumbMenu(breadCrumpPanel, resourceProxy.getName().toString());

    return breadCrumpPanel;
}

From source file:org.escidoc.browser.ekinematixmodule.views.RechercheView.java

License:Open Source License

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

    // vlBreadCrump
    VerticalLayout vlBreadCrump = new VerticalLayout();
    vlBreadCrump.setImmediate(false);/*from w  w w.  ja  va  2 s. co m*/
    vlBreadCrump.setWidth("100.0%");
    vlBreadCrump.setHeight("100.0%");
    vlBreadCrump.setMargin(false);
    breadCrumpPanel.setContent(vlBreadCrump);

    // BreadCreumb
    new BreadCrumbMenu(breadCrumpPanel, resourceProxy);

    return breadCrumpPanel;
}

From source file:org.escidoc.browser.elabsmodul.views.helpers.ResourcePropertiesViewHelper.java

License:Open Source License

public Panel generatePropertiesView() {
    // Item title
    String resourceType = resourceProxy.getType().toString();
    if (this.type != null && this.type.length() > 0) {
        resourceType = this.type;
    }/*from   ww  w .jav a 2 s . c o  m*/
    final Label titleLabel = new Label(resourceType.substring(0, 1).toUpperCase()
            + resourceType.substring(1).toLowerCase() + ": " + resourceProxy.getName());
    titleLabel.setDescription("header");
    titleLabel.setStyleName("h2 fullwidth");

    // HR Ruler
    final Label descRuler = new Label("<hr/>", Label.CONTENT_RAW);
    descRuler.setStyleName("hr");

    // ItemProperties View
    final CssLayout propertiesView = new CssLayout();
    propertiesView.setWidth("100%");
    propertiesView.setHeight("100%");

    final Label descMetadata1 = new Label("ID: " + resourceProxy.getId());
    final Label descMetadata2 = new Label(
            LAST_MODIFIED_BY + " " + resourceProxy.getModifier() + " on " + resourceProxy.getModifiedOn(),
            Label.CONTENT_XHTML);

    final Panel pnlPropertiesLeft = buildLeftPanel();
    pnlPropertiesLeft.setWidth("40%");
    pnlPropertiesLeft.setHeight("20px");
    pnlPropertiesLeft.setStyleName(FLOAT_LEFT);
    pnlPropertiesLeft.addStyleName(Runo.PANEL_LIGHT);
    pnlPropertiesLeft.getLayout().setMargin(false);
    pnlPropertiesLeft.addComponent(descMetadata1);

    final Panel pnlPropertiesRight = buildRightPanel();
    pnlPropertiesRight.setWidth("60%");
    pnlPropertiesRight.setHeight("20px");
    pnlPropertiesRight.setStyleName(FLOAT_RIGHT);
    pnlPropertiesRight.addStyleName(Runo.PANEL_LIGHT);
    pnlPropertiesRight.getLayout().setMargin(false);
    pnlPropertiesRight.addComponent(descMetadata2);

    propertiesView.addComponent(pnlPropertiesLeft);
    propertiesView.addComponent(pnlPropertiesRight);

    Panel viewHandler = buildmainView();

    new BreadCrumbMenu(viewHandler, breadCrumbModel, serviceLocation);

    viewHandler.addComponent(titleLabel);
    viewHandler.addComponent(descRuler);
    viewHandler.addComponent(propertiesView);

    return viewHandler;
}

From source file:org.escidoc.browser.elabsmodul.views.helpers.ResourcePropertiesViewHelper.java

License:Open Source License

private Panel buildmainView() {
    Panel viewHandler = new Panel();
    viewHandler.getLayout().setMargin(false);
    viewHandler.setStyleName(Runo.PANEL_LIGHT);
    return viewHandler;
}

From source file:org.escidoc.browser.elabsmodul.views.helpers.ResourcePropertiesViewHelper.java

License:Open Source License

private Panel buildRightPanel() {
    final Panel pnlPropertiesRight = new Panel();
    pnlPropertiesRight.setWidth("60%");
    pnlPropertiesRight.setHeight("60px");
    pnlPropertiesRight.setStyleName(FLOAT_RIGHT);
    pnlPropertiesRight.addStyleName(Runo.PANEL_LIGHT);
    return pnlPropertiesRight;
}

From source file:org.escidoc.browser.elabsmodul.views.helpers.ResourcePropertiesViewHelper.java

License:Open Source License

private Panel buildLeftPanel() {
    final Panel pnlPropertiesLeft = new Panel();
    pnlPropertiesLeft.setWidth("40%");
    pnlPropertiesLeft.setHeight("70px");
    pnlPropertiesLeft.setStyleName(FLOAT_LEFT);
    pnlPropertiesLeft.addStyleName(Runo.PANEL_LIGHT);
    return pnlPropertiesLeft;
}

From source file:org.escidoc.browser.elabsmodul.views.InvestigationSeriesView.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/*from  w w w. j a  va2  s  . c om*/
 * 
 * @param comptoBind
 */
// TODO why deprecated?
@SuppressWarnings("deprecation")
private void rightCell(Component comptoBind) {
    Panel rightpnl = new Panel();
    rightpnl.setStyleName("floatright");
    rightpnl.addStyleName(Runo.PANEL_LIGHT);
    rightpnl.setSizeFull();
    rightpnl.getLayout().setMargin(false);
    rightpnl.addComponent(comptoBind);
    this.directMemberInvSeriesContainer.addComponent(rightpnl);
    this.directMemberInvSeriesContainer.setExpandRatio(rightpnl, 7.0f);

}

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

License:Open Source License

private void leftCell() throws EscidocClientException {
    Panel leftPanel = new Panel();
    leftPanel.setStyleName("directmembers floatleft");
    leftPanel.setScrollable(false);//from   ww  w .  j  av  a 2  s.  co m
    leftPanel.setSizeFull();

    VerticalLayout vl = new VerticalLayout();
    vl.setMargin(false);
    vl.setSizeFull();
    leftPanel.setContent(vl);
    new DirectMember(this.router.getServiceLocation(), this.router, this.containerProxy.getId(),
            this.router.getMainWindow(), router.getRepositories(), leftPanel, ResourceType.CONTAINER.toString())
                    .containerAsTree();
    this.directMemberInvSeriesContainer.addComponent(leftPanel);
    this.directMemberInvSeriesContainer.setExpandRatio(leftPanel, 3.0f);
}

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

License:Open Source License

private void leftCell() throws EscidocClientException {
    final Panel leftPanel = new Panel();
    leftPanel.setStyleName("directmembers floatleft");
    leftPanel.setScrollable(false);/*from  w w  w .j a  va 2  s.c o m*/
    leftPanel.setSizeFull();

    VerticalLayout vl = new VerticalLayout();
    vl.setMargin(false);
    vl.setSizeFull();
    leftPanel.setContent(vl);
    new DirectMember(this.router.getServiceLocation(), this.router, containerProxy.getId(),
            this.router.getMainWindow(), this.router.getRepositories(), leftPanel,
            ResourceType.CONTAINER.toString()).containerAsTree();
    directMemberInvestigationContainer.addComponent(leftPanel);
    directMemberInvestigationContainer.setExpandRatio(leftPanel, 3.0f);
}