Example usage for com.vaadin.ui Panel addStyleName

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

Introduction

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

Prototype

@Override
    public void addStyleName(String style) 

Source Link

Usage

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   w w w.j a v  a  2 s. c  om*/
    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 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 .ja  va 2 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.InvestigationView.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 This Cell is binding the Panel and the Start/Stop button in the Investigation,
 * through StartInvestigationViewHelper/* ww  w .  ja  va2 s  .com*/
 * 
 * @param comptoBind
 */
@SuppressWarnings("deprecation")
private void rightCell(final Component comptoBind) {
    final Panel rightpnl = new Panel();
    rightpnl.setStyleName("floatright");
    rightpnl.addStyleName(Runo.PANEL_LIGHT);
    rightpnl.setSizeFull();
    rightpnl.getLayout().setMargin(false);
    rightpnl.addComponent(comptoBind);
    new StartInvestigationViewHelper(this, this.controller).createStartButton(rightpnl);
    directMemberInvestigationContainer.addComponent(rightpnl);
    directMemberInvestigationContainer.setExpandRatio(rightpnl, 7.0f);
}

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// w  ww  .ja v  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.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);// w w w  . j a v a  2  s .  c  o  m
    pnlPropertiesLeft.setContent(vl);
    return pnlPropertiesLeft;
}

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

License:Open Source License

private static Panel buildRightPnlProperties() {
    Panel pnlPropertiesRight = new Panel();
    pnlPropertiesRight.setWidth("60%");
    pnlPropertiesRight.setHeight("60px");
    pnlPropertiesRight.setStyleName("floatright");
    pnlPropertiesRight.addStyleName(Runo.PANEL_LIGHT);
    VerticalLayout vl = new VerticalLayout();
    vl.setMargin(false);// w  w  w.j a  va2 s . c  o  m
    pnlPropertiesRight.setContent(vl);
    return pnlPropertiesRight;
}

From source file:org.escidoc.browser.ui.view.helpers.ItemPropertiesVH.java

License:Open Source License

private Panel buildLeftPropertiesPnl() {
    final Panel pnlPropertiesLeft = new Panel();
    pnlPropertiesLeft.setWidth("40%");
    pnlPropertiesLeft.setHeight("60px");
    pnlPropertiesLeft.setStyleName(ViewConstants.FLOAT_LEFT);
    pnlPropertiesLeft.addStyleName(Runo.PANEL_LIGHT);
    pnlPropertiesLeft.getLayout().setMargin(false);
    return pnlPropertiesLeft;
}

From source file:org.escidoc.browser.ui.view.helpers.ItemPropertiesVH.java

License:Open Source License

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