Esempio n. 1
0
  private void init() {
    // widgetListTable=new WidgetList();
    // widgetListTable.setRound(true);
    main = new FlowPanel();

    // Window.addResizeHandler(this);
    header = new HeaderMenu();
    lblCenter = new Label(constants.seleccionar());
    header.setCenterWidget(lblCenter);
    btnBack = new PushButton(new Image(MyResource.INSTANCE.getImgBack32()));
    header.setLeftWidget(btnBack);
    btnSelect = new PushButton(new Image(MyResource.INSTANCE.getImgSelect32()));
    header.setRightWidget(btnSelect);
    main.add(header);
    toolBar = new ToolBar();
    main.add(toolBar);

    txtBuscar = new MSearchBox();
    txtBuscar.setPlaceHolder(constants.buscarCliente());
    main.add(txtBuscar);

    headerGrid = new HeaderGrid();
    main.add(headerGrid);

    headerGridDni = new Label(constants.dni());
    headerGrid.add(headerGridDni);

    headerGridCliente = new Label(constants.clientes());
    headerGrid.add(headerGridCliente);

    container = new FlowPanel();
    // main.add(container);

    scrollPanel = new ScrollPanel();
    scrollPanel.setScrollingEnabledY(true);
    scrollPanel.setScrollingEnabledX(false);
    scrollPanel.setAutoHandleResize(true);

    /*scrollPanel.setScrollingEnabledX(false);
    scrollPanel.setScrollingEnabledY(true);
    scrollPanel.setAutoHandleResize(true);*/
    // scrollPanel.setUsePos(MGWT.getOsDetection().isAndroid());

    grid = new GridCliente();
    container.add(grid);
    // widgetListTable.add(container);
    scrollPanel.setWidget(container);
    // cargarTabla();
    main.add(scrollPanel);
    Window.addResizeHandler(
        new ResizeHandler() {

          @Override
          public void onResize(ResizeEvent event) {
            // TODO Auto-generated method stub
            reCalcularWindows();
          }
        });
    initWidget(main);
  }
Esempio n. 2
0
  private void style() {
    MyResource.INSTANCE.getStlUICliente().ensureInjected();
    btnSelect.addStyleName(MyResource.INSTANCE.getStlUICliente().pushButton());
    btnBack.addStyleName(MyResource.INSTANCE.getStlUICliente().pushButton());
    // main.setWidth("100%");
    headerGridDni.setWidth("40%");
    headerGridCliente.setWidth("60%");
    // setHeightContainer(55);
    // setWidthGrid();
    // scrollPanel.setWidth("100%");
    // scrollPanel.setHeight("auto");

    txtBuscar.addStyleName(MyResource.INSTANCE.getStlUICliente().txtBuscarUICliente());
    grid.addStyleName(MyResource.INSTANCE.getStlUICliente().gridUICliente());

    headerGridDni.getElement().getStyle().setFloat(Style.Float.LEFT);
    headerGridCliente.getElement().getStyle().setFloat(Style.Float.LEFT);
  }