Пример #1
0
  public TaskListHeader() {
    this.i18nManager = ExplorerApp.get().getI18nManager();
    this.taskService = ProcessEngines.getDefaultProcessEngine().getTaskService();
    this.verlayout = new VerticalLayout();

    addStyleName(Reindeer.PANEL_LIGHT);
    addStyleName(ExplorerLayout.STYLE_SEARCHBOX);

    layout = new HorizontalLayout();
    layout.setHeight(36, UNITS_PIXELS);
    layout.setWidth(99, UNITS_PERCENTAGE); // 99, otherwise the Panel will
    // display scrollbars
    layout.setSpacing(true);
    layout.setMargin(false, true, false, true);
    verlayout.addComponent(layout);

    inLayout = new HorizontalLayout();
    inLayout.setHeight(36, UNITS_PIXELS);
    inLayout.setWidth(99, UNITS_PERCENTAGE); // 99, otherwise the Panel will
    // display scrollbars
    inLayout.setSpacing(true);
    inLayout.setMargin(false, true, false, true);

    verlayout.addComponent(layout);
    verlayout.addComponent(inLayout);

    setContent(verlayout);

    initInputField();
    initKeyboardListener();
    // initSortMenu();
  }
Пример #2
0
  @AutoGenerated
  private HorizontalLayout buildCompanyDiv() {
    // common part: create layout
    companyDiv = new HorizontalLayout();
    companyDiv.setImmediate(false);
    companyDiv.setWidth("299px");
    companyDiv.setHeight("31px");
    companyDiv.setMargin(false);

    // companyLabel
    companyLabel = new Label();
    companyLabel.setStyleName("companyLabel");
    companyLabel.setImmediate(false);
    companyLabel.setWidth("63px");
    companyLabel.setHeight("15px");
    companyLabel.setValue("Company:");
    companyDiv.addComponent(companyLabel);

    // company
    company = new TextField();
    company.setImmediate(false);
    company.setWidth("202px");
    company.setHeight("20px");
    company.setRequired(true);
    company.setSecret(false);
    companyDiv.addComponent(company);
    companyDiv.setComponentAlignment(company, new Alignment(34));

    return companyDiv;
  }
Пример #3
0
  @AutoGenerated
  private HorizontalLayout buildWorkAreaLayout() {
    // common part: create layout
    workAreaLayout = new HorizontalLayout();
    workAreaLayout.setImmediate(false);
    workAreaLayout.setWidth("100.0%");
    workAreaLayout.setHeight("100.0%");
    workAreaLayout.setMargin(false);

    // availableModulesComponent
    availableModulesComponent = new AvailableModulesComponent();
    availableModulesComponent.setImmediate(false);
    availableModulesComponent.setWidth("-1px");
    availableModulesComponent.setHeight("100.0%");
    workAreaLayout.addComponent(availableModulesComponent);

    // configuratedModulesComponent
    configuratedModulesComponent = new ConfiguratedModulesComponent();
    configuratedModulesComponent.setImmediate(false);
    configuratedModulesComponent.setWidth("100.0%");
    configuratedModulesComponent.setHeight("100.0%");
    workAreaLayout.addComponent(configuratedModulesComponent);
    workAreaLayout.setExpandRatio(configuratedModulesComponent, 1.0f);

    return workAreaLayout;
  }
Пример #4
0
  @AutoGenerated
  private HorizontalLayout buildConfirmDiv() {
    // common part: create layout
    confirmDiv = new HorizontalLayout();
    confirmDiv.setImmediate(false);
    confirmDiv.setWidth("100.0%");
    confirmDiv.setHeight("100.0%");
    confirmDiv.setMargin(false);

    // confirmLabel
    confirmLabel = new Label();
    confirmLabel.setImmediate(false);
    confirmLabel.setWidth("52px");
    confirmLabel.setHeight("-1px");
    confirmLabel.setValue("Confirm:");
    confirmDiv.addComponent(confirmLabel);
    confirmDiv.setComponentAlignment(confirmLabel, new Alignment(9));

    // passwordConfirm
    passwordConfirm = new PasswordField();
    passwordConfirm.setCaption("Need confirm password:"******"195px");
    passwordConfirm.setHeight("20px");
    passwordConfirm.setRequired(true);
    confirmDiv.addComponent(passwordConfirm);
    confirmDiv.setExpandRatio(passwordConfirm, 1.0f);
    confirmDiv.setComponentAlignment(passwordConfirm, new Alignment(34));

    return confirmDiv;
  }
Пример #5
0
  @AutoGenerated
  private HorizontalLayout buildPasswordDiv() {
    // common part: create layout
    passwordDiv = new HorizontalLayout();
    passwordDiv.setImmediate(false);
    passwordDiv.setDescription("Your password");
    passwordDiv.setWidth("291px");
    passwordDiv.setHeight("34px");
    passwordDiv.setMargin(false);

    // passwordLabel
    passwordLabel = new Label();
    passwordLabel.setImmediate(false);
    passwordLabel.setWidth("80px");
    passwordLabel.setHeight("20px");
    passwordLabel.setValue("Password:"******"Need Password");
    passwordField.setImmediate(false);
    passwordField.setWidth("197px");
    passwordField.setHeight("20px");
    passwordField.setRequired(true);
    passwordDiv.addComponent(passwordField);
    passwordDiv.setComponentAlignment(passwordField, new Alignment(34));

    return passwordDiv;
  }
Пример #6
0
  @AutoGenerated
  private HorizontalLayout buildLastNameDiv() {
    // common part: create layout
    lastNameDiv = new HorizontalLayout();
    lastNameDiv.setImmediate(false);
    lastNameDiv.setWidth("291px");
    lastNameDiv.setHeight("45px");
    lastNameDiv.setMargin(false);

    // lastNameLabel
    lastNameLabel = new Label();
    lastNameLabel.setStyleName("lastNameLabel");
    lastNameLabel.setImmediate(false);
    lastNameLabel.setWidth("69px");
    lastNameLabel.setHeight("60.0%");
    lastNameLabel.setValue("Last Name:");
    lastNameDiv.addComponent(lastNameLabel);
    lastNameDiv.setComponentAlignment(lastNameLabel, new Alignment(9));

    // lastName
    lastName = new TextField();
    lastName.setStyleName("lastName");
    lastName.setCaption("Last Name Required:");
    lastName.setImmediate(false);
    lastName.setWidth("202px");
    lastName.setHeight("20px");
    lastName.setRequired(true);
    lastName.setSecret(false);
    lastNameDiv.addComponent(lastName);
    lastNameDiv.setComponentAlignment(lastName, new Alignment(34));

    return lastNameDiv;
  }
Пример #7
0
  @AutoGenerated
  private HorizontalLayout buildHorizontalLayout_2() {
    // common part: create layout
    horizontalLayout_2 = new HorizontalLayout();
    horizontalLayout_2.setImmediate(false);
    horizontalLayout_2.setWidth("-1px");
    horizontalLayout_2.setHeight("-1px");
    horizontalLayout_2.setMargin(true);
    horizontalLayout_2.setSpacing(true);

    // btnCrearUsuario
    btnCrearUsuario = new Button();
    btnCrearUsuario.setCaption("Crear");
    btnCrearUsuario.setImmediate(true);
    btnCrearUsuario.setWidth("80px");
    btnCrearUsuario.setHeight("-1px");
    horizontalLayout_2.addComponent(btnCrearUsuario);

    // btnEliminarUsuario
    btnEliminarUsuario = new Button();
    btnEliminarUsuario.setCaption("Eliminar");
    btnEliminarUsuario.setImmediate(true);
    btnEliminarUsuario.setWidth("-1px");
    btnEliminarUsuario.setHeight("-1px");
    horizontalLayout_2.addComponent(btnEliminarUsuario);

    return horizontalLayout_2;
  }
Пример #8
0
  @AutoGenerated
  private HorizontalLayout buildEmailDiv() {
    // common part: create layout
    emailDiv = new HorizontalLayout();
    emailDiv.setImmediate(false);
    emailDiv.setWidth("291px");
    emailDiv.setHeight("100.0%");
    emailDiv.setMargin(false);

    // emailLabel
    emailLabel = new Label();
    emailLabel.setStyleName("emailLabel");
    emailLabel.setImmediate(false);
    emailLabel.setWidth("63px");
    emailLabel.setHeight("15px");
    emailLabel.setValue("Email:");
    emailDiv.addComponent(emailLabel);
    emailDiv.setComponentAlignment(emailLabel, new Alignment(9));

    // email
    email = new TextField();
    email.setCaption("Email Required");
    email.setImmediate(false);
    email.setWidth("197px");
    email.setHeight("18px");
    email.setRequired(true);
    email.setSecret(false);
    emailDiv.addComponent(email);
    emailDiv.setComponentAlignment(email, new Alignment(34));

    return emailDiv;
  }
Пример #9
0
  @AutoGenerated
  private HorizontalLayout buildHorizontalLayout_1() {
    // common part: create layout
    horizontalLayout_1 = new HorizontalLayout();
    horizontalLayout_1.setImmediate(false);
    horizontalLayout_1.setWidth("-1px");
    horizontalLayout_1.setHeight("-1px");
    horizontalLayout_1.setMargin(false);
    horizontalLayout_1.setSpacing(true);

    // cmbPolicia
    cmbPolicia = new ComboBox();
    cmbPolicia.setCaption("Policia");
    cmbPolicia.setImmediate(false);
    cmbPolicia.setWidth("230px");
    cmbPolicia.setHeight("-1px");
    horizontalLayout_1.addComponent(cmbPolicia);

    // btnAgregarPolicia
    btnAgregarPolicia = new Button();
    btnAgregarPolicia.setCaption(" ");
    btnAgregarPolicia.setImmediate(true);
    btnAgregarPolicia.setWidth("-1px");
    btnAgregarPolicia.setHeight("-1px");
    horizontalLayout_1.addComponent(btnAgregarPolicia);
    horizontalLayout_1.setComponentAlignment(btnAgregarPolicia, new Alignment(9));

    return horizontalLayout_1;
  }
Пример #10
0
  public void onSuccessfulLogin2() {

    this.context = (WebApplicationContext) getContext();
    context
        .getHttpSession()
        .setAttribute("session", HibernateUtil.getSessionFactory().openSession());
    context.getHttpSession().setAttribute("userName", userCurrent.getName());
    controlUserPermissions = new ControlUserPermissions(userCurrent, context);

    String propName = this.getProperty("pathEntityOrder");
    String propPath =
        this.getContext().getBaseDirectory().getAbsolutePath() + File.separator + propName;
    HibernateUtil.getEntityOrder(propPath);

    /**
     * ******************************************** Cabecera
     * ******************************************************
     */
    HorizontalLayout headHorizontalLayout = new HorizontalLayout();
    headHorizontalLayout.setWidth("100%");
    headHorizontalLayout.setHeight("80");
    logoPNG = new Embedded(null, new ThemeResource("images/logo.png"));
    logoPNG.setWidth("140");
    logoPNG.setHeight("60");
    headHorizontalLayout.addComponent(logoPNG);
    headHorizontalLayout.setComponentAlignment(logoPNG, Alignment.MIDDLE_LEFT);
    headHorizontalLayout.setExpandRatio(logoPNG, 3);
    UserTab userTab = new UserTab(this);
    headHorizontalLayout.addComponent(userTab);
    headHorizontalLayout.setComponentAlignment(userTab, Alignment.MIDDLE_RIGHT);
    headHorizontalLayout.setExpandRatio(userTab, 1);
    /**
     * *********************************************************************
     * ***************************************
     */
    /**
     * ******************************************** Barra Menú
     * ****************************************************
     */
    toolbar = new YacareToolbar(this);
    /**
     * *********************************************************************
     * ***************************************
     */
    /**
     * ******************************************** Cuerpo de página
     * **********************************************
     */
    bodyPageVerticalLayout = new VerticalLayout();
    bodyPageVerticalLayout.addComponent(headHorizontalLayout);
    bodyPageVerticalLayout.addComponent(toolbar);
    YacareFooter footer = new YacareFooter();
    bodyPageVerticalLayout.addComponent(footer);
    bodyPageVerticalLayout.setComponentAlignment(footer, Alignment.BOTTOM_CENTER);
    /**
     * *********************************************************************
     * ***************************************
     */
    getMainWindow().setContent(bodyPageVerticalLayout);
  }
Пример #11
0
  @AutoGenerated
  private HorizontalLayout buildHorizontalLayout_3() {
    // common part: create layout
    horizontalLayout_3 = new HorizontalLayout();
    horizontalLayout_3.setImmediate(false);
    horizontalLayout_3.setWidth("-1px");
    horizontalLayout_3.setHeight("-1px");
    horizontalLayout_3.setMargin(false);

    // txtFiltroUsuario
    txtFiltroUsuario = new TextField();
    txtFiltroUsuario.setImmediate(false);
    txtFiltroUsuario.setWidth("65px");
    txtFiltroUsuario.setHeight("-1px");
    txtFiltroUsuario.setInputPrompt("Usuario");
    horizontalLayout_3.addComponent(txtFiltroUsuario);

    // txtFiltroNombres
    txtFiltroNombres = new TextField();
    txtFiltroNombres.setImmediate(false);
    txtFiltroNombres.setWidth("86px");
    txtFiltroNombres.setHeight("-1px");
    txtFiltroNombres.setInputPrompt("Nombres");
    horizontalLayout_3.addComponent(txtFiltroNombres);

    // txtFiltroApePaterno
    txtFiltroApePaterno = new TextField();
    txtFiltroApePaterno.setImmediate(false);
    txtFiltroApePaterno.setWidth("88px");
    txtFiltroApePaterno.setHeight("-1px");
    txtFiltroApePaterno.setInputPrompt("Ape. Paterno");
    horizontalLayout_3.addComponent(txtFiltroApePaterno);

    // txtFiltroApeMaterno
    txtFiltroApeMaterno = new TextField();
    txtFiltroApeMaterno.setImmediate(false);
    txtFiltroApeMaterno.setWidth("90px");
    txtFiltroApeMaterno.setHeight("-1px");
    txtFiltroApeMaterno.setInputPrompt("Ape. Materno");
    horizontalLayout_3.addComponent(txtFiltroApeMaterno);

    // txtFiltroCargo
    txtFiltroCargo = new TextField();
    txtFiltroCargo.setImmediate(false);
    txtFiltroCargo.setWidth("142px");
    txtFiltroCargo.setHeight("-1px");
    txtFiltroCargo.setInputPrompt("Cargo");
    horizontalLayout_3.addComponent(txtFiltroCargo);

    // txtFiltroOficina
    txtFiltroOficina = new TextField();
    txtFiltroOficina.setImmediate(false);
    txtFiltroOficina.setWidth("171px");
    txtFiltroOficina.setHeight("-1px");
    txtFiltroOficina.setInputPrompt("Oficina");
    horizontalLayout_3.addComponent(txtFiltroOficina);

    return horizontalLayout_3;
  }
Пример #12
0
 private HorizontalLayout getCaptionLayout() {
   final HorizontalLayout captionLayout = new HorizontalLayout();
   captionLayout.setSizeFull();
   captionLayout.setHeight("36px");
   captionLayout.addComponents(windowCaption, minimizeButton, resizeButton, closeButton);
   captionLayout.setExpandRatio(windowCaption, 1.0F);
   captionLayout.addStyleName("v-window-header");
   return captionLayout;
 }
Пример #13
0
  /**
   * LanguageSelect constructor.
   *
   * @param inPreferences {@link PreferencesHelper}
   * @param inConfigManager {@link ConfigManager}
   * @param inUser {@link User}
   */
  public LanguageSelect(
      final PreferencesHelper inPreferences,
      final ConfigManager inConfigManager,
      final User inUser) {
    super();
    // initialize language form prefs (1) or config admin (2)
    // final String lActiveLanguage = inPreferences.getLocale(inUser,
    // new Locale(inConfigManager.getLanguage())).getLanguage();

    setStyleName("ripla-language-select"); // $NON-NLS-1$
    setSizeUndefined();

    layout = new HorizontalLayout();
    setCompositionRoot(layout);
    layout.setHeight(22, Unit.PIXELS);
    layout.setSpacing(true);

    final Label lLabel =
        new Label(
            Activator.getMessages().getMessage("toolbar.label.language"),
            ContentMode.HTML); // $NON-NLS-1$
    lLabel.setStyleName("ripla-toolbar-label"); // $NON-NLS-1$
    lLabel.setSizeUndefined();
    layout.addComponent(lLabel);
    layout.setComponentAlignment(lLabel, Alignment.MIDDLE_LEFT);
    layout.setExpandRatio(lLabel, 1);

    select = createSelect();
    select.addValueChangeListener(
        new Property.ValueChangeListener() {
          @Override
          public void valueChange(final ValueChangeEvent inEvent) {
            final Locale lNew = ((LocaleAdapter) select.getValue()).getLocale();
            final Locale lOld = VaadinSession.getCurrent().getLocale();
            if (!lOld.equals(lNew)) {
              VaadinSession.getCurrent().setLocale(lNew);
              if (listener != null) {
                listener.processAction(
                    new IToolbarAction() {
                      @Override
                      public void run() {
                        LOG.trace("Setting language preference to {}.", lNew.getLanguage());
                        VaadinSession.getCurrent()
                            .getAttribute(IRiplaEventDispatcher.class)
                            .dispatch(
                                org.ripla.interfaces.IRiplaEventDispatcher.Event.REFRESH,
                                new HashMap<String, Object>());
                      }
                    });
              }
            }
          }
        });
    layout.addComponent(select);
  }
Пример #14
0
  @AutoGenerated
  private HorizontalLayout buildLoginTab() {
    // common part: create layout
    loginTab = new HorizontalLayout();
    loginTab.setImmediate(false);
    loginTab.setWidth("500px");
    loginTab.setHeight("100.0%");
    loginTab.setMargin(false);

    // verticalLayout_2
    verticalLayout_2 = buildVerticalLayout_2();
    loginTab.addComponent(verticalLayout_2);
    loginTab.setComponentAlignment(verticalLayout_2, new Alignment(48));

    return loginTab;
  }
Пример #15
0
  @AutoGenerated
  private HorizontalLayout buildHorizontalLayoutBody() {
    // common part: create layout
    horizontalLayoutBody = new HorizontalLayout();
    horizontalLayoutBody.setImmediate(false);
    horizontalLayoutBody.setWidth("100.0%");
    horizontalLayoutBody.setHeight("100.0%");
    horizontalLayoutBody.setMargin(true);
    horizontalLayoutBody.setSpacing(true);

    // tabSheetClient
    tabSheetClient = buildTabSheetClient();
    horizontalLayoutBody.addComponent(tabSheetClient);

    return horizontalLayoutBody;
  }
Пример #16
0
  @AutoGenerated
  private HorizontalLayout buildHorizontalLayout_1() {
    // common part: create layout
    horizontalLayout_1 = new HorizontalLayout();
    horizontalLayout_1.setImmediate(false);
    horizontalLayout_1.setWidth("-1px");
    horizontalLayout_1.setHeight("-1px");
    horizontalLayout_1.setMargin(false);
    horizontalLayout_1.setSpacing(true);

    // textAreaDescription
    textAreaDescription = new TextArea();
    textAreaDescription.setCaption("Enter A Description");
    textAreaDescription.setImmediate(false);
    textAreaDescription.setWidth("50.0%");
    textAreaDescription.setHeight("-1px");
    horizontalLayout_1.addComponent(textAreaDescription);

    // textFieldFilter
    textFieldFilter = new TextField();
    textFieldFilter.setCaption("Filter Function By ID");
    textFieldFilter.setImmediate(false);
    textFieldFilter.setWidth("-1px");
    textFieldFilter.setHeight("-1px");
    horizontalLayout_1.addComponent(textFieldFilter);
    horizontalLayout_1.setComponentAlignment(textFieldFilter, new Alignment(9));

    // comboBoxDatatypeFilter
    comboBoxDatatypeFilter = new ComboBox();
    comboBoxDatatypeFilter.setCaption("Filter By Data Type");
    comboBoxDatatypeFilter.setImmediate(false);
    comboBoxDatatypeFilter.setWidth("-1px");
    comboBoxDatatypeFilter.setHeight("-1px");
    horizontalLayout_1.addComponent(comboBoxDatatypeFilter);
    horizontalLayout_1.setComponentAlignment(comboBoxDatatypeFilter, new Alignment(9));

    // checkBoxFilterIsBag
    checkBoxFilterIsBag = new CheckBox();
    checkBoxFilterIsBag.setCaption("Is Bag Filter");
    checkBoxFilterIsBag.setImmediate(false);
    checkBoxFilterIsBag.setWidth("-1px");
    checkBoxFilterIsBag.setHeight("-1px");
    horizontalLayout_1.addComponent(checkBoxFilterIsBag);
    horizontalLayout_1.setComponentAlignment(checkBoxFilterIsBag, new Alignment(9));

    return horizontalLayout_1;
  }
  @AutoGenerated
  private HorizontalLayout buildLytFormulario2() {
    // common part: create layout
    lytFormulario2 = new HorizontalLayout();
    lytFormulario2.setImmediate(false);
    lytFormulario2.setWidth("-1px");
    lytFormulario2.setHeight("-1px");
    lytFormulario2.setMargin(false);
    lytFormulario2.setSpacing(true);

    // lblFechaRecepcion
    lblFechaRecepcion = new Label();
    lblFechaRecepcion.setImmediate(false);
    lblFechaRecepcion.setWidth("160px");
    lblFechaRecepcion.setHeight("-1px");
    lblFechaRecepcion.setValue("Fecha Recepcion Notificacion");
    lytFormulario2.addComponent(lblFechaRecepcion);

    // dtFechaRecepcion
    dtFechaRecepcion = new PopupDateField();
    dtFechaRecepcion.setImmediate(false);
    dtFechaRecepcion.setWidth("150px");
    dtFechaRecepcion.setHeight("-1px");
    dtFechaRecepcion.setResolution(4);
    lytFormulario2.addComponent(dtFechaRecepcion);

    // lblFechaVencimiento
    lblFechaVencimiento = new Label();
    lblFechaVencimiento.setImmediate(false);
    lblFechaVencimiento.setWidth("160px");
    lblFechaVencimiento.setHeight("-1px");
    lblFechaVencimiento.setValue("Fecha Vencimiento PRI");
    lytFormulario2.addComponent(lblFechaVencimiento);

    // dtFechaVencimiento
    dtFechaVencimiento = new PopupDateField();
    dtFechaVencimiento.setImmediate(false);
    dtFechaVencimiento.setWidth("150px");
    dtFechaVencimiento.setHeight("-1px");
    dtFechaVencimiento.setResolution(4);
    lytFormulario2.addComponent(dtFechaVencimiento);

    return lytFormulario2;
  }
  @AutoGenerated
  private HorizontalLayout buildLytFormulario3() {
    // common part: create layout
    lytFormulario3 = new HorizontalLayout();
    lytFormulario3.setImmediate(false);
    lytFormulario3.setWidth("-1px");
    lytFormulario3.setHeight("-1px");
    lytFormulario3.setMargin(false);
    lytFormulario3.setSpacing(true);

    // lblFechaPlazo
    lblFechaPlazo = new Label();
    lblFechaPlazo.setImmediate(false);
    lblFechaPlazo.setWidth("160px");
    lblFechaPlazo.setHeight("-1px");
    lblFechaPlazo.setValue("Fecha Plazo Fundamentar");
    lytFormulario3.addComponent(lblFechaPlazo);

    // dtFechaPlazo
    dtFechaPlazo = new PopupDateField();
    dtFechaPlazo.setImmediate(false);
    dtFechaPlazo.setWidth("150px");
    dtFechaPlazo.setHeight("-1px");
    dtFechaPlazo.setResolution(4);
    lytFormulario3.addComponent(dtFechaPlazo);

    // lblEstadoNotificacion
    lblEstadoNotificacion = new Label();
    lblEstadoNotificacion.setImmediate(false);
    lblEstadoNotificacion.setWidth("160px");
    lblEstadoNotificacion.setHeight("-1px");
    lblEstadoNotificacion.setValue("Estado Notificacion");
    lytFormulario3.addComponent(lblEstadoNotificacion);

    // cmbEstadoNotificacion
    cmbEstadoNotificacion = new ComboBoxLOVS();
    cmbEstadoNotificacion.setImmediate(false);
    cmbEstadoNotificacion.setWidth("150px");
    cmbEstadoNotificacion.setHeight("-1px");
    lytFormulario3.addComponent(cmbEstadoNotificacion);

    return lytFormulario3;
  }
  @AutoGenerated
  private HorizontalLayout buildLytFormulario1() {
    // common part: create layout
    lytFormulario1 = new HorizontalLayout();
    lytFormulario1.setImmediate(false);
    lytFormulario1.setWidth("-1px");
    lytFormulario1.setHeight("-1px");
    lytFormulario1.setMargin(false);
    lytFormulario1.setSpacing(true);

    // lblUnidadProcuraduria
    lblUnidadProcuraduria = new Label();
    lblUnidadProcuraduria.setImmediate(false);
    lblUnidadProcuraduria.setWidth("160px");
    lblUnidadProcuraduria.setHeight("-1px");
    lblUnidadProcuraduria.setValue("Unidad Procuraduria");
    lytFormulario1.addComponent(lblUnidadProcuraduria);

    // cmbUnidadProcuraduria
    cmbUnidadProcuraduria = new ComboBox();
    cmbUnidadProcuraduria.setImmediate(false);
    cmbUnidadProcuraduria.setWidth("150px");
    cmbUnidadProcuraduria.setHeight("-1px");
    lytFormulario1.addComponent(cmbUnidadProcuraduria);

    // lblTipoNotificacion
    lblTipoNotificacion = new Label();
    lblTipoNotificacion.setImmediate(false);
    lblTipoNotificacion.setWidth("160px");
    lblTipoNotificacion.setHeight("-1px");
    lblTipoNotificacion.setValue("Tipo Notificacion");
    lytFormulario1.addComponent(lblTipoNotificacion);

    // cmbTipoNotificacion
    cmbTipoNotificacion = new ComboBoxLOVS();
    cmbTipoNotificacion.setImmediate(false);
    cmbTipoNotificacion.setWidth("150px");
    cmbTipoNotificacion.setHeight("-1px");
    lytFormulario1.addComponent(cmbTipoNotificacion);

    return lytFormulario1;
  }
Пример #20
0
  // 构造函数
  public ComplainTypeListView(ComplainTypeManager complainTypeManager) {
    // ------------------------------------------加载dao
    this.complainTypeManager = complainTypeManager;

    // -------------------------------------------标题部分
    HorizontalLayout navBar = new HorizontalLayout();
    navBar.setStyleName(Reindeer.LAYOUT_BLACK);
    navBar.setWidth(100, Unit.PERCENTAGE);
    navBar.setHeight(29, Unit.PIXELS);
    Label lblNav = new Label("CRM系统 / 诉求类别");
    Button btnAdd = new Button("新增"); // 增加 按钮
    btnAdd.setIcon(new ThemeResource("icons/16/add.png"));
    btnAdd.setDescription("增加类别");
    btnAdd.addClickListener(
        new Button.ClickListener() {
          @Override
          public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {
            createWindow(null);
          }
        });
    navBar.addComponent(lblNav);
    navBar.addComponent(btnAdd);
    navBar.setComponentAlignment(btnAdd, Alignment.TOP_RIGHT); // 定义位置

    // -------------------------------------------正文部分
    conentHSplit = new HorizontalSplitPanel();
    conentHSplit.setStyleName(Reindeer.LAYOUT_WHITE); // 右侧样式
    conentHSplit.setHeight(Constants.PAGE_HEIGHT, Unit.PIXELS);

    // -----------------------------------------左边 tree

    initTree();
    conentHSplit.setFirstComponent(leftTree);
    conentHSplit.setSecondComponent(rightTable);
    conentHSplit.setSplitPosition(15F);
    // -----------------------------------------右边 table 使用
    container = new BeanItemContainer<ComplainTypeDtilBean>(ComplainTypeDtilBean.class);
    initRightTable(rightTable, container);

    this.addComponent(navBar);
    this.addComponent(conentHSplit);
  }
  public ServerDescBasic() {
    setHeight("100%");
    addStyleName(Reindeer.PANEL_LIGHT);

    VerticalLayout panel = (VerticalLayout) getContent();
    panel.setWidth("100%");
    panel.setHeight("100%");
    panel.setMargin(true);
    panel.setSpacing(false);
    panel.addStyleName("server-desc-basic");

    HorizontalLayout hlPanels = new HorizontalLayout();
    hlPanels.setWidth("100%");
    hlPanels.setHeight("100%");
    hlPanels.setMargin(true);
    hlPanels.setSpacing(true);
    hlPanels.addStyleName("server-desc-basic");
    //        setContent(hlPanels);

    left.setWidth("100%");
    right.setHeight("100%");
    right.setWidth("100%");

    // 表同士の間隔をあける
    Label padding = new Label(" ");
    padding.setWidth("7px");
    padding.setHeight("99%");
    padding.addStyleName("desc-padding");

    Label padding2 = new Label("");
    padding2.setWidth("1px");

    hlPanels.addComponent(left);
    hlPanels.addComponent(padding);
    hlPanels.addComponent(padding2);
    hlPanels.addComponent(right);
    hlPanels.setExpandRatio(left, 40);
    hlPanels.setExpandRatio(right, 60);

    panel.addComponent(hlPanels);
    panel.setExpandRatio(hlPanels, 1.0f);
  }
Пример #22
0
  public void initializePanelLeft() {
    txtSearch = new TextField();
    txtSearch.setWidth("100%");
    txtSearch.setHeight("100%");

    txtSearch.addListener(
        new TextChangeListener() {
          private static final long serialVersionUID = 1L;

          public void textChange(TextChangeEvent event) {
            String filter = event.getText();
            search(filter);
          }
        });

    btnSearch.setStyleName("searchButton");
    btnSearch.setDescription("Buscar");

    HorizontalLayout pnlSearch = new HorizontalLayout();
    pnlSearch.setWidth("100%");
    pnlSearch.setHeight("100%");
    pnlSearch.setMargin(false);
    pnlSearch.addComponent(txtSearch);
    pnlSearch.addComponent(btnSearch);

    lstStudents = new ListSelect("Alumnos Disponibles");
    lstStudents.setSizeFull();
    lstStudents.setMultiSelect(true);

    // panel left
    VerticalLayout pnlLeft = new VerticalLayout();
    pnlLeft.setHeight("100%");
    pnlLeft.setWidth("100%");
    pnlLeft.addComponent(pnlSearch);
    pnlLeft.addComponent(lstStudents);
    pnlLeft.setMargin(false);
    pnlLeft.setExpandRatio(pnlSearch, new Float(0.08));
    pnlLeft.setExpandRatio(lstStudents, new Float(0.92));

    mainPanel.addComponent(pnlLeft);
    mainPanel.setExpandRatio(pnlLeft, new Float(0.45));
  }
  private Component buildMyFavorite() {
    VerticalLayout layout = new VerticalLayout();
    layout.setWidth("100%");
    layout.setHeight(null);
    layout.setSpacing(true);

    vfMyFavorite = new ViewerForm("", false);
    vfMyFavorite.getFieldset().addStyleName("fieldset-3-5");
    vfMyFavorite.getFieldset().addStyleName("fieldset-0");
    vfMyFavorite.addComboBox(termResource.getTerm("Create In"), "createIn", false);
    vfMyFavorite.addTextField(termResource.getTerm("New Folder"), "newFolder", false);
    layout.addComponent(vfMyFavorite);

    HorizontalLayout hl = new HorizontalLayout();
    hl.setWidth("100%");
    hl.setHeight(null);

    Commandbar commandbar = new Commandbar();
    commandbar.setSizeUndefined();

    Button btnSave = new Button(termResource.getTerm("Save"));
    btnSave.setIcon(FontAwesome.SAVE);
    Button btnClose = new Button(termResource.getTerm("Close"));
    btnClose.setIcon(FontAwesome.TIMES);

    commandbar.addCommand(btnSave, COMMAND.SAVE_MY_FAVORITE);
    commandbar.addCommand(btnClose, COMMAND.CLOSE_MY_FAVORITE);

    commandbar.addCommandExecuteListener(
        new CommandEvent.ExecuteListener() {
          @Override
          public void execute(ExecuteEvent event) {
            perform(event.getInstruction());
          }
        });
    hl.addComponent(commandbar);
    hl.setComponentAlignment(commandbar, Alignment.MIDDLE_CENTER);
    layout.addComponent(hl);

    return layout;
  }
Пример #24
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;
  }
Пример #25
0
  @AutoGenerated
  private HorizontalLayout buildPnlPrincipal() {
    // common part: create layout
    pnlPrincipal = new HorizontalLayout();
    pnlPrincipal.setStyleName("whiteBackGround");
    pnlPrincipal.setImmediate(false);
    pnlPrincipal.setWidth("-1px");
    pnlPrincipal.setHeight("-1px");
    pnlPrincipal.setMargin(true);
    pnlPrincipal.setSpacing(true);

    // verticalLayout_2
    verticalLayout_2 = buildVerticalLayout_2();
    pnlPrincipal.addComponent(verticalLayout_2);

    // verticalLayout_3
    verticalLayout_3 = buildVerticalLayout_3();
    pnlPrincipal.addComponent(verticalLayout_3);

    return pnlPrincipal;
  }
Пример #26
0
    private Layout createBottomPanel() {
      final HorizontalLayout controlPanel = new HorizontalLayout();
      controlPanel.setMargin(true);
      controlPanel.setStyleName("more-info");
      controlPanel.setHeight("40px");
      controlPanel.setWidth("100%");
      Button moreInfoBtn =
          new Button(
              "More information...",
              new Button.ClickListener() {
                private static final long serialVersionUID = 1L;

                @Override
                public void buttonClick(ClickEvent event) {
                  editUserForm.displayAdvancedForm(user);
                }
              });
      moreInfoBtn.addStyleName(UIConstants.THEME_LINK);
      controlPanel.addComponent(moreInfoBtn);
      controlPanel.setComponentAlignment(moreInfoBtn, Alignment.MIDDLE_LEFT);
      return controlPanel;
    }
Пример #27
0
  @Override
  public void init() {
    Window mainWindow = new Window("Test Application");
    Form form = new Form();
    form.setCaption("Form Caption");
    form.setDescription(
        "This is a description of the Form that is "
            + "displayed in the upper part of the form. You normally "
            + "enter some descriptive text about the form and its "
            + "use here.");
    // Add a field and bind it to an named item property.
    form.addField("nom", new TextField("Nom"));
    form.addField("prenom", new TextField("Prenom"));
    form.addField("age", new TextField("Age"));
    // Set the footer layout.
    form.setFooter(new VerticalLayout());

    form.getFooter()
        .addComponent(
            new Label(
                "This is the footer area of the Form. "
                    + "You can use any layout here. "
                    + "This is nice for buttons."));

    // Have a button bar in the footer.
    HorizontalLayout okbar = new HorizontalLayout();
    okbar.setHeight("25px");
    form.getFooter().addComponent(okbar);
    Button okbutton = new Button("OK", form, "commit");
    okbutton.addListener(new OkListener(form));
    okbar.addComponent(okbutton);
    okbar.setComponentAlignment(okbutton, Alignment.TOP_RIGHT);
    Button resetbutton = new Button("Reset", form, "discard");
    resetbutton.addListener(new ResetListener(form));
    okbar.addComponent(resetbutton);
    mainWindow.addComponent(form);
    setMainWindow(mainWindow);
  }
Пример #28
0
  public ExaminationActSelectorStudentWidget(SelectableStudent widget) {
    super();
    this.widget = widget;
    mainPanel = new HorizontalLayout();
    mainPanel.setMargin(false);
    mainPanel.setHeight("100%");
    mainPanel.setWidth("100%");

    initializePanelLeft();
    initializeAddBtnPanel();
    initializePanelRigth();

    initializeButtonPanel();

    this.setMargin(true);
    this.setWidth("100%");
    this.setHeight("100%");

    this.addComponent(mainPanel);
    this.addComponent(buttonForm);
    this.setExpandRatio(mainPanel, new Float(0.93));
    this.setExpandRatio(buttonForm, new Float(0.07));
  }
Пример #29
0
  public PeptidesTableLayout(
      final int validPep,
      final int totalPep,
      final String desc,
      final Map<Integer, PeptideBean> pepProtList,
      final String accession,
      final String expName) {
    // for  peptides information (table) view
    MarginInfo m = new MarginInfo(false, false, true, false);
    this.setMargin(m);
    this.setSpacing(false);
    this.setWidth("100%");

    final HorizontalLayout headerLayout = new HorizontalLayout();
    headerLayout.setHeight("45px");
    headerLayout.setSpacing(true);
    show = new ShowLabel(true);
    headerLayout.addComponent(show);
    headerLayout.setComponentAlignment(show, Alignment.BOTTOM_LEFT);
    stat = true;

    final Label pepLabel =
        new Label(
            "<h4 style='font-family:verdana;color:black;'>Peptides ("
                + validPep
                + ") "
                + desc
                + "</h4>");
    // new Label("<h4 style='font-family:verdana;color:black;'>Peptides (" + validPep + "/" +
    // totalPep + ") " + desc + "</h4>");
    pepLabel.setContentMode(Label.CONTENT_XHTML);
    pepLabel.setHeight("45px");
    headerLayout.addComponent(pepLabel);
    headerLayout.setComponentAlignment(pepLabel, Alignment.TOP_RIGHT);

    this.addComponent(headerLayout);
    mainLayout = new VerticalLayout();
    mainLayout.setWidth("100%");
    this.addComponent(mainLayout);
    mainLayout.addComponent(pepTableLayout);
    mainLayout.setComponentAlignment(pepTableLayout, Alignment.MIDDLE_CENTER);

    Map<Integer, PeptideBean> vPepProtList = getValidatedList(pepProtList);

    vt = new PeptideTable(vPepProtList, null, false);
    pepTableLayout.addComponent(vt);
    if (trs != null) {
      PepSize = trs.getCurrentSize();
    }
    vt.setHeight(PepSize);

    HorizontalLayout lowerLayout = new HorizontalLayout();
    lowerLayout.setWidth("100%");
    lowerLayout.setHeight("25px");
    lowerLayout.setSpacing(false);
    //  Panel toolbar = new Panel(lowerLayout);
    // toolbar.setStyleName(Reindeer.PANEL_LIGHT);
    // toolbar.setHeight("35px");
    mainLayout.addComponent(lowerLayout);
    mainLayout.setComponentAlignment(lowerLayout, Alignment.TOP_CENTER);

    HorizontalLayout lowerLeftLayout = new HorizontalLayout();
    lowerLayout.addComponent(lowerLeftLayout);
    lowerLeftLayout.setSpacing(true);
    lowerLeftLayout.setMargin(new MarginInfo(false, false, false, false));
    lowerLayout.setComponentAlignment(lowerLeftLayout, Alignment.MIDDLE_LEFT);
    // lowerLayout.setExpandRatio(lowerLeftLayout, 0.4f);

    HorizontalLayout lowerRightLayout = new HorizontalLayout();
    // lowerRightLayout.setSpacing(true);
    lowerRightLayout.setWidth("450px");
    lowerLayout.addComponent(lowerRightLayout);
    lowerLayout.setComponentAlignment(lowerRightLayout, Alignment.BOTTOM_RIGHT);
    // lowerLayout.setExpandRatio(lowerRightLayout, 0.5f);

    final OptionGroup selectionType = new OptionGroup();
    selectionType.setMultiSelect(true);
    selectionType.addItem("\t\tShow Validated Peptides Only");
    selectionType.select("\t\tShow Validated Peptides Only");
    selectionType.setHeight("15px");
    lowerLeftLayout.addComponent(selectionType);
    lowerLeftLayout.setComponentAlignment(selectionType, Alignment.BOTTOM_LEFT);

    final TableResizeSet trs1 = new TableResizeSet(vt, PepSize); // resize tables
    lowerLeftLayout.addComponent(trs1);
    lowerLeftLayout.setComponentAlignment(trs1, Alignment.BOTTOM_LEFT);

    exportPepLayout.setWidth("300px");
    lowerRightLayout.addComponent(exportPepLayout);
    lowerRightLayout.setComponentAlignment(exportPepLayout, Alignment.BOTTOM_RIGHT);

    mainLayout.setSpacing(true);

    headerLayout.addListener(
        new com.vaadin.event.LayoutEvents.LayoutClickListener() {
          @Override
          public void layoutClick(LayoutEvents.LayoutClickEvent event) {

            if (stat) {
              stat = false;
              show.updateIcon(false);
              mainLayout.setVisible(false);
            } else {
              stat = true;
              show.updateIcon(true);
              mainLayout.setVisible(true);
            }
          }
        });
    selectionType.setImmediate(true);
    selectionType.addListener(
        new Property.ValueChangeListener() {
          @Override
          public void valueChange(Property.ValueChangeEvent event) {
            if (selectionType.isSelected("\t\tShow Validated Peptides Only")) {

              headerLayout.removeAllComponents();
              headerLayout.addComponent(show);
              headerLayout.setComponentAlignment(show, Alignment.BOTTOM_LEFT);

              // Label pepLabel = new Label("<h4 style='font-family:verdana;color:black;'>Peptides
              // (" + validPep + ") " + desc + "</h4>");
              pepLabel.setContentMode(Label.CONTENT_XHTML);
              pepLabel.setHeight("45px");
              headerLayout.addComponent(pepLabel);
              headerLayout.setComponentAlignment(pepLabel, Alignment.TOP_RIGHT);

              // Map<Integer, PeptideBean> vPepProtList = getValidatedList(pepProtList);

              pepTableLayout.removeAllComponents();
              // vt = new PeptideTable(vPepProtList, null);
              pepTableLayout.addComponent(vt);
              trs1.setTable(vt);
              vt.setHeight(pepTable.getHeight() + "");

            } else {
              headerLayout.removeAllComponents();
              headerLayout.addComponent(show);
              headerLayout.setComponentAlignment(show, Alignment.BOTTOM_LEFT);
              Label pepLabel =
                  new Label(
                      "<h4 style='font-family:verdana;color:black;'>Peptides ("
                          + validPep
                          + "/"
                          + totalPep
                          + ") "
                          + desc
                          + "</h4>");
              pepLabel.setContentMode(Label.CONTENT_XHTML);
              headerLayout.addComponent(pepLabel);
              headerLayout.setComponentAlignment(pepLabel, Alignment.TOP_RIGHT);

              pepTableLayout.removeAllComponents();
              pepTable = new PeptideTable(pepProtList, null, false);
              pepTableLayout.addComponent(pepTable);
              trs1.setTable(pepTable);
              pepTable.setHeight(vt.getHeight() + "");
            }
          }
        });
  }
  protected Panel createMapPanel(final ConfigurationParameterMapImpl parameter) {
    Panel paramPanel = new Panel();
    paramPanel.addStyleName(ValoTheme.PANEL_BORDERLESS);
    paramPanel.setWidth("100%");

    GridLayout paramLayout = new GridLayout(2, 3);
    paramLayout.setSpacing(true);
    paramLayout.setSizeFull();
    paramLayout.setMargin(true);
    paramLayout.setColumnExpandRatio(0, .25f);
    paramLayout.setColumnExpandRatio(1, .75f);

    final Map<String, String> valueMap = parameter.getValue();

    final GridLayout mapLayout =
        new GridLayout(5, (valueMap.size() != 0 ? valueMap.size() : 1) + 1);
    mapLayout.setColumnExpandRatio(0, .05f);
    mapLayout.setColumnExpandRatio(1, .425f);
    mapLayout.setColumnExpandRatio(2, .05f);
    mapLayout.setColumnExpandRatio(3, .425f);
    mapLayout.setColumnExpandRatio(4, .05f);

    mapLayout.setMargin(true);
    mapLayout.setSpacing(true);
    mapLayout.setWidth("100%");

    int i = 0;

    for (final String key : valueMap.keySet()) {
      final Label keyLabel = new Label("Name:");
      final Label valueLabel = new Label("Value:");

      final TextField keyField = new TextField();
      keyField.setValue(key);
      keyField.setWidth("100%");
      keyField.setNullSettingAllowed(false);
      keyField.addValidator(
          new NonZeroLengthStringValidator("Then configuration value name cannot be empty!"));
      keyField.setValidationVisible(false);

      final TextField valueField = new TextField();
      valueField.setWidth("100%");
      valueField.setValue(valueMap.get(key));
      valueField.setNullSettingAllowed(false);
      valueField.addValidator(
          new NonZeroLengthStringValidator("Then configuration value cannot be empty!"));
      valueField.setValidationVisible(false);

      mapLayout.addComponent(keyLabel, 0, i);
      mapLayout.setComponentAlignment(keyLabel, Alignment.MIDDLE_RIGHT);
      mapLayout.addComponent(keyField, 1, i);
      mapLayout.addComponent(valueLabel, 2, i);
      mapLayout.setComponentAlignment(valueLabel, Alignment.MIDDLE_RIGHT);
      mapLayout.addComponent(valueField, 3, i);
      final String mapKey = parameter.getName() + i;
      TextFieldKeyValuePair pair = new TextFieldKeyValuePair();
      pair.key = keyField;
      pair.value = valueField;

      this.mapTextFields.put(mapKey, pair);

      final Button removeButton = new Button("remove");
      removeButton.setStyleName(ValoTheme.BUTTON_LINK);
      removeButton.addClickListener(
          new Button.ClickListener() {
            public void buttonClick(ClickEvent event) {
              valueMap.remove(key);
              mapLayout.removeComponent(keyLabel);
              mapLayout.removeComponent(valueLabel);
              mapLayout.removeComponent(keyField);
              mapLayout.removeComponent(valueField);
              mapLayout.removeComponent(removeButton);

              mapTextFields.remove(mapKey);
            }
          });

      mapLayout.addComponent(removeButton, 4, i);

      i++;
    }

    final Button addButton = new Button("add");
    addButton.setStyleName(ValoTheme.BUTTON_LINK);
    addButton.addClickListener(
        new Button.ClickListener() {
          public void buttonClick(ClickEvent event) {
            final Label keyLabel = new Label("Name:");
            final Label valueLabel = new Label("Value:");

            final TextField keyField = new TextField();
            keyField.setWidth("100%");
            keyField.setNullSettingAllowed(false);
            keyField.addValidator(
                new NonZeroLengthStringValidator("Then configuration value name cannot be empty!"));
            keyField.setValidationVisible(false);

            final TextField valueField = new TextField();
            valueField.setWidth("100%");
            valueField.setNullSettingAllowed(false);
            valueField.addValidator(
                new NonZeroLengthStringValidator("Then configuration value cannot be empty!"));
            valueField.setValidationVisible(false);

            mapLayout.insertRow(mapLayout.getRows());

            mapLayout.removeComponent(addButton);
            mapLayout.addComponent(keyLabel, 0, mapLayout.getRows() - 2);
            mapLayout.setComponentAlignment(keyLabel, Alignment.MIDDLE_RIGHT);
            mapLayout.addComponent(keyField, 1, mapLayout.getRows() - 2);
            mapLayout.addComponent(valueLabel, 2, mapLayout.getRows() - 2);
            mapLayout.setComponentAlignment(valueLabel, Alignment.MIDDLE_RIGHT);
            mapLayout.addComponent(valueField, 3, mapLayout.getRows() - 2);

            final String mapKey = parameter.getName() + mapTextFields.size();
            TextFieldKeyValuePair pair = new TextFieldKeyValuePair();
            pair.key = keyField;
            pair.value = valueField;

            mapTextFields.put(mapKey, pair);

            final Button removeButton = new Button("remove");
            removeButton.setStyleName(ValoTheme.BUTTON_LINK);
            removeButton.addClickListener(
                new Button.ClickListener() {
                  public void buttonClick(ClickEvent event) {
                    mapLayout.removeComponent(keyLabel);
                    mapLayout.removeComponent(valueLabel);
                    mapLayout.removeComponent(keyField);
                    mapLayout.removeComponent(valueField);

                    mapLayout.removeComponent(removeButton);

                    mapTextFields.remove(mapKey);
                  }
                });

            mapLayout.addComponent(removeButton, 4, mapLayout.getRows() - 2);

            mapLayout.addComponent(addButton, 0, mapLayout.getRows() - 1);
          }
        });

    mapLayout.addComponent(addButton, 0, mapLayout.getRows() - 1);

    Panel mapPanel = new Panel();
    mapPanel.setStyleName(ValoTheme.PANEL_BORDERLESS);
    mapPanel.setContent(mapLayout);

    Button saveButton = new Button("Save");
    saveButton.addStyleName(ValoTheme.BUTTON_SMALL);
    saveButton.addClickListener(
        new Button.ClickListener() {
          public void buttonClick(ClickEvent event) {
            try {
              for (TextFieldKeyValuePair textField : mapTextFields.values()) {
                textField.key.validate();
                textField.value.validate();
              }

              usernameField.validate();
              passwordField.validate();
            } catch (InvalidValueException e) {
              for (TextFieldKeyValuePair textField : mapTextFields.values()) {
                textField.key.setValidationVisible(true);
                textField.value.setValidationVisible(true);
                usernameField.setValidationVisible(true);
                passwordField.setValidationVisible(true);
              }

              Notification.show("Validation errors have occurred!", Type.ERROR_MESSAGE);

              return;
            }

            HashMap<String, String> map = new HashMap<String, String>();

            logger.info("Saving map: " + mapTextFields.size());

            for (String key : mapTextFields.keySet()) {
              if (key.startsWith(parameter.getName())) {
                TextFieldKeyValuePair pair = mapTextFields.get(key);

                logger.info("Saving for key: " + key);

                if (pair.key.getValue() != "") {
                  map.put(pair.key.getValue(), pair.value.getValue());
                }
              }
            }

            parameter.setValue(map);
            userParam.setValue(usernameField.getValue());
            passwordParam.setValue(passwordField.getValue());

            PlatformConfigurationPanel.this.configurationManagement.saveConfiguration(
                platformConfiguration);

            Notification notification =
                new Notification(
                    "Saved",
                    "The configuration has been saved successfully!",
                    Type.HUMANIZED_MESSAGE);
            notification.setStyleName(ValoTheme.NOTIFICATION_CLOSABLE);
            notification.show(Page.getCurrent());
          }
        });

    Button deleteButton = new Button("Re-create");
    deleteButton.addStyleName(ValoTheme.BUTTON_SMALL);
    deleteButton.addClickListener(
        new Button.ClickListener() {
          public void buttonClick(ClickEvent event) {
            configurationManagement.deleteConfiguration(platformConfiguration);

            refresh();
          }
        });

    HorizontalLayout buttonLayout = new HorizontalLayout();
    buttonLayout.setHeight("100%");
    buttonLayout.setSpacing(true);
    buttonLayout.setWidth(200, Unit.PIXELS);
    buttonLayout.setMargin(true);
    buttonLayout.addComponent(saveButton);
    buttonLayout.addComponent(deleteButton);

    paramLayout.addComponent(mapPanel, 0, 1, 1, 1);
    paramLayout.setComponentAlignment(mapPanel, Alignment.TOP_CENTER);
    paramLayout.addComponent(buttonLayout, 0, 2, 1, 2);
    paramLayout.setComponentAlignment(buttonLayout, Alignment.TOP_CENTER);
    paramPanel.setContent(paramLayout);

    return paramPanel;
  }