Beispiel #1
0
  @AutoGenerated
  private HorizontalLayout buildHorizontalLayoutHeader() {
    // common part: create layout
    horizontalLayoutHeader = new HorizontalLayout();
    horizontalLayoutHeader.setImmediate(false);
    horizontalLayoutHeader.setWidth("100.0%");
    horizontalLayoutHeader.setHeight("-1px");
    horizontalLayoutHeader.setMargin(true);
    horizontalLayoutHeader.setSpacing(true);

    // codeField
    codeField = new TextField();
    codeField.setCaption("Código");
    codeField.setImmediate(false);
    codeField.setWidth("100px");
    codeField.setHeight("-1px");
    codeField.setRequired(true);
    horizontalLayoutHeader.addComponent(codeField);

    // nameField
    nameField = new TextField();
    nameField.setCaption("Nombre Comercial");
    nameField.setImmediate(false);
    nameField.setWidth("100.0%");
    nameField.setHeight("-1px");
    nameField.setRequired(true);
    horizontalLayoutHeader.addComponent(nameField);
    horizontalLayoutHeader.setExpandRatio(nameField, 1.0f);

    // activeField
    activeField = new CheckBox();
    activeField.setCaption("Activo");
    activeField.setImmediate(false);
    activeField.setWidth("80px");
    activeField.setHeight("-1px");
    activeField.setRequired(true);
    horizontalLayoutHeader.addComponent(activeField);
    horizontalLayoutHeader.setComponentAlignment(activeField, new Alignment(10));

    return horizontalLayoutHeader;
  }
  @AutoGenerated
  private AbsoluteLayout buildMainLayout() {
    // common part: create layout
    mainLayout = new AbsoluteLayout();
    mainLayout.setImmediate(false);
    mainLayout.setWidth("580px");
    mainLayout.setHeight("360px");
    mainLayout.setMargin(true);

    // top-level component properties
    setWidth("580px");
    setHeight("360px");

    // descriptionField
    descriptionField = new TextField();
    descriptionField.setCaption("Descripción");
    descriptionField.setImmediate(false);
    descriptionField.setWidth("380px");
    descriptionField.setHeight("-1px");
    mainLayout.addComponent(descriptionField, "top:112.0px;left:180.0px;");

    // idField
    idField = new TextField();
    idField.setCaption("Id");
    idField.setImmediate(false);
    idField.setWidth("400px");
    idField.setHeight("-1px");
    idField.setRequired(true);
    mainLayout.addComponent(idField, "top:20.0px;left:20.0px;");

    // nameField
    nameField = new TextField();
    nameField.setCaption("Nombre");
    nameField.setImmediate(false);
    nameField.setWidth("140px");
    nameField.setHeight("-1px");
    nameField.setRequired(true);
    mainLayout.addComponent(nameField, "top:112.0px;left:20.0px;");

    // packageNameField
    packageNameField = new TextField();
    packageNameField.setCaption("Paquete");
    packageNameField.setImmediate(false);
    packageNameField.setWidth("400px");
    packageNameField.setHeight("-1px");
    packageNameField.setRequired(true);
    mainLayout.addComponent(packageNameField, "top:64.0px;left:20.0px;");

    // versionField
    versionField = new TextField();
    versionField.setCaption("Versión");
    versionField.setImmediate(false);
    versionField.setWidth("120px");
    versionField.setHeight("-1px");
    versionField.setRequired(true);
    mainLayout.addComponent(versionField, "top:64.0px;left:440.0px;");

    // activeField
    activeField = new CheckBox();
    activeField.setCaption("Activo");
    activeField.setImmediate(false);
    activeField.setWidth("-1px");
    activeField.setHeight("-1px");
    activeField.setRequired(true);
    mainLayout.addComponent(activeField, "top:20.0px;left:507.0px;");

    // fileField
    fileField = new FileField();
    fileField.setImmediate(false);
    fileField.setWidth("540px");
    fileField.setHeight("-1px");
    mainLayout.addComponent(fileField, "top:160.0px;left:20.0px;");

    // errorMessageField
    errorMessageField = new TextArea();
    errorMessageField.setCaption("Mensaje Error");
    errorMessageField.setImmediate(false);
    errorMessageField.setWidth("540px");
    errorMessageField.setHeight("120px");
    mainLayout.addComponent(errorMessageField, "top:220.0px;left:20.0px;");

    return mainLayout;
  }