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.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 ww w . java 2  s .  c  o  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.AddNewEndpointURIWindow.java

License:Open Source License

@SuppressWarnings("serial")
private Component buildGUI() {
    final VerticalLayout rootLayout = new VerticalLayout();
    final HorizontalLayout inputLayout = new HorizontalLayout();
    inputLayout.setSpacing(true);/*  www.  j  ava 2 s  .  com*/
    endpointURITextField = new TextField();
    endpointURITextField.setEnabled(true);
    endpointURITextField.setVisible(true);
    endpointURITextField.setNullRepresentation("");
    endpointURITextField.setValue("http://");
    endpointURITextField.setImmediate(true);
    endpointURITextField.setRequired(true);
    endpointURITextField.setRequiredError("URI cannot be empty!");
    endpointURITextField.setWidth("350px");
    endpointURITextField.focus();

    if (isEsyncURI) {
        inputLayout.addComponent(new Label("New eSync-endpoint URI:"), 0);
    } else {
        inputLayout.addComponent(new Label("New deposit-endpoint URI:"), 0);
    }
    inputLayout.addComponent(endpointURITextField, 1);

    final HorizontalLayout buttonLayout = new HorizontalLayout();
    buttonLayout.setSpacing(true);
    okButton = new Button(OK_BUTTON_TEXT, this);
    okButton.setIcon(ELabsViewContants.ICON_16_OK);
    okButton.setEnabled(true);
    cancelButton = new Button(CANCEL_BUTTON_TEXT, this);
    cancelButton.setIcon(ELabsViewContants.ICON_16_CANCEL);
    buttonLayout.addComponent(cancelButton);
    buttonLayout.addComponent(okButton);

    rootLayout.addComponent(inputLayout);
    rootLayout.addComponent(buttonLayout);

    Panel panel = new Panel();
    panel.setContent(rootLayout);

    panel.addActionHandler(new Action.Handler() {
        private final Action action_ok = new ShortcutAction("Enter key", ShortcutAction.KeyCode.ENTER, null);

        private final Action action_esc = new ShortcutAction("Escape key", ShortcutAction.KeyCode.ESCAPE, null);

        @Override
        public void handleAction(Action action, Object sender, Object target) {
            if (action.equals(action_ok)) {
                AddNewEndpointURIWindow.this.closeMe(true);
            } else if (action.equals(action_esc)) {
                AddNewEndpointURIWindow.this.closeMe(false);
            }
        }

        @Override
        public Action[] getActions(Object target, Object sender) {
            return new Action[] { action_ok, action_esc };
        }
    });
    return panel;
}

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

License:Open Source License

@SuppressWarnings("serial")
private Component buildGUI() {
    final VerticalLayout rootLayout = new VerticalLayout();
    final HorizontalLayout inputLayout = new HorizontalLayout();
    inputLayout.setSpacing(true);/*from www  .  j  ava2  s. com*/
    publicationTextField = new TextField();
    publicationTextField.setEnabled(true);
    publicationTextField.setVisible(true);
    publicationTextField.setNullRepresentation("");
    publicationTextField.setValue("http://");
    publicationTextField.setImmediate(true);
    publicationTextField.setRequired(true);
    publicationTextField.setRequiredError("Document URL cannot be empty!");
    publicationTextField.setWidth("350px");
    publicationTextField.focus();

    if (isMotPub) {
        inputLayout.addComponent(new Label("New motivating publication's URL:"), 0);
    } else {
        inputLayout.addComponent(new Label("New resulting publication's URL:"), 0);
    }
    inputLayout.addComponent(publicationTextField, 1);

    final HorizontalLayout buttonLayout = new HorizontalLayout();
    buttonLayout.setSpacing(true);
    okButton = new Button(OK_BUTTON_TEXT, this);
    okButton.setIcon(ELabsViewContants.ICON_16_OK);
    okButton.setEnabled(true);
    cancelButton = new Button(CANCEL_BUTTON_TEXT, this);
    cancelButton.setIcon(ELabsViewContants.ICON_16_CANCEL);
    buttonLayout.addComponent(cancelButton);
    buttonLayout.addComponent(okButton);

    rootLayout.addComponent(inputLayout);
    rootLayout.addComponent(buttonLayout);

    Panel panel = new Panel();
    panel.setContent(rootLayout);

    panel.addActionHandler(new Action.Handler() {
        private final Action action_ok = new ShortcutAction("Enter key", ShortcutAction.KeyCode.ENTER, null);

        private final Action action_esc = new ShortcutAction("Escape key", ShortcutAction.KeyCode.ESCAPE, null);

        @Override
        public void handleAction(Action action, Object sender, Object target) {
            if (action.equals(action_ok)) {
                AddNewStudyPublicationWindow.this.closeMe(true);
            } else if (action.equals(action_esc)) {
                AddNewStudyPublicationWindow.this.closeMe(false);
            }
        }

        @Override
        public Action[] getActions(Object target, Object sender) {
            return new Action[] { action_ok, action_esc };
        }
    });
    return panel;
}

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 ww w .  j  ava  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.InvestigationSeriesView.java

License:Open Source License

private void leftCell() throws EscidocClientException {
    Panel leftPanel = new Panel();
    leftPanel.setStyleName("directmembers floatleft");
    leftPanel.setScrollable(false);/*from w ww . ja  v a2s.c  o 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);/*  w  w w . j av  a 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);
}

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/*from   w  w w . j  av  a  2  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);
}