Package java.text

Examples of java.text.DecimalFormatSymbols$DecimalFormatSymbolsGetter


      return "";

    String format = MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "Application_LongFormat", null, facesContext.getViewRoot().getLocale());   
    DecimalFormat  numberFormat = new DecimalFormat(format);   
   
    DecimalFormatSymbols dfs = new DecimalFormatSymbols();

    dfs.setDecimalSeparator(MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "Application_DecimalSeparator", null, facesContext.getViewRoot().getLocale()).charAt(0));
    dfs.setGroupingSeparator(MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "Application_GroupingSeparator", null, facesContext.getViewRoot().getLocale()).charAt(0));

    numberFormat.setDecimalFormatSymbols(dfs);

    return numberFormat.format(obj);
  }
View Full Code Here


    try
    {
      String format = MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "Application_LongFormat", null, facesContext.getViewRoot().getLocale());   
      DecimalFormat  numberFormat = new DecimalFormat(format);   
     
      DecimalFormatSymbols dfs = new DecimalFormatSymbols();

      dfs.setDecimalSeparator(MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "Application_DecimalSeparator", null, facesContext.getViewRoot().getLocale()).charAt(0));
      dfs.setGroupingSeparator(MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "Application_GroupingSeparator", null, facesContext.getViewRoot().getLocale()).charAt(0));

      numberFormat.setDecimalFormatSymbols(dfs);

      return new Long(numberFormat.parse(str).longValue());
    }
View Full Code Here

    }

    String format = MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "Application_IntegerFormat", null, facesContext.getViewRoot().getLocale());   
    DecimalFormat  numberFormat = new DecimalFormat(format);   
   
    DecimalFormatSymbols dfs = new DecimalFormatSymbols();

    dfs.setDecimalSeparator(MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "Application_DecimalSeparator", null, facesContext.getViewRoot().getLocale()).charAt(0));
    dfs.setGroupingSeparator(MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "Application_GroupingSeparator", null, facesContext.getViewRoot().getLocale()).charAt(0));

    numberFormat.setDecimalFormatSymbols(dfs);
   
    return numberFormat.format(obj);
  }
View Full Code Here

    try
    {
      String format = MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "Application_IntegerFormat", null, facesContext.getViewRoot().getLocale());   
      DecimalFormat  numberFormat = new DecimalFormat(format);   
     
      DecimalFormatSymbols dfs = new DecimalFormatSymbols();

      dfs.setDecimalSeparator(MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "Application_DecimalSeparator", null, facesContext.getViewRoot().getLocale()).charAt(0));
      dfs.setGroupingSeparator(MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "Application_GroupingSeparator", null, facesContext.getViewRoot().getLocale()).charAt(0));

      numberFormat.setDecimalFormatSymbols(dfs);

      return new Integer(numberFormat.parse(str).intValue());
    }
View Full Code Here

      return "";

    String format = MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "Application_LongFormat", null, facesContext.getViewRoot().getLocale());   
    DecimalFormat  numberFormat = new DecimalFormat(format);   
   
    DecimalFormatSymbols dfs = new DecimalFormatSymbols();

    dfs.setDecimalSeparator(MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "Application_DecimalSeparator", null, facesContext.getViewRoot().getLocale()).charAt(0));
    dfs.setGroupingSeparator(MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "Application_GroupingSeparator", null, facesContext.getViewRoot().getLocale()).charAt(0));

    numberFormat.setDecimalFormatSymbols(dfs);

    return numberFormat.format(obj);
  }
View Full Code Here

    try
    {
      String format = MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "Application_LongFormat", null, facesContext.getViewRoot().getLocale());   
      DecimalFormat  numberFormat = new DecimalFormat(format);   
     
      DecimalFormatSymbols dfs = new DecimalFormatSymbols();

      dfs.setDecimalSeparator(MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "Application_DecimalSeparator", null, facesContext.getViewRoot().getLocale()).charAt(0));
      dfs.setGroupingSeparator(MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "Application_GroupingSeparator", null, facesContext.getViewRoot().getLocale()).charAt(0));

      numberFormat.setDecimalFormatSymbols(dfs);

      return new Long(numberFormat.parse(str).longValue());
    }
View Full Code Here

   */
  public static String convertDouble(Double doubleValue)
  {
    DecimalFormat doubleFormatter = new DecimalFormat("#,##0.00;");

    DecimalFormatSymbols dfs = new DecimalFormatSymbols();

    dfs.setDecimalSeparator(',');
    dfs.setGroupingSeparator('.');

    doubleFormatter.setDecimalFormatSymbols(dfs);

    if (doubleValue == null)
      return null;
View Full Code Here

      return "";

    String format = MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "Application_DoubleFormat", null, facesContext.getViewRoot().getLocale());   
    DecimalFormat  numberFormat = new DecimalFormat(format);   
   
    DecimalFormatSymbols dfs = new DecimalFormatSymbols();

    dfs.setDecimalSeparator(MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "Application_DecimalSeparator", null, facesContext.getViewRoot().getLocale()).charAt(0));
    dfs.setGroupingSeparator(MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "Application_GroupingSeparator", null, facesContext.getViewRoot().getLocale()).charAt(0));

    numberFormat.setDecimalFormatSymbols(dfs);
   
    return numberFormat.format(obj);
  }
View Full Code Here

    try
    {
      String format = MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "Application_DoubleFormat", null, facesContext.getViewRoot().getLocale());   
      DecimalFormat  numberFormat = new DecimalFormat(format);   

      DecimalFormatSymbols dfs = new DecimalFormatSymbols();

      dfs.setDecimalSeparator(MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "Application_DecimalSeparator", null, facesContext.getViewRoot().getLocale()).charAt(0));
      dfs.setGroupingSeparator(MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "Application_GroupingSeparator", null, facesContext.getViewRoot().getLocale()).charAt(0));

      numberFormat.setDecimalFormatSymbols(dfs);
     
      return new Double(numberFormat.parse(str).doubleValue());
    }
View Full Code Here

    return dateTimeFormatInstance;
  }

  public DecimalFormatSymbols getUnusualSymbols() {
    if (unusualSymbols == null)
      unusualSymbols = new DecimalFormatSymbols(getLocaleInstance());
    return unusualSymbols;
  }
View Full Code Here

TOP

Related Classes of java.text.DecimalFormatSymbols$DecimalFormatSymbolsGetter

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.