public CarouselViewGwtImpl() {

    scrollPanel.removeFromParent();

    carousel = new Carousel();

    main.add(carousel);

    for (int i = 0; i < 5; i++) {
      RootFlexPanel rootFlexPanel = new RootFlexPanel();
      ScrollPanel scrollPanel2 = new ScrollPanel();
      scrollPanel2.setScrollingEnabledX(false);
      // scrollPanel2.setWidth("100%");

      Panel flowPanel3 = new Panel();
      flowPanel3.setRound(true);
      for (int j = 0; j < 10; j++) {
        HTML html = new HTML("Slide: " + (i + 1));
        html.getElement().getStyle().setMarginBottom(300, Unit.PX);
        flowPanel3.add(html);
      }

      scrollPanel2.setWidget(flowPanel3);
      rootFlexPanel.add(scrollPanel2);
      carousel.add(rootFlexPanel);
    }
  }
Exemple #2
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);
  }
Exemple #3
0
 protected void setHeightContainer(int heightHeader) {
   int height = Window.getClientHeight();
   scrollPanel.setHeight((height - heightHeader) + "px");
   this.scrollPanel.refresh();
 }
 @Override
 public void refreshCameras() {
   cameraScrollPanel.refresh();
 }
 public static void refreshPanel() {
   cameraScrollPanel.refresh();
 }
  public FerriesRouteDeparturesViewGwtImpl() {

    pullToRefresh = new PullPanel();
    pullArrowHeader = new PullArrowHeader();
    pullToRefresh.setHeader(pullArrowHeader);

    daysOfWeek = new MListBox();

    handleOnLoad();

    cellList =
        new CellList<FerriesScheduleTimesItem>(
            new FerriesRouteDeparturesCell<FerriesScheduleTimesItem>() {

              @Override
              public String getDeparting(FerriesScheduleTimesItem model) {
                Date departingTime = new Date(Long.parseLong(model.getDepartingTime()));

                return dateFormat.format(departingTime, usPacific);
              }

              @Override
              public String getArriving(FerriesScheduleTimesItem model) {
                if (!model.getArrivingTime().equals("N/A")) {
                  Date arrivingTime = new Date(Long.parseLong(model.getArrivingTime()));

                  return dateFormat.format(arrivingTime, usPacific);
                } else {
                  return "";
                }
              }

              @Override
              public SafeHtml getAnnotation(FerriesScheduleTimesItem model) {
                if (model.getAnnotations() != null) {
                  return SafeHtmlUtils.fromTrustedString(model.getAnnotations());
                } else {
                  return SafeHtmlUtils.fromString("");
                }
              }

              @Override
              public boolean canBeSelected(FerriesScheduleTimesItem model) {
                return false;
              }

              @Override
              public String getDriveUpSpaces(FerriesScheduleTimesItem model) {
                return String.valueOf(model.getDriveUpSpaceCount());
              }

              @Override
              public String getMaxSpaceCount(FerriesScheduleTimesItem model) {
                return String.valueOf(model.getMaxSpaceCount());
              }

              @Override
              public String getLastUpdated(FerriesScheduleTimesItem model) {
                if (model.getLastUpdated() != null) {
                  return ParserUtils.relativeTime(
                      model.getLastUpdated(), "MMMM d, yyyy h:mm a", false);
                } else {
                  return "";
                }
              }
            });

    cameraCellList =
        new CellList<CameraItem>(
            new CameraCell<CameraItem>() {

              @Override
              public String getUrl(CameraItem model) {
                return model.getImageUrl();
              }

              @Override
              public boolean canBeSelected(CameraItem model) {
                return true;
              }
            });

    initWidget(uiBinder.createAndBindUi(this));

    accessibilityPrepare();

    if (MGWT.getOsDetection().isAndroid()) {
      leftFlexSpacer.setVisible(false);
      cameraScrollPanel.setBounce(false);
    }
  }