Example usage for com.google.gwt.user.client.ui FlexTable FlexTable

List of usage examples for com.google.gwt.user.client.ui FlexTable FlexTable

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui FlexTable FlexTable.

Prototype

public FlexTable() 

Source Link

Usage

From source file:com.webgocommerce.client.uiutil.UIInfoDoc.java

private void initComponents() {
    lstTipoDoc = new ListModelDocVenta();
    lblDocumento = new UILabel("Documento");
    lstSerieCorre = new ListModelSerieCorrelativo();
    lstSerieCorre.setEnabled(true);//  w w  w.  j  a v  a 2s.co  m
    txtPreImpreso = new TextBox();
    txtPreImpreso.setEnabled(false);
    pnlContenedor = new FlexTable();
    pnlContenedor.setWidget(0, 0, lblDocumento);
    pnlContenedor.setWidget(0, 1, lstTipoDoc);
    pnlContenedor.setWidget(0, 2, lstSerieCorre);
    pnlContenedor.setWidget(0, 3, txtPreImpreso);
    this.initWidget(pnlContenedor);
}

From source file:com.webgocommerce.client.uiutil.UIInfoEstado.java

private void initComponents() {
    pnlContenedor = new FlexTable();
    infoUbicacion = new UIInfoUbicacion();
    infoUsuario = new UIInfoUsuario();
    infoTc = new UIInfoTC();
    pnlContenedor.setWidget(0, 0, infoUsuario);
    pnlContenedor.setWidget(0, 1, infoUbicacion);
    pnlContenedor.setWidget(0, 2, infoTc);
    pnlContenedor.getCellFormatter().setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_LEFT);
    pnlContenedor.getCellFormatter().setHorizontalAlignment(0, 1, HasHorizontalAlignment.ALIGN_CENTER);
    pnlContenedor.getCellFormatter().setHorizontalAlignment(0, 2, HasHorizontalAlignment.ALIGN_RIGHT);
    this.initWidget(pnlContenedor);
}

From source file:com.webgocommerce.client.uiutil.UIInfoMoneda.java

private void initComponents() {
    pnlContenedor = new FlexTable();
    lblMoneda = new UILabel("Moneda");
    lstMoneda = new ListBox();
    lstMoneda.addItem("Nuevos Soles", "S");
    lstMoneda.addItem("Dolares", "D");
    pnlContenedor.setWidget(0, 0, lblMoneda);
    pnlContenedor.setWidget(0, 1, lstMoneda);
    this.initWidget(pnlContenedor);
}

From source file:com.webgocommerce.client.uiutil.UISearch.java

private void initComponents() {
    pnlContenedor = new FlexTable();
    lblBuscar = new UILabel("Buscar");
    lstFamilia = new ListModelFamilia();
    txtBuscar = new TextBox();
    btnRefrescar = new Button("refrescar");
    pnlContenedor.setWidget(0, 0, lblBuscar);
    pnlContenedor.setWidget(0, 1, lstFamilia);
    pnlContenedor.setWidget(0, 2, txtBuscar);
    pnlContenedor.setWidget(0, 3, (new UISeparador()).isSpace());
    pnlContenedor.setWidget(0, 4, btnRefrescar);
    this.initWidget(pnlContenedor);
}

From source file:com.webgocommerce.client.uiutil.UISearchCliente.java

private void initComponents() {
    pnlContenedor = new FlexTable();
    lblClienteFacturacion = new UILabel("Cliente");
    lblClienteSustituto = new UILabel("Sustituto");
    txtRucFacturacion = new TextBox();
    txtRucFacturacion.setWidth("130px");
    txtRucFacturacion.getElement().setPropertyString("placeholder", "RUC o DNI");
    txtRucFacturacion.setMaxLength(11);/*  w w  w .  j  a va  2s .  c  o m*/
    txtRucFacturacion.getElement().setPropertyString("type", "number");
    txtRucSustituto = new TextBox();
    txtRucSustituto.setWidth("130px");
    txtRucSustituto.getElement().setPropertyString("placeholder", "RUC o DNI");
    txtRucSustituto.setEnabled(false);
    txtRucSustituto.setMaxLength(11);
    txtRucSustituto.getElement().setPropertyString("type", "number");
    txtDescripcionFacturacion = new TextBox();
    txtDescripcionFacturacion.getElement().setPropertyString("placeholder", "Nombres o Razn social");
    txtDescripcionFacturacion.setEnabled(false);
    lstDescripcionSustituto = new ListBox();
    lstDescripcionSustituto.getElement().setPropertyString("placeholder", "Nombres o Razn social");
    pnlContenedor.setWidget(0, 0, lblClienteFacturacion);
    pnlContenedor.setWidget(0, 1, txtRucFacturacion);
    pnlContenedor.setWidget(0, 2, txtDescripcionFacturacion);
    pnlContenedor.setWidget(1, 0, lblClienteSustituto);
    pnlContenedor.setWidget(1, 1, txtRucSustituto);
    pnlContenedor.setWidget(1, 2, lstDescripcionSustituto);
    imgCliente = new Image(MyResource.INSTANCE.getImgPersonAdd32());
    btnBuscar = new PushButton(imgCliente);
    btnBuscar.setTitle("Buscar Cliente");
    pnlContenedor.setWidget(0, 3, btnBuscar);
    this.initWidget(pnlContenedor);
}

From source file:com.webgocommerce.client.view.uibdempresa.UIBdEmpresaImpl.java

@Override
public void exportarData() {
    int row = 0;/*from   w  w w.ja va 2 s. c o  m*/
    List<BdEmpresaProxy> lista;
    if (!grid.getDataProvider().hasFilter()) {
        row = grid.getData().size();
        lista = grid.getData();
    } else {
        row = grid.getDataProvider().resulted.size();
        lista = grid.getDataProvider().resulted;
    }
    if (row == 0) {
        Notification not = new Notification(Notification.ALERT, "Grid sin datos");
        not.showPopup();
        return;
    }
    FlexTable flex = new FlexTable();
    flex.setText(0, 0, "ID");
    flex.setText(0, 1, "EMPRESA");
    flex.setText(0, 2, "HOST");
    flex.setText(0, 3, "PUERTO");
    flex.setText(0, 4, "ESQUEMA");
    flex.setText(0, 5, "USUSARIO BD");
    flex.setText(0, 6, "CLAVE BD");
    flex.setText(0, 7, "ESTADO");
    for (int j = 0; j < 8; j++) {
        flex.getFlexCellFormatter().getElement(0, j).getStyle().setFontWeight(Style.FontWeight.BOLD);
        flex.getFlexCellFormatter().getElement(0, j).getStyle().setFontSize(14, Style.Unit.PX);
        flex.getFlexCellFormatter().getElement(0, j).getStyle().setBackgroundColor("#0170C9");
        flex.getFlexCellFormatter().getElement(0, j).getStyle().setColor("#fff");
    }
    int fila = 1;
    for (int i = 0; i < row; i++) {
        BdEmpresaProxy bean = lista.get(i);
        flex.setText(fila, 0, bean.getIdBdEmpresa().toString());
        flex.setText(fila, 1, bean.getNombre());
        flex.setText(fila, 2, bean.getIpHost());
        flex.setText(fila, 3, bean.getPuerto().toString());
        flex.setText(fila, 4, bean.getSchema());
        flex.setText(fila, 5, bean.getUserPrincipal());
        flex.setText(fila, 6, bean.getClavePrincipal());
        flex.setText(fila, 7, bean.getEstadoActivacion());
        fila = fila + 1;
    }
    TableToExcel.save(flex, "BdEmpresa" + (new Date()).getTime());
    /*List<BdEmpresaProxy> lista=grid.getData();
    Iterator<BdEmpresaProxy> iterador=lista.iterator();
    int contador=0;
    String id="";         
    GjsonArray array=new GjsonArray();
    while(iterador.hasNext()){
    BdEmpresaProxy bean=iterador.next();
    GjsonObject object=new GjsonObject(TypeGjson.COMPLEX,bean.getClassName());
    id=String.valueOf(contador);
    object.putElement(new GjsonKey(id,String.class.getSimpleName(),"className"), bean.getClassName());
    object.putElement(new GjsonKey(id,String.class.getSimpleName(),"clavePrincipal"), bean.getClavePrincipal());
    object.putElement(new GjsonKey(id,String.class.getSimpleName(),"estadoActivacion"), bean.getEstadoActivacion());
    object.putElement(new GjsonKey(id,String.class.getSimpleName(),"ipHost"), bean.getIpHost());
    object.putElement(new GjsonKey(id,String.class.getSimpleName(),"nombre"), bean.getNombre());
    object.putElement(new GjsonKey(id,String.class.getSimpleName(),"schema"), bean.getSchema());
    object.putElement(new GjsonKey(id,String.class.getSimpleName(),"userPrincipal"), bean.getUserPrincipal());
    object.putElement(new GjsonKey(id,Integer.class.getSimpleName(),"idBdEmpresa"), bean.getIdBdEmpresa());
    object.putElement(new GjsonKey(id,Integer.class.getSimpleName(),"puerto"), bean.getPuerto());
    object.putElement(new GjsonKey(id,Integer.class.getSimpleName(),"version"), bean.getVersion());
    object.putElement(new GjsonKey(id,String.class.getSimpleName(),"operacion"), bean.getOperacion());            
    array.putElement(object);
    contador=contador+1;                        
    }                    
    GjsonArray.buildJsonArrayFormat(array);       
    System.out.println(array.getGjsonArray());
    Window.alert(array.getGjsonArray().toString());
    servicioExportar.exportar(new AsyncCallback<Void>() {
            
    @Override
    public void onFailure(Throwable caught) {
        GWT.log(caught.getMessage(), caught);
    }
            
    @Override
    public void onSuccess(Void result) {
               
    }
    });*/
}

From source file:com.webgocommerce.client.view.uibdusuario.UIBdUsuarioImpl.java

@Override
public void exportarData() {
    int row = 0;/*from w  w  w . j a va  2 s.  c o m*/
    List<BdUsuarioProxy> lista;
    if (!grid.getDataProvider().hasFilter()) {
        row = grid.getData().size();
        lista = grid.getData();
    } else {
        row = grid.getDataProvider().resulted.size();
        lista = grid.getDataProvider().resulted;
    }
    if (row == 0) {
        Notification not = new Notification(Notification.ALERT, "Grid sin datos");
        not.showPopup();
        return;
    }
    FlexTable flex = new FlexTable();
    flex.setText(0, 0, "ID");
    flex.setText(0, 1, "EMPRESA");
    flex.setText(0, 2, "ESQUEMA");
    flex.setText(0, 3, "NIVEL");
    flex.setText(0, 4, "USUARIO LOG");
    flex.setText(0, 5, "CLAVE LOG");
    flex.setText(0, 6, "USUARIO BD");
    flex.setText(0, 7, "CLAVE BD");
    flex.setText(0, 8, "ESTADO");
    for (int j = 0; j < 9; j++) {
        flex.getFlexCellFormatter().getElement(0, j).getStyle().setFontWeight(Style.FontWeight.BOLD);
        flex.getFlexCellFormatter().getElement(0, j).getStyle().setFontSize(14, Style.Unit.PX);
        flex.getFlexCellFormatter().getElement(0, j).getStyle().setBackgroundColor("#0170C9");
        flex.getFlexCellFormatter().getElement(0, j).getStyle().setColor("#fff");
    }
    int fila = 1;
    for (int i = 0; i < row; i++) {
        BdUsuarioProxy bean = lista.get(i);
        flex.setText(fila, 0, bean.getIdBdUsuario().toString());
        flex.setText(fila, 1, bean.getBeanBdEmpresa().getNombre());
        flex.setText(fila, 2, bean.getSchema());
        flex.setText(fila, 3, bean.getNivel());
        flex.setText(fila, 4, bean.getCorreo());
        flex.setText(fila, 5, bean.getClave());
        flex.setText(fila, 6, bean.getUsuarioBd());
        flex.setText(fila, 7, bean.getClaveBd());
        flex.setText(fila, 8, bean.getEstadoActivacion());
        fila = fila + 1;
    }
    TableToExcel.save(flex, "BdUsuario" + (new Date()).getTime());
}

From source file:com.webgocommerce.client.view.uicategorialista.UICategoriaListaImpl.java

@Override
public void exportarData() {
    int row = 0;/*from   w  w  w  .ja  va  2s .  c o  m*/
    List<CategoriaListaProxy> lista;
    if (!grid.getDataProvider().hasFilter()) {
        row = grid.getData().size();
        lista = grid.getData();
    } else {
        row = grid.getDataProvider().resulted.size();
        lista = grid.getDataProvider().resulted;
    }
    if (row == 0) {
        Notification not = new Notification(Notification.ALERT, "Grid sin datos");
        not.showPopup();
        return;
    }
    FlexTable flex = new FlexTable();
    flex.setText(0, 0, "ID");
    flex.setText(0, 1, "DESCRIPCION");
    for (int j = 0; j < 2; j++) {
        flex.getFlexCellFormatter().getElement(0, j).getStyle().setFontWeight(Style.FontWeight.BOLD);
        flex.getFlexCellFormatter().getElement(0, j).getStyle().setFontSize(14, Style.Unit.PX);
        flex.getFlexCellFormatter().getElement(0, j).getStyle().setBackgroundColor("#0170C9");
        flex.getFlexCellFormatter().getElement(0, j).getStyle().setColor("#fff");
    }
    int fila = 1;
    for (int i = 0; i < row; i++) {
        CategoriaListaProxy bean = lista.get(i);
        flex.setText(fila, 0, bean.getId().toString());
        flex.setText(fila, 1, bean.getDescripcion());
        fila = fila + 1;
    }
    TableToExcel.save(flex, "CategoriaLista" + (new Date()).getTime());
}

From source file:com.webgocommerce.client.view.uiclientecall.UIClienteCallImpl.java

@Override
public void exportarData() {
    int row = 0;/* w  w w  .  j  a v  a  2 s.  co  m*/
    List<ClienteCallCenterProxy> lista;
    if (!grid.getDataProvider().hasFilter()) {
        row = grid.getData().size();
        lista = grid.getData();
    } else {
        row = grid.getDataProvider().resulted.size();
        lista = grid.getDataProvider().resulted;
    }
    if (row == 0) {
        Notification not = new Notification(Notification.ALERT, "Grid sin datos");
        not.showPopup();
        return;
    }
    FlexTable flex = new FlexTable();
    flex.setText(0, 0, "ESTADO");
    flex.setText(0, 1, "DNI");
    flex.setText(0, 2, "NOMBRES");
    flex.setText(0, 3, "APELLIDOS");
    flex.setText(0, 4, "FECHA");
    flex.setText(0, 5, "OBSERVACIONES");
    for (int j = 0; j < 6; j++) {
        flex.getFlexCellFormatter().getElement(0, j).getStyle().setFontWeight(Style.FontWeight.BOLD);
        flex.getFlexCellFormatter().getElement(0, j).getStyle().setFontSize(14, Style.Unit.PX);
        flex.getFlexCellFormatter().getElement(0, j).getStyle().setBackgroundColor("#0170C9");
        flex.getFlexCellFormatter().getElement(0, j).getStyle().setColor("#fff");
    }
    flex.getFlexCellFormatter().getElement(0, 5).getStyle().setWidth(100, Style.Unit.EM);
    int fila = 1;
    for (int i = 0; i < row; i++) {
        ClienteCallCenterProxy bean = lista.get(i);
        flex.setText(fila, 0, bean.getEstado());
        flex.setText(fila, 1, bean.getDni());
        flex.setText(fila, 2, bean.getNombres());
        flex.setText(fila, 3, bean.getApellidos());
        flex.setText(fila, 4, dateFormat.format(bean.getFecha()));
        flex.setText(fila, 5, bean.getObservacion());
        fila = fila + 1;
    }
    TableToExcel.save(flex, "clientecall" + (new Date()).getTime());
}