Package com.google.gwt.i18n.client

Examples of com.google.gwt.i18n.client.NumberFormat


        double sumColumnTransfert = 0.0;
        double sumColumnRd = 0.0;
        double sumColumnTs = 0.0;
        double sumRow = 0.0;
        double sumSumRow = 0.0;
        NumberFormat numberFormat = NumberFormat.getFormat(Constants.NUMBER_FORMAT);
        for( int i = 0 ; i < listTransfertPpGrid.size() ; i++ ) {
          transfertPpSummaryDto = listTransfertPpGrid.get(i);
          sumColumnObjectif += transfertPpSummaryDto.getObjective();
          sumColumnObj += transfertPpSummaryDto.getObj();
          sumColumnTransfert += transfertPpSummaryDto.getDevers();
View Full Code Here


    double sumtotalManqueAGagnerStsansProrata = 0.0;

    double cellts = 0.0;
    double celltotlafinal = 0.0;

    NumberFormat numberFormat = NumberFormat.getFormat(Constants.NUMBER_FORMAT);
    for( int i = 0 ; i < lstKeyGrid.size() ; i++ ) {
      String grid1 = "";
      String sumTotalGroup1 = "";
      double totalObjectif = 0.0;
      double totalObj = 0.0;
View Full Code Here

    double totalMarcheRestantATraiterPercentage = 0.0;
    double totalMarcheRestantATraiter = 0.0;
    double totalVariationDuAuxTransferts = 0.0;
    double totalManqueAGagnerStsansProrata = 0.0;
    String grid1 = "";
    NumberFormat numberFormat = NumberFormat.getFormat(Constants.NUMBER_FORMAT);
    for( int i = 0 ; i < grid.size() ; i++ ) {
      ficheStDto = grid.get(i);
      cellts = ficheStDto.getObj() + ficheStDto.getTransferts() + ficheStDto.getRd() + ficheStDto.getTs();
      celltotlafinal = ficheStDto.getTraite() + ficheStDto.getArrete() + ficheStDto.getNonArrete() + ficheStDto.getProvision();
      totalObjectif += ficheStDto.getObjectif();
View Full Code Here

    try{
      value = new Double(value);
    }catch(NumberFormatException numberFormatException){
    }
    if( progressLabel != null ) {
      NumberFormat numberFormat = NumberFormat.getFormat(NUMBER_FORMAT);
      progressLabel.setHTML("<label>" + messages.progress() + "</label>: " + numberFormat.format(value) + "% AVANCEMENT / MARCHE");
      txtEtatAvancement.setValue(numberFormat.format(value));
    }
  }
View Full Code Here

    String[] column1s = { messages.refacturations(), messages.prorata2(), messages.refacturationsDontProrata(), messages.refacturationsDontProrataEtAutre(), messages.penalites() };
    double[] column2s = { totalRefacturation, totalProrata, totalRefacturationDontProrata, refacturationsDontProrataEtAutre, totalPenalty };
    double[] column3s = { refacturationPercentage, prorataPercentage, refacturationDontProrataPercentage, refacturationsDontProrataEtAutrePercentage, penaltyPercentage };
    //For report
    detail_des_retenues_appliques ="";
    NumberFormat numberFormat = NumberFormat.getFormat(Constants.NUMBER_FORMAT);
    for( int i = 0 ; i < 5 ; i++ ) {
      model = new AnonymousDto();
      model.set(AnonymousDto.COLUMN_1, column1s[i]);
      model.set(AnonymousDto.COLUMN_2, column2s[i]);
      model.set(AnonymousDto.COLUMN_3, column3s[i]);
      //For report
      detail_des_retenues_appliques += numberFormat.format(column2s[i]) + Constants.SEPRATE + (numberFormat.format(column3s[i] * 100) + "%") + Constants.SEPRATE;
      models.add(model);
    }
    //For Report
    if(detail_des_retenues_appliques != null && detail_des_retenues_appliques.length() > 0){
      detail_des_retenues_appliques = detail_des_retenues_appliques.substring(0,detail_des_retenues_appliques.length() - Constants.SEPRATE.length());
View Full Code Here

    ProgressDto progressDto = null;
    String process = "";
    String totalsituation = "";
    //Grid 1
    DateTimeFormat dateTimeFormat = DateTimeFormat.getFormat(Constants.DATE_FORMAT);
    NumberFormat numberFormat = NumberFormat.getFormat(Constants.NUMBER_FORMAT);
    String process_date = "";
    //String [] arrMois = mois.split(Constants.SEPRATE);
    for (int j = 0; j < list.size(); j++) {   
      progressDto = list.get(j);
      process_date = progressDto.getDate() != null ? dateTimeFormat.format(progressDto.getDate()) : "";
      process += (j+1) + Constants.SEPRATE + progressDto.getLabel() + Constants.SEPRATE +
      process_date + Constants.SEPRATE + numberFormat.format(progressDto.getCumule()) + Constants.SEPRATE + numberFormat.format(progressDto.getMois()) +
      Constants.SEPRATE + numberFormat.format(progressDto.getCumule2()) + Constants.SEPRATE + numberFormat.format(progressDto.getMois2()) + Constants.SEPRATE;
    }

    String generaleInformation = chainter + Constants.SEPRATE + lot.getValue() + Constants.SEPRATE + sitravaux.getValue() + Constants.SEPRATE +
    societte.getValue() + Constants.SEPRATE + lotType.getValue().getName() + Constants.SEPRATE + montant.getValue();
    params.add(new NameValuePair("generaleInformation", generaleInformation));
   
    params.add(new NameValuePair(ConstantClient.PROCESSDTO_ID_STR, process));
   
    if((cumule != null && cumule.length() > 0) && (mois !=null && mois.length() > 0)){
      String [] arrCumule = cumule.split(Constants.SEPRATE);
      String [] arrMois = mois.split(Constants.SEPRATE);
      totalsituation = numberFormat.format(new Double(arrCumule[0])) + Constants.SEPRATE + numberFormat.format(new Double(arrMois[0])) + Constants.SEPRATE +
              numberFormat.format(new Double(arrCumule[1])) + Constants.SEPRATE + numberFormat.format(new Double(arrMois[1]));
      params.add(new NameValuePair("totalsituation",totalsituation));
    }
    //Grid 2
    params.add(new NameValuePair("detail_des_retenues_appliques",detail_des_retenues_appliques));
   
    //Grid 3
    params.add(new NameValuePair("grid_3_report",grid_3_report));
    params.add(new NameValuePair("etatAvancement",numberFormat.format(etatAvancement)));
    String srcComment = comment.getValue();
    params.add(new NameValuePair("commentaire",srcComment));
    String exportPdfUrl = GWT.getHostPageBaseURL() + "list_processdto.pdf"
    ReportUtil.showReport(exportPdfUrl, params.toArray(new NameValuePair[params.size()]));   
  }
View Full Code Here

  /**
   * @param params
   * @return
   */
  protected String append(Object... params) {
    NumberFormat numberFormat = NumberFormat.getFormat(Constants.NUMBER_FORMAT);
    DateTimeFormat dateTimeFormat = DateTimeFormat.getFormat(Constants.DATE_FORMAT);
    String srcParam = "";
    for( Object param : params ) {
      if( param != null ) {
        if( param instanceof String ) {
          srcParam += param;
        }
        if( param instanceof Integer ) {
          srcParam += numberFormat.format(((Integer) param).intValue());
        }
        if( param instanceof Double ) {
          srcParam += numberFormat.format(((Double) param).doubleValue());
        }
        if( param instanceof Float ) {
          srcParam += numberFormat.format(((Float) param).floatValue());
        }
        if( param instanceof Date ) {
          srcParam += dateTimeFormat.format((Date) param);
        }
      }
View Full Code Here

    });
  }

  @SuppressWarnings({ "rawtypes", "unchecked" })
  private void createDeductionGrid() {
    final NumberFormat numberFormat = NumberFormat.getFormat(NUMBER_FORMAT);
    final String[] headers = { "<br><br>" + messages.del(), "<br><br>" + messages.date(),
        messages.canto() + "<br>" + numberFormat.format(ratioList[0]), messages.badge() + "<br>" + numberFormat.format(ratioList[1]),
        messages.grue() + "<br>" + numberFormat.format(ratioList[2]), messages.lift() + "<br>" + numberFormat.format(ratioList[3]),
        messages.benne() + "<br>" + numberFormat.format(ratioList[4]), messages.nettoyage() + "<br>" + numberFormat.format(ratioList[5]),
        messages.autres() + "<br>-", messages.prorata() + "<br>" + numberFormat.format(ratioList[6]), "<br><br>" + messages.refacturations() };
    bus.addHandler(PrestationEvent.TYPE, new PrestationHandler() {
      @Override
      public void onChangePrestation(PrestationEvent prestationEvent) {
        switch (prestationEvent.getIndex()) {
        case 0: // messages.canto()
          ratioList[0] = prestationEvent.getValue();
          deductionGrid.getColumnModel().setColumnHeader(2, messages.canto() + "<br>" + numberFormat.format(ratioList[0]));
          deductionGrid.getView().refresh(true);
          break;
        case 1: // messages.badge()
          ratioList[1] = prestationEvent.getValue();
          deductionGrid.getColumnModel().setColumnHeader(3, messages.badge() + "<br>" + numberFormat.format(ratioList[1]));
          deductionGrid.getView().refresh(true);
          break;

        case 2: // messages.grue()
          ratioList[2] = prestationEvent.getValue();
          deductionGrid.getColumnModel().setColumnHeader(4, messages.grue() + "<br>" + numberFormat.format(ratioList[2]));
          deductionGrid.getView().refresh(true);
          break;
        case 3: // messages.lift()
          ratioList[3] = prestationEvent.getValue();
          deductionGrid.getColumnModel().setColumnHeader(5, messages.lift() + "<br>" + numberFormat.format(ratioList[3]));
          deductionGrid.getView().refresh(true);
          break;
        case 4: // messages.benne()
          ratioList[4] = prestationEvent.getValue();
          deductionGrid.getColumnModel().setColumnHeader(6, messages.benne() + "<br>" + numberFormat.format(ratioList[4]));
          deductionGrid.getView().refresh(true);
          break;
        case 5: // messages.nettoyage()
          ratioList[5] = prestationEvent.getValue();
          deductionGrid.getColumnModel().setColumnHeader(7, messages.nettoyage() + "<br>" + numberFormat.format(ratioList[5]));
          deductionGrid.getView().refresh(true);
          break;
        case 6: // messages.prorata()
          ratioList[6] = prestationEvent.getValue();
          deductionGrid.getColumnModel().setColumnHeader(9, messages.prorata() + "<br>" + numberFormat.format(ratioList[6]));
          deductionGrid.getView().refresh(true);
          break;
        }
      }
    });
    if (ratioList[0] == 1 && ratioList[1] == 1 && ratioList[2] == 1 && ratioList[3] == 1 && ratioList[4] == 1 && ratioList[5] == 1
        && ratioList[6] == 1) {
      Map<Integer, String> mapPrestations = navigation.getContext().getMapPrestations();
      String prestationValue = mapPrestations.get(ficheStId);
      if (prestationValue != null && prestationValue.length() > 0) {
        String arrRatio[] = prestationValue.split(Constants.SEPRATE);
        ratioList[0] = new Double(arrRatio[0]);
        ratioList[1] = new Double(arrRatio[1]);
        ratioList[2] = new Double(arrRatio[2]);
        ratioList[3] = new Double(arrRatio[3]);
        ratioList[4] = new Double(arrRatio[4]);
        ratioList[5] = new Double(arrRatio[5]);
        ratioList[6] = new Double(arrRatio[6]);

        headers[2] = messages.canto() + "<br>" + numberFormat.format(ratioList[0]);
        headers[3] = messages.badge() + "<br>" + numberFormat.format(ratioList[1]);
        headers[4] = messages.grue() + "<br>" + numberFormat.format(ratioList[2]);
        headers[5] = messages.lift() + "<br>" + numberFormat.format(ratioList[3]);
        headers[6] = messages.benne() + "<br>" + numberFormat.format(ratioList[4]);
        headers[7] = messages.nettoyage() + "<br>" + numberFormat.format(ratioList[5]);
        headers[9] = messages.prorata() + "<br>" + numberFormat.format(ratioList[6]);
      }
    }
    final String[] ids = { DeductionDto.ID, DeductionDto.DATE, DeductionDto.CANTO, DeductionDto.BADGE, DeductionDto.GRUE, DeductionDto.LIFT,
        DeductionDto.BENNE, DeductionDto.NETTOYAGE, DeductionDto.AUTRES, DeductionDto.PRORATA, DeductionDto.REFACTURATIONS };
    int commonWidth = 112;
    int[] columnsWidth = { DELETE_BUTTON_WIDTH, commonWidth + 20, commonWidth, commonWidth, commonWidth, commonWidth, commonWidth, commonWidth,
        commonWidth, commonWidth, commonWidth };
    HorizontalAlignment[] horizontalAlignments = { HorizontalAlignment.CENTER };

    AggregationRowConfig<DeductionDto> totalSummary = new AggregationRowConfig<DeductionDto>();
    totalSummary.setHtml(DeductionDto.DATE, messages.total());
    // For Report
    totaldeduction = "";
    List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
    for (int i = 0; i < ids.length; i++) {
      String columnId = ids[i];
      SummaryColumnConfig column = new SummaryColumnConfig(columnId, headers[i], columnsWidth[i]);
      column.setAlignment(horizontalAlignments[0]);
      column.setMenuDisabled(true);

      columns.add(column);

      if (i == 0) {
        column.setRenderer(createDeleteButtonRenderer());
      } else if (i == 1) {
        column.setRenderer(createDateRendererWithPermision(column.getWidth() - PADDING_2, role, user));
//        column.setEditor(new CellEditor(createDateField()));
      } else if (i <= 7) {
        column.setRenderer(createIntegerRendererWithPermission(commonWidth - PADDING, role, user));
        NumberField numberField = createIntegerField(null);
        numberField.setPropertyEditorType(Integer.class);
        column.setEditor(new CellEditor(numberField));
      } else {
        column.setRenderer(createNumberRendererWithPermission(commonWidth - PADDING, role, user));
        NumberField numberField = createNumberField(null);
        if (i == 9) {
          numberField.setMinValue(0);
          numberField.setMaxValue(100);
          column.setEditor(new CellEditor(numberField));
        }
      }

      if (i > 1 && i != 9 && i != 10) {
        // Total summary columns
        totalSummary.setSummaryFormat(columnId, NumberFormat.getFormat(NUMBER_FORMAT));
        totalSummary.setSummaryType(columnId, new SummaryType<Double>() {
          @Override
          public Double render(Object v, ModelData m, String field, Map<String, Object> data) {
            if (v == null) {
              v = 0.0;
            }
            Object obj = m.get(field);
            if (obj != null) {
              double ratio = findRatio(field);
              totaldeduction += numberFormat.format(((Double) v) + ((Number) obj).doubleValue() * ratio) + Constants.SEPRATE;
              return ((Double) v) + ((Number) obj).doubleValue() * ratio;
            }
            totaldeduction += numberFormat.format(((Double) v)) + Constants.SEPRATE;
            return ((Double) v);
          }

          private double findRatio(String field) {
            for (int i = 0; i <= ids.length; i++) {
              String columnId = ids[i];
              if (columnId.equalsIgnoreCase(field)) {
                if (DeductionDto.AUTRES.equalsIgnoreCase(field)) {
                  return 1.0;
                } else {
                  return ratioList[i - 2];
                }

              }
            }
            return 0.0;
          }
        });
      }
      if (i == 9) {
        // Total summary columns
        totalSummary.setSummaryFormat(columnId, NumberFormat.getFormat(NUMBER_FORMAT));
        totalSummary.setSummaryType(columnId, new SummaryType<Double>() {
          @Override
          public Double render(Object v, ModelData m, String field, Map<String, Object> data) {
            if (v == null) {
              v = 0.0;
            }
            Object obj = m.get(field);
            if (obj != null) {
              totaldeduction += numberFormat.format(((Double) v) + ((Number) obj).doubleValue()) + Constants.SEPRATE;
              return ((Double) v) + ((Number) obj).doubleValue() * ratioList[6];
            }
            totaldeduction += numberFormat.format(((Double) v)) + Constants.SEPRATE;
            return ((Double) v);
          }
        });

      }
      if (i == 10) {
        // Total summary columns
        totalSummary.setSummaryFormat(columnId, NumberFormat.getFormat(NUMBER_FORMAT));
        totalSummary.setSummaryType(columnId, new SummaryType<Double>() {
          @Override
          public Double render(Object v, ModelData m, String field, Map<String, Object> data) {
            if (v == null) {
              v = 0.0;
            }
            Object obj = m.get(field);
            if (obj != null) {
              totaldeduction += numberFormat.format(((Double) v) + ((Number) obj).doubleValue()) + Constants.SEPRATE;
              return ((Double) v) + ((Number) obj).doubleValue();
            }
            totaldeduction += numberFormat.format(((Double) v)) + Constants.SEPRATE;
            return ((Double) v);
          }
        });
      }
    }
View Full Code Here

    DeductionDto deductionDto = null;
    String deductions = "";
    double amount = 0.0;
    String information = "";
    // Grid 1
    NumberFormat numberFormat = NumberFormat.getFormat(NUMBER_FORMAT);
    double canto = 0.0;
    double badge = 0.0;
    double grue = 0.0;
    double lift = 0.0;
    double benne = 0.0;
    double nettoyage = 0.0;
    double autres = 0.0; // khong co nhan
    double prorata = 0.0;
    double refacturations = 0.0;// khong co nhan
    for (int j = 0; j < listDeduction.size(); j++) {
      deductionDto = listDeduction.get(j);
      /*
       * deductions += DateTimeFormat.getFormat(Constants.DATE_FORMAT).format (deductionDto.getDate()) + Constants.SEPRATE +
       * numberFormat.format(deductionDto.getCanto()) + Constants.SEPRATE + numberFormat.format(deductionDto.getBadge()) + Constants.SEPRATE +
       * numberFormat.format(deductionDto.getGrue()) + Constants.SEPRATE + numberFormat.format(deductionDto.getLift()) + Constants.SEPRATE +
       * numberFormat.format(deductionDto.getBenne()) + Constants.SEPRATE + numberFormat.format(deductionDto.getNettoyage()) + Constants.SEPRATE
       * + numberFormat.format(deductionDto.getAutres()) + Constants.SEPRATE + numberFormat.format(deductionDto.getProrata()) +
       * Constants.SEPRATE + numberFormat.format(deductionDto.getRefacturations()) + Constants.SEPRATE;
       */
      deductions += append(deductionDto.getDate(), deductionDto.getCanto(), deductionDto.getBadge(), deductionDto.getGrue(),
          deductionDto.getLift(), deductionDto.getBenne(), deductionDto.getNettoyage(), deductionDto.getAutres(),
          deductionDto.getProrata(), deductionDto.getRefacturations());

      canto += deductionDto.getCanto();
      badge += deductionDto.getBadge();
      grue += deductionDto.getGrue();
      lift += deductionDto.getLift();
      benne += deductionDto.getBenne();
      nettoyage += deductionDto.getNettoyage();
      autres += deductionDto.getAutres();
      prorata += deductionDto.getProrata();
      refacturations += deductionDto.getRefacturations();
    }
    canto = canto * ratioList[0];
    badge = badge * ratioList[1];
    grue = grue * ratioList[2];
    lift = lift * ratioList[3];
    benne = benne * ratioList[4];
    nettoyage = nettoyage * ratioList[5];
    prorata = prorata * ratioList[6];
    values.add(new NameValuePair(ConstantClient.DEDUCTIONDTO_ID_STR, deductions));
    String paramPrestation = append(ratioList[0], ratioList[1], ratioList[2], ratioList[3], ratioList[4], ratioList[5], ratioList[6]);
    values.add(new NameValuePair("paramPrestation", paramPrestation));
    canto += deductionDto.getCanto();
    badge += deductionDto.getBadge();
    grue += deductionDto.getGrue();
    lift += deductionDto.getLift();
    benne += deductionDto.getBenne();
    nettoyage += deductionDto.getNettoyage();
    autres += deductionDto.getAutres();
    prorata += deductionDto.getProrata();

    information += chantier + Constants.SEPRATE + responsables + Constants.SEPRATE + societe;
    values.add(new NameValuePair("information", information));

    String generaleInformation = chantier + Constants.SEPRATE + lot.getValue() + Constants.SEPRATE + sitravaux.getValue() + Constants.SEPRATE
        + societte.getValue() + Constants.SEPRATE + lotType.getValue().getName() + Constants.SEPRATE + montant.getValue();
    values.add(new NameValuePair("generaleInformation", generaleInformation));
    /*
     * if(totaldeduction != "") totaldeduction = totaldeduction.substring(0, totaldeduction.length() - Constants.SEPRATE.length());
     */
    totaldeduction = append(canto, badge, grue, lift, benne, nettoyage, autres, prorata, refacturations);
    values.add(new NameValuePair("totaldeduction", totaldeduction));

    List<PenaltyDto> listPenalty = penaltyGrid.getStore().getModels();
    PenaltyDto penaltyDto = null;
    String penaltys = "";
    String penaltyDate = "";
    // Grid 1
    for (int j = 0; j < listPenalty.size(); j++) {
      penaltyDto = listPenalty.get(j);
      penaltyDate = penaltyDto.getDate() != null ? DateTimeFormat.getFormat(Constants.DATE_FORMAT).format(penaltyDto.getDate()) : "";
      penaltys += penaltyDate + Constants.SEPRATE + numberFormat.format(penaltyDto.getAmount()) + Constants.SEPRATE + penaltyDto.getComment()
          + Constants.SEPRATE;
      amount += penaltyDto.getAmount();
    }
    if (penaltys != null && penaltys.length() > 0)
      penaltys = penaltys.substring(0, penaltys.length() - Constants.SEPRATE.length());
View Full Code Here

  protected void onRender(Element parent, int index) {
    super.onRender(parent, index);
   
    setLayout(new FlowLayout(15));
   
    final NumberFormat currency = NumberFormat.getCurrencyFormat();
    final NumberFormat number = NumberFormat.getFormat("0.00");
    final NumberCellRenderer<Grid<Stock>> numberRenderer = new NumberCellRenderer<Grid<Stock>>(currency);

    GridCellRenderer<Stock> change = new GridCellRenderer<Stock>() {
      public String render(Stock model, String property, ColumnData config, int rowIndex, int colIndex,
          ListStore<Stock> store, Grid<Stock> grid) {
        double val = (Double)model.get(property);
        String style = val < 0 ? "red" : "green";
        return "<span style='color:" + style + "'>" + number.format(val) + "</span>";
      }
    };

    GridCellRenderer<Stock> gridNumber = new GridCellRenderer<Stock>() {
      public String render(Stock model, String property, ColumnData config, int rowIndex, int colIndex,
          ListStore<Stock> store, Grid<Stock> grid) {
        return numberRenderer.render(null, property, model.get(property));
      }
    };

    List<ColumnConfig> configs = new ArrayList<ColumnConfig>();

    ColumnConfig column = new ColumnConfig();
    column.setId("name");
    column.setHeader("Company");
    column.setWidth(200);
    configs.add(column);

    column = new ColumnConfig();
    column.setId("symbol");
    column.setHeader("Symbol");
    column.setWidth(100);
    configs.add(column);

    column = new ColumnConfig();
    column.setId("last");
    column.setHeader("Last");
    column.setAlignment(HorizontalAlignment.RIGHT);
    column.setWidth(100);
    column.setRenderer(gridNumber);
    configs.add(column);

    column = new ColumnConfig("change", "Change", 100);
    column.setAlignment(HorizontalAlignment.RIGHT);
    column.setRenderer(change);
    configs.add(column);

    column = new ColumnConfig("date", "Last Updated", 100);
    column.setAlignment(HorizontalAlignment.RIGHT);
    column.setDateTimeFormat(DateTimeFormat.getFormat("MM/dd/yyyy"));
    configs.add(column);

    final ListStore<Stock> store = new ListStore<Stock>();
    store.add(TestData.getStocks());

    ColumnModel cm = new ColumnModel(configs);
   
    cm.addHeaderGroup(0, 2, new HeaderGroupConfig("Stock Performance", 1, 2));
    cm.addHeaderGroup(0, 0, new HeaderGroupConfig("Stock Information", 1, 2));
    AggregationRowConfig<Stock> averages = new AggregationRowConfig<Stock>();
    averages.setHtml("name", "Average");
   
    // with summary type and format
    averages.setSummaryType("last", SummaryType.AVG);
    averages.setSummaryFormat("last", NumberFormat.getCurrencyFormat());
   
    // with renderer
    averages.setSummaryType("change", SummaryType.AVG);
    averages.setRenderer("change", new AggregationRenderer<Stock>() {
      public Object render(Number value, int colIndex, Grid<Stock> grid, ListStore<Stock> store) {
        // you can return html here
        return number.format(value.doubleValue());
      }
    });
    cm.addAggregationRow(averages);
   
    averages = new AggregationRowConfig<Stock>();
    averages.setHtml("name", "Maximum");
   
   
    averages.setSummaryType("last", SummaryType.MAX);
    averages.setSummaryFormat("last", NumberFormat.getCurrencyFormat());

    averages.setSummaryType("change", SummaryType.MAX);
    averages.setRenderer("change", new AggregationRenderer<Stock>() {
      public Object render(Number value, int colIndex, Grid<Stock> grid, ListStore<Stock> store) {
        return number.format(value.doubleValue());
      }
    });
    cm.addAggregationRow(averages);
   
    ContentPanel cp = new ContentPanel();
View Full Code Here

TOP

Related Classes of com.google.gwt.i18n.client.NumberFormat

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.