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:ru.codeinside.gses.webui.form.PrintPanel.java

License:Mozilla Public License

private Panel createDocumentPanel(Application app, String classId) {
    Embedded document = new Embedded(null, new FileResource(htmlFile, app));
    document.setDebugId(classId);//  www. java2 s.co  m
    document.setType(Embedded.TYPE_BROWSER);
    document.setSizeFull();

    VerticalLayout documentLayout = new VerticalLayout();
    documentLayout.setMargin(true);
    documentLayout.setSizeFull();
    documentLayout.addComponent(document);
    documentLayout.setExpandRatio(document, 1f);

    Panel documentPanel = new Panel(documentLayout);
    documentPanel.setSizeFull();
    return documentPanel;
}

From source file:ru.codeinside.gses.webui.manager.ManagerWorkplace.java

License:Mozilla Public License

private Component createProcedurePanel1() {
    HorizontalLayout hl = new HorizontalLayout();
    hl.setSpacing(true);//from  w w  w  . ja  v a  2s.  c om
    hl.setWidth("100%");
    hl.setHeight("100%");
    Panel panel00 = new Panel();
    panel00.setHeight("100%");
    panel00.setWidth("100%");
    Panel panel01 = new Panel();
    panel01.setWidth("100%");
    panel01.setHeight("100%");
    Panel panel10 = new Panel();
    panel10.setSizeFull();
    panel10.setScrollable(false);
    hl.addComponent(panel00);
    hl.addComponent(panel01);

    VerticalLayout vl = new VerticalLayout();
    vl.setSizeFull();
    vl.setMargin(true);
    vl.setSpacing(true);
    vl.addComponent(hl);
    vl.addComponent(panel10);

    hl.setExpandRatio(panel00, 0.33f);
    hl.setExpandRatio(panel01, 0.77f);
    vl.setExpandRatio(hl, 0.6f);
    vl.setExpandRatio(panel10, 0.4f);

    procedureForm = new ProcedureForm();
    procedureTable = new ProcedureTable(procedureForm);
    filter = createFilteringForm(procedureTable);
    panel00.addComponent(filter);
    panel01.addComponent(procedureForm);
    panel10.addComponent(procedureTable);
    ap.addItemSetChangeListener(filter);
    ap.addItemSetChangeListener(procedureForm);
    return vl;
}

From source file:ru.codeinside.gses.webui.manager.ManagerWorkplace.java

License:Mozilla Public License

private VerticalLayout createServicePanel() {
    final VerticalLayout serviceVerticalLayout = new VerticalLayout();
    serviceVerticalLayout.setSizeFull();
    ap = new ApServiceForm();
    Panel apForm = new Panel();
    apForm.addComponent(ap);//from www . j  a va  2s .co m
    apForm.setHeight("350px");
    Panel importForm = new Panel();
    ApServiceTable apServiceTable = new ApServiceTable(ap);
    apServiceTable.setSizeFull();
    Form form = new Form(new ServiceWidget(apServiceTable));
    form.setCaption(" ?");
    importForm.addComponent(form);
    importForm.setHeight("350px");
    HorizontalLayout hr = new HorizontalLayout();
    hr.setSizeFull();
    hr.setSpacing(true);
    hr.addComponent(apForm);
    hr.addComponent(importForm);
    serviceVerticalLayout.addComponent(hr);
    Panel apTable = new Panel("? ? ?");
    apTable.addComponent(apServiceTable);
    apTable.setSizeFull();
    serviceVerticalLayout.addComponent(apTable);
    serviceVerticalLayout.setSpacing(true);
    serviceVerticalLayout.setMargin(true);
    return serviceVerticalLayout;
}

From source file:ui.user.MissingTranslationsView.java

License:Apache License

public MissingTranslationsView(final Integer userId, String language) {
    super();//from w w w  .j av a 2 s . co m
    taskMap = new HashMap();
    this.userId = userId;
    this.language = language;
    setSizeFull();
    setSpacing(true);
    //setMargin(true);
    List<MissingTranslation> list = ServiceLocator.findLifetimeService().getMissingTranslations(userId,
            language);
    //
    String m = Translator.getTranslation(
            "You can contribute to our platform translating some words into your mother language", language);
    String message = "<h3>" + m + "</h3>";
    LifetimeLabel label = new LifetimeLabel(message, language, ContentMode.HTML);

    //
    tasks = new VerticalLayout();
    //tasks.setSizeFull();
    tasks.setMargin(true);
    for (final MissingTranslation mt : list) {
        System.out.println(">>>" + mt.getOrigin());
        System.out.println("<<<" + mt.getTarget());
        TranslationCard tCard = new TranslationCard(userId, mt.getWord(), mt.getOrigin(), mt.getTarget());
        tCard.setSizeFull();
        tCard.getTranslate().addClickListener(this);
        tasks.addComponent(tCard);
        taskMap.put(tCard.getTranslate(), tCard);
    }

    Panel p = new Panel(tasks);
    p.setSizeFull();
    addComponents(label, p);
    setExpandRatio(label, .3f);
    setExpandRatio(p, .7f);
    setComponentAlignment(label, Alignment.MIDDLE_CENTER);
    setComponentAlignment(p, Alignment.MIDDLE_CENTER);
    setStyleName("a-list");
}

From source file:ui.window.UsersWindow.java

License:Apache License

public UsersWindow(Integer userId, String language) {
    super(Translator.getTranslation("User Management Tool", language));
    setWidth("33%");
    setHeight("75%");
    center();/*from  w w  w . jav  a2s  . c o m*/

    List<User> users = ServiceLocator.findLifetimeService().getAllUsers();

    VerticalList vList = new VerticalList(userId, language);
    vList.setHeightUndefined();
    for (User u : users) {
        vList.add(u);
    }
    Panel panel = new Panel(vList);
    panel.setSizeFull();
    setContent(panel);
    addCloseListener(new CloseListener() {

        @Override
        public void windowClose(CloseEvent e) {
            close();
        }
    });
    setStyleName("window");
}

From source file:uk.co.q3c.v7.base.view.DefaultLogoutView.java

License:Apache License

@Override
public Component getUiComponent() {
    Panel p = new Panel("Logged out");
    p.setSizeFull();
    addComponent(p);//from  w  w w.  j av  a  2s .  c  o m
    return this;

}

From source file:uk.q3c.krail.core.view.DefaultLogoutView.java

License:Apache License

@Override
public void doBuild(ViewChangeBusMessage busMessage) {
    super.buildView(busMessage);
    Panel p = new Panel("Logged out");
    p.setSizeFull();
    getLayout().addComponent(p);// w  ww.  j  a v a2s  .c  o  m
}