org.apache.poi.hssf.contrib.view
Class SVFractionalFormat

java.lang.Object
  extended byjava.text.Format
      extended byorg.apache.poi.hssf.contrib.view.SVFractionalFormat
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class SVFractionalFormat
extends java.text.Format

This class is used to format cells into their fractional format. I cant be 100% sure that the same fractional value will be displayed as in excel but then again it is a lossy formating mode anyway

Author:
Jason Height
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.text.Format
java.text.Format.Field
 
Constructor Summary
SVFractionalFormat(java.lang.String formatStr)
          Constructs a new FractionalFormatter The formatStr defines how the number will be formatted # ?/? Up to one digit # ??/?? Up to two digits # ???/??? Up to three digits # ?/2 In halves # ?/4 In quarters # ?/8 In eighths # ?/16 In sixteenths # ?/10 In tenths # ?/100 In hundredths
 
Method Summary
 java.lang.Object clone()
           
 java.lang.String format(double val)
           
 java.lang.StringBuffer format(java.lang.Object obj, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)
           
 java.lang.Object parseObject(java.lang.String source)
           
 java.lang.Object parseObject(java.lang.String source, java.text.ParsePosition status)
           
 
Methods inherited from class java.text.Format
format, formatToCharacterIterator
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SVFractionalFormat

public SVFractionalFormat(java.lang.String formatStr)
Constructs a new FractionalFormatter The formatStr defines how the number will be formatted # ?/? Up to one digit # ??/?? Up to two digits # ???/??? Up to three digits # ?/2 In halves # ?/4 In quarters # ?/8 In eighths # ?/16 In sixteenths # ?/10 In tenths # ?/100 In hundredths

Method Detail

format

public final java.lang.String format(double val)

format

public java.lang.StringBuffer format(java.lang.Object obj,
                                     java.lang.StringBuffer toAppendTo,
                                     java.text.FieldPosition pos)

parseObject

public java.lang.Object parseObject(java.lang.String source,
                                    java.text.ParsePosition status)

parseObject

public java.lang.Object parseObject(java.lang.String source)
                             throws java.text.ParseException
Throws:
java.text.ParseException

clone

public java.lang.Object clone()


Copyright © 2003 Apache Software Foundation.