Package org.aperteworkflow.custom

Source Code of org.aperteworkflow.custom.SampleWidgetComponent

package org.aperteworkflow.custom;

import com.vaadin.annotations.AutoGenerated;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.FormLayout;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.Table;
import com.vaadin.ui.VerticalLayout;

public abstract class SampleWidgetComponent extends CustomComponent {

  @AutoGenerated
  protected VerticalLayout mainLayout;
  @AutoGenerated
  protected HorizontalLayout horizontalLayout_4;
  @AutoGenerated
  protected FormLayout formLayout_2;
  @AutoGenerated
  protected Table table_1;
  @AutoGenerated
  protected FormLayout formLayout_3;
  @AutoGenerated
  protected Label label_5;
  @AutoGenerated
  protected Label label_3;
  @AutoGenerated
  protected Label label_1;
  @AutoGenerated
  protected Label label_2;
  @AutoGenerated
  protected Label label_4;

  /*- VaadinEditorProperties={"grid":"RegularGrid,20","showGrid":true,"snapToGrid":true,"snapToObject":true,"movingGuides":false,"snappingDistance":10} */

 

  /*- VaadinEditorProperties={"grid":"RegularGrid,20","showGrid":true,"snapToGrid":true,"snapToObject":true,"movingGuides":false,"snappingDistance":10} */

 
 
  /*- VaadinEditorProperties={"grid":"RegularGrid,20","showGrid":true,"snapToGrid":true,"snapToObject":true,"movingGuides":false,"snappingDistance":10} */

  /**
   * The constructor should first build the main layout, set the
   * composition root and then do any custom initialization.
   *
   * The constructor will not be automatically regenerated by the
   * visual editor.
   */
  public SampleWidgetComponent() {
    buildMainLayout();
    setCompositionRoot(mainLayout);
   

    loadData();
  }

  protected abstract void loadData() ;

  @AutoGenerated
  private VerticalLayout buildMainLayout() {
    // common part: create layout
    mainLayout = new VerticalLayout();
    mainLayout.setImmediate(false);
    mainLayout.setWidth("100%");
    mainLayout.setHeight("-1px");
    mainLayout.setMargin(false);
   
    // top-level component properties
    setWidth("100.0%");
    setHeight("-1px");
   
    // label_4
    label_4 = new Label();
    label_4.setStyleName("h1");
    label_4.setImmediate(false);
    label_4.setWidth("-1px");
    label_4.setHeight("-1px");
    label_4.setValue("Label");
    mainLayout.addComponent(label_4);
   
    // horizontalLayout_4
    horizontalLayout_4 = buildHorizontalLayout_4();
    mainLayout.addComponent(horizontalLayout_4);
    mainLayout.setExpandRatio(horizontalLayout_4, 1.0f);
   
    return mainLayout;
  }

  @AutoGenerated
  private HorizontalLayout buildHorizontalLayout_4() {
    // common part: create layout
    horizontalLayout_4 = new HorizontalLayout();
    horizontalLayout_4.setImmediate(false);
    horizontalLayout_4.setWidth("100.0%");
    horizontalLayout_4.setHeight("-1px");
    horizontalLayout_4.setMargin(false);
    horizontalLayout_4.setSpacing(true);
   
    // formLayout_3
    formLayout_3 = buildFormLayout_3();
    horizontalLayout_4.addComponent(formLayout_3);
   
    // formLayout_2
    formLayout_2 = buildFormLayout_2();
    horizontalLayout_4.addComponent(formLayout_2);
    horizontalLayout_4
        .setComponentAlignment(formLayout_2, new Alignment(6));
   
    return horizontalLayout_4;
  }

  @AutoGenerated
  private FormLayout buildFormLayout_3() {
    // common part: create layout
    formLayout_3 = new FormLayout();
    formLayout_3.setImmediate(false);
    formLayout_3.setWidth("-1px");
    formLayout_3.setHeight("-1px");
    formLayout_3.setMargin(true);
    formLayout_3.setSpacing(true);
   
    // label_2
    label_2 = new Label();
    label_2.setCaption("Email address");
    label_2.setImmediate(false);
    label_2.setWidth("-1px");
    label_2.setHeight("-1px");
    label_2.setValue("Label");
    formLayout_3.addComponent(label_2);
   
    // label_1
    label_1 = new Label();
    label_1.setCaption("Full name");
    label_1.setImmediate(false);
    label_1.setWidth("-1px");
    label_1.setHeight("-1px");
    label_1.setValue("Label");
    formLayout_3.addComponent(label_1);
   
    // label_3
    label_3 = new Label();
    label_3.setCaption("Screen name");
    label_3.setImmediate(false);
    label_3.setWidth("-1px");
    label_3.setHeight("-1px");
    label_3.setValue("Label");
    formLayout_3.addComponent(label_3);
   
    // label_5
    label_5 = new Label();
    label_5.setCaption("Last login");
    label_5.setImmediate(false);
    label_5.setWidth("-1px");
    label_5.setHeight("-1px");
    label_5.setValue("Label");
    formLayout_3.addComponent(label_5);
   
    return formLayout_3;
  }

  @AutoGenerated
  private FormLayout buildFormLayout_2() {
    // common part: create layout
    formLayout_2 = new FormLayout();
    formLayout_2.setImmediate(false);
    formLayout_2.setWidth("-1px");
    formLayout_2.setHeight("-1px");
    formLayout_2.setMargin(true);
    formLayout_2.setSpacing(true);
   
    // table_1
    table_1 = new Table();
    table_1.setCaption("Roles");
    table_1.setImmediate(false);
    table_1.setWidth("-1px");
    table_1.setHeight("100px");
    formLayout_2.addComponent(table_1);
   
    return formLayout_2;
  }

}
TOP

Related Classes of org.aperteworkflow.custom.SampleWidgetComponent

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.