Beispiel #1
0
  private void configureComponents() {

    // Chargement des données.
    Init uniqueinstance = Init.getInit();
    uniqueinstance.chargementinitial();

    contactList.setContainerDataSource(Vehicule.getVehicules());
    contactList1.setContainerDataSource(Vehicule.getVehiculesPrixBas());
    contactList2.setContainerDataSource(Visiteur.getVisiteur());
    contactList3.setContainerDataSource(Affectation.getAffectation());

    // contactTable.setContainerDataSource(new BeanItemContainer<>( Vehicule.class));
    contactList.setColumnOrder("marque", "modele", "prix"); // choisir l'ordre des colonnes
    contactList.removeColumn("id");
    contactList1.setColumnOrder("marque", "modele", "prix"); // choisir l'ordre des colonnes
    contactList1.removeColumn("id"); // masquer la colonne
    // contactList.setSelectionMode(Grid.SelectionMode.SINGLE);

    contactList2.setColumnOrder("id", "prenom", "nom", "marque"); // choisir l'ordre des colonnes
    contactList3.setColumnOrder("id", "dateAffection", "nom", "marque");

    contactList.setSizeFull();
    contactList1.setSizeFull();
    contactList2.setSizeFull();
    contactList3.setSizeFull();
  }
 private Grid createGrid() {
   final Grid statusGrid = new Grid(uploads);
   statusGrid.addStyleName(SPUIStyleDefinitions.UPLOAD_STATUS_GRID);
   statusGrid.setSelectionMode(SelectionMode.NONE);
   statusGrid.setHeaderVisible(true);
   statusGrid.setImmediate(true);
   statusGrid.setSizeFull();
   return statusGrid;
 }
  private void buildLayout() {
    keyList.setSizeFull();

    HorizontalLayout showAndEdit = new HorizontalLayout(keyList, editForm);
    showAndEdit.setSizeFull();
    showAndEdit.setSpacing(true);
    showAndEdit.setMargin(false);
    showAndEdit.setExpandRatio(keyList, 0.5f);
    showAndEdit.setExpandRatio(editForm, 0.5f);

    addComponent(showAndEdit);

    setMargin(true);
    setSpacing(false);
    setSizeFull();
    setExpandRatio(showAndEdit, 1);
  }
Beispiel #4
0
  private Grid showGrid() {
    Grid grid = new Grid("Справочник", jpaPost);
    grid.setSizeFull();

    return grid;
  }
  public GestionNotificacion() {
    super();
    setMargin(true);
    setSpacing(true);
    setSizeFull();
    HorizontalL h1 = new HorizontalL();
    id = new CampoRuc();
    razonSocial = new CampoRazonSocial();
    razonSocial.setWidth("320px");
    direccion = new CampoDireccion();
    direccion.setWidth("450px");
    correoElectronico = new CampoCorreoElectronico();
    correoElectronico.setWidth("260px");

    tipoIdentificacion = new ComboBox();
    tipoIdentificacion.addItem("04");
    tipoIdentificacion.addItem("05");
    tipoIdentificacion.addItem("06");
    tipoIdentificacion.addItem("07");
    tipoIdentificacion.addItem("08");
    tipoIdentificacion.setItemCaption("04", "RUC");
    tipoIdentificacion.setItemCaption("05", "CEDULA");
    tipoIdentificacion.setItemCaption("06", "PASAPORTE");
    tipoIdentificacion.setItemCaption("07", "CONSUMIDOR FINAL");
    tipoIdentificacion.setItemCaption("08", "IDENTIFICADOR EXTERIOR");
    tipoIdentificacion.setNullSelectionAllowed(false);
    tipoIdentificacion.setValue("04");
    tipoIdentificacion.setWidth("140px");

    h1.addComponent(tipoIdentificacion, id);
    h1.addComponent("Razón Social", razonSocial);
    // h1.addComponent("Dirección",direccion);
    h1.addComponent("Email", correoElectronico);
    botonAnadir = new BotonAnadir();

    addComponent(h1);
    setComponentAlignment(h1, Alignment.TOP_CENTER);
    HorizontalL h2 = new HorizontalL();
    h2.addComponent("direccion", direccion);
    h2.addComponent(botonAnadir);
    addComponent(h2);

    grid = new Grid();
    beanItemC = new BeanItemContainer<DemografiaCliente>(DemografiaCliente.class);
    grid.setContainerDataSource(beanItemC);
    //		DemografiaCliente d=new DemografiaCliente();
    //		beanItemC.addBean(d);
    grid.removeColumn("entidadEmisora");
    grid.getColumn("id").setHeaderCaption("Identificacion");
    grid.setColumnOrder("razonSocial", "identificacion", "direccion", "correoElectronico");
    grid.setSizeFull();
    grid.removeColumn("tipoIdentificacion");
    grid.removeColumn("id");
    botonCancelar = new BotonCancelar();

    addComponent(grid);
    addComponent(botonCancelar);
    setComponentAlignment(botonCancelar, Alignment.BOTTOM_RIGHT);
    setComponentAlignment(h2, Alignment.TOP_CENTER);
    setExpandRatio(h1, 1);
    setExpandRatio(h2, 1);
    setExpandRatio(grid, 8);
    setExpandRatio(botonCancelar, 1);
    nuevoDato = new DemografiaCliente();
    beanItem = new BeanItem<DemografiaCliente>(nuevoDato);
    fg = new FieldGroup();
    fg.setItemDataSource(beanItem);
  }