コード例 #1
0
 @Override
 public ImageResource getValue(GerenteZonalProxy object) {
   if (object.getEstado() == 1) {
     return MyResource.INSTANCE.getImgGreen20();
   } else if (object.getEstado() == 0) {
     return MyResource.INSTANCE.getImgGray20();
   } else {
     return null;
   }
 }
コード例 #2
0
 @Override
 public ImageResource getValue(PrecioItemProxy object) {
   if (object.getEstadoColor().equalsIgnoreCase("A1")) {
     return MyResource.INSTANCE.getImgGreen20();
   } else if (object.getEstadoColor().equalsIgnoreCase("A0")) {
     return MyResource.INSTANCE.getImgOrange20();
   } else {
     return MyResource.INSTANCE.getImgGray20();
   }
 }
コード例 #3
0
ファイル: UIItemPlan.java プロジェクト: jofrantoba/gocommerce
 private void initStyle() {
   MyResource.INSTANCE.getStlModel().ensureInjected();
   pnlOperacion.getElement().getStyle().setTextAlign(Style.TextAlign.CENTER);
   btnOperacion.setWidth("90%");
   form.getPnlUnion().setWidth("100%");
   btnBack.addStyleName(MyResource.INSTANCE.getStlModel().pushButton());
   lblCenter.getElement().getStyle().setFontWeight(Style.FontWeight.BOLD);
   form.getPnlBusqueda().setHeight("80px");
   form.getPnlBusqueda().getElement().getStyle().setMarginBottom(10, Style.Unit.PX);
   form.getPnlTabla().setHeight("400px");
   MyResource.INSTANCE.getStlModel().ensureInjected();
   txtBuscar.getElement().getFirstChild().getFirstChild().removeFromParent();
   pnlHeader.setWidth("100%");
 }
コード例 #4
0
ファイル: UIItemPlan.java プロジェクト: jofrantoba/gocommerce
  private void initComponents() {
    pnlHeader = new FlexTable();
    txtBuscar = new MSearchBox();
    txtBuscar.setPlaceHolder("Buscar");
    form = new UIFormMantenimiento();
    header = new HeaderMenu();
    lblCenter = new Label("SELECCIONAR EQUIPOS");
    btnBack = new PushButton(new Image(MyResource.INSTANCE.getImgBack32()));
    btnBack.setTitle("Volver Atras");
    header.setLeftWidget(btnBack);
    header.setCenterWidget(lblCenter);
    grid = new GridItemPlan();
    // grid.setAlwaysShowScrollBars(true);
    // grid.setMinimumTableWidth(1024, Style.Unit.PX);
    pnlOperacion = new FlowPanel();
    btnOperacion = new Button("Agregar");
    pnlOperacion.add(btnOperacion);
    btnOperacion.setConfirm(true);
    form.getPnlTabla().add(grid);
    form.getPnlTabla().add(grid.getPager());
    form.getPnlTabla().add(pnlOperacion);

    pnlHeader.setWidget(0, 0, header);
    pnlHeader.setWidget(1, 0, txtBuscar);
    form.getPnlBusqueda().add(pnlHeader);
    form.getPnlBotones().setVisible(false);
    grid.addHandler(this, KeyUpEvent.getType());
    grid.getSelectionModel()
        .addSelectionChangeHandler(
            new SelectionChangeEvent.Handler() {
              @Override
              public void onSelectionChange(SelectionChangeEvent event) {}
            });
    this.add(form);
    this.setGlassEnabled(true);
    this.setAnimationEnabled(true);
    this.setModal(true);
    this.setAutoHideEnabled(true);
    this.setSize("700px", "540px");
    this.center();
  }