|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.hssf.eventusermodel.FormatTrackingHSSFListener
public class FormatTrackingHSSFListener
A proxy HSSFListener that keeps track of the document formatting records, and provides an easy way to look up the format strings used by cells from their ids.
Constructor Summary | |
---|---|
FormatTrackingHSSFListener(HSSFListener childListener)
Creates a format tracking wrapper around the given listener, using the default locale for the formats. |
|
FormatTrackingHSSFListener(HSSFListener childListener,
java.util.Locale locale)
Creates a format tracking wrapper around the given listener, using the given locale for the formats. |
Method Summary | |
---|---|
java.lang.String |
formatNumberDateCell(CellValueRecordInterface cell)
Formats the given numeric of date cells contents as a String, in as close as we can to the way that Excel would do so. |
int |
getFormatIndex(CellValueRecordInterface cell)
Returns the index of the format string, used by your cell, or -1 if none found |
java.lang.String |
getFormatString(CellValueRecordInterface cell)
Returns the format string, eg $##.##, used by your cell |
java.lang.String |
getFormatString(int formatIndex)
Returns the format string, eg $##.##, for the given number format index. |
protected int |
getNumberOfCustomFormats()
|
protected int |
getNumberOfExtendedFormats()
|
void |
processRecord(Record record)
Process this record ourselves, and then pass it on to our child listener |
void |
processRecordInternally(Record record)
Process the record ourselves, but do not pass it on to the child Listener. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FormatTrackingHSSFListener(HSSFListener childListener)
default locale
for the formats.
childListener
- the listener to be wrappedpublic FormatTrackingHSSFListener(HSSFListener childListener, java.util.Locale locale)
childListener
- the listener to be wrappedlocale
- the locale for the formatsMethod Detail |
---|
protected int getNumberOfCustomFormats()
protected int getNumberOfExtendedFormats()
public void processRecord(Record record)
processRecord
in interface HSSFListener
record
- the record to be processedpublic void processRecordInternally(Record record)
record
- the record to be processedpublic java.lang.String formatNumberDateCell(CellValueRecordInterface cell)
cell
- the cell
public java.lang.String getFormatString(int formatIndex)
formatIndex
- the format index
public java.lang.String getFormatString(CellValueRecordInterface cell)
cell
- the cell
public int getFormatIndex(CellValueRecordInterface cell)
cell
- the cell
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |