Search in sources :

Example 1 with TopVerticalLayout

use of au.com.vaadinutils.layout.TopVerticalLayout in project VaadinUtils by rlsutton1.

the class JasperReportScheduleLayout method buildEditor.

@Override
@SuppressWarnings("deprecation")
public TabSheet buildEditor(ValidatingFieldGroup<ReportEmailScheduleEntity> validatingFieldGroup) {
    TabSheet tabsheet = new TabSheet();
    tabsheet.setSizeFull();
    VerticalLayout main = new VerticalLayout();
    main.setSpacing(true);
    main.setMargin(true);
    main.setSizeFull();
    tabsheet.addTab(main, "Email");
    main.addComponent(emailTargetLayout);
    FormHelper<ReportEmailScheduleEntity> helper = new FormHelper<ReportEmailScheduleEntity>(main, fieldGroup);
    reportTitle = helper.bindTextField("Report", ReportEmailScheduleEntity_.reportTitle);
    reportTitle.setReadOnly(true);
    sender = helper.bindEntityField("From", ReportEmailScheduleEntity_.sender, ReportEmailSender.class, ReportEmailSender_.username);
    sender.setReadOnly(true);
    outputFormat = helper.bindEnumField("Output format", ReportEmailScheduleEntity_.outputFormat.getName(), OutputFormat.class);
    outputFormat.removeItem(OutputFormat.HTML);
    helper.bindTextField("Subject", ReportEmailScheduleEntity_.subject);
    CKEditorEmailField message = helper.bindEditorField("Message", ReportEmailScheduleEntity_.message, false);
    helper.bindTextField("Report Log", ReportEmailScheduleEntity_.reportLog.getName()).setReadOnly(true);
    main.setExpandRatio(message, 1);
    TopVerticalLayout scheduleWrapper = new TopVerticalLayout();
    scheduleWrapper.setSizeFull();
    tabsheet.addTab(scheduleWrapper, "Schedule");
    FormLayout scheduleForm = new FormLayout();
    scheduleForm.setSizeFull();
    scheduleForm.setMargin(true);
    scheduleWrapper.addComponent(scheduleForm);
    buildScheduleTab(validatingFieldGroup, scheduleForm, helper);
    VerticalLayout paramWrapper = new VerticalLayout();
    paramWrapper.setSizeFull();
    tabsheet.addTab(paramWrapper, "Parameters");
    paramForm = new VerticalLayout();
    paramForm.setSizeFull();
    paramForm.setMargin(true);
    paramWrapper.addComponent(paramForm);
    return tabsheet;
}
Also used : CKEditorEmailField(au.com.vaadinutils.fields.CKEditorEmailField) FormLayout(com.vaadin.ui.FormLayout) ReportEmailSender(au.com.vaadinutils.jasper.scheduler.entities.ReportEmailSender) TabSheet(com.vaadin.ui.TabSheet) TopVerticalLayout(au.com.vaadinutils.layout.TopVerticalLayout) ReportEmailScheduleEntity(au.com.vaadinutils.jasper.scheduler.entities.ReportEmailScheduleEntity) OutputFormat(au.com.vaadinutils.jasper.JasperManager.OutputFormat) TopVerticalLayout(au.com.vaadinutils.layout.TopVerticalLayout) VerticalLayout(com.vaadin.ui.VerticalLayout) FormHelper(au.com.vaadinutils.crud.FormHelper)

Example 2 with TopVerticalLayout

use of au.com.vaadinutils.layout.TopVerticalLayout in project VaadinUtils by rlsutton1.

the class ExampleLayout method buildEditor.

public AbstractLayout buildEditor(ValidatingFieldGroup<TblExample> validatingFieldGroup) {
    VerticalLayout main = new VerticalLayout();
    MultiColumnFormLayout<TblExample> layout = new MultiColumnFormLayout<TblExample>(1, validatingFieldGroup);
    layout.setColumnFieldWidth(0, 250);
    TopVerticalLayout wrapper = new TopVerticalLayout();
    wrapper.addComponent(layout);
    main.addComponent(wrapper);
    layout.bindTextField("Name", "name");
    layout.bindTextField("Host", "host");
    layout.bindTextField("Schema", "schema");
    layout.bindTextField("Username", "username");
    layout.bindPasswordField("Password", "password");
    return main;
}
Also used : TblExample(au.com.vaadinutils.crud.example.entities.TblExample) TopVerticalLayout(au.com.vaadinutils.layout.TopVerticalLayout) MultiColumnFormLayout(au.com.vaadinutils.crud.MultiColumnFormLayout) VerticalLayout(com.vaadin.ui.VerticalLayout) TopVerticalLayout(au.com.vaadinutils.layout.TopVerticalLayout)

Aggregations

TopVerticalLayout (au.com.vaadinutils.layout.TopVerticalLayout)2 VerticalLayout (com.vaadin.ui.VerticalLayout)2 FormHelper (au.com.vaadinutils.crud.FormHelper)1 MultiColumnFormLayout (au.com.vaadinutils.crud.MultiColumnFormLayout)1 TblExample (au.com.vaadinutils.crud.example.entities.TblExample)1 CKEditorEmailField (au.com.vaadinutils.fields.CKEditorEmailField)1 OutputFormat (au.com.vaadinutils.jasper.JasperManager.OutputFormat)1 ReportEmailScheduleEntity (au.com.vaadinutils.jasper.scheduler.entities.ReportEmailScheduleEntity)1 ReportEmailSender (au.com.vaadinutils.jasper.scheduler.entities.ReportEmailSender)1 FormLayout (com.vaadin.ui.FormLayout)1 TabSheet (com.vaadin.ui.TabSheet)1