/** * Sees if the extended formatting record at the specified position * represents a date. First checks against the built in formats, and * then checks against the hash map of FormatRecords * * @param pos the xf format index * @return TRUE if this format index is formatted as a Date */ public final boolean isDate(int pos) { XFRecord xfr = (XFRecord) xfRecords.get(pos); if (xfr.isDate()) { return true; } FormatRecord fr = (FormatRecord) formats.get(new Integer(xfr.getFormatRecord())); return fr == null ? false : fr.isDate(); }
/** * Sees if the extended formatting record at the specified position * represents a date. First checks against the built in formats, and * then checks against the hash map of FormatRecords * * @param pos the xf format index * @return TRUE if this format index is formatted as a Date */ public final boolean isDate(int pos) { XFRecord xfr = (XFRecord) xfRecords.get(pos); if (xfr.isDate()) { return true; } FormatRecord fr = (FormatRecord) formats.get(new Integer(xfr.getFormatRecord())); return fr == null ? false : fr.isDate(); }
/** * Gets the DateFormat used to format the cell. * * @param pos the xf format index * @return the DateFormat object used to format the date in the original * excel cell */ public final DateFormat getDateFormat(int pos) { XFRecord xfr = (XFRecord) xfRecords.get(pos); if (xfr.isDate()) { return xfr.getDateFormat(); } FormatRecord fr = (FormatRecord) formats.get(new Integer(xfr.getFormatRecord())); if (fr == null) { return null; } return fr.isDate() ? fr.getDateFormat() : null; }
/** * Gets the NumberFormat used to format the cell. * * @param pos the xf format index * @return the DateFormat object used to format the date in the original * excel cell */ public final NumberFormat getNumberFormat(int pos) { XFRecord xfr = (XFRecord) xfRecords.get(pos); if (xfr.isNumber()) { return xfr.getNumberFormat(); } FormatRecord fr = (FormatRecord) formats.get(new Integer(xfr.getFormatRecord())); if (fr == null) { return null; } return fr.isNumber() ? fr.getNumberFormat() : null; }
/** * Gets the NumberFormat used to format the cell. * * @param pos the xf format index * @return the DateFormat object used to format the date in the original * excel cell */ public final NumberFormat getNumberFormat(int pos) { XFRecord xfr = (XFRecord) xfRecords.get(pos); if (xfr.isNumber()) { return xfr.getNumberFormat(); } FormatRecord fr = (FormatRecord) formats.get(new Integer(xfr.getFormatRecord())); if (fr == null) { return null; } return fr.isNumber() ? fr.getNumberFormat() : null; }
/** * Gets the DateFormat used to format the cell. * * @param pos the xf format index * @return the DateFormat object used to format the date in the original * excel cell */ public final DateFormat getDateFormat(int pos) { XFRecord xfr = (XFRecord) xfRecords.get(pos); if (xfr.isDate()) { return xfr.getDateFormat(); } FormatRecord fr = (FormatRecord) formats.get(new Integer(xfr.getFormatRecord())); if (fr == null) { return null; } return fr.isDate() ? fr.getDateFormat() : null; }
fonts.put(new Integer(fontIndex), new Integer(f.getFontIndex())); int formatIndex = xfr.getFormatRecord(); formats.put(new Integer(formatIndex), new Integer(f.getFormatRecord()));
fonts.put(new Integer(fontIndex), new Integer(f.getFontIndex())); int formatIndex = xfr.getFormatRecord(); formats.put(new Integer(formatIndex), new Integer(f.getFormatRecord()));
fonts.put(new Integer(fontIndex), new Integer(f.getFontIndex())); int formatIndex = xfr.getFormatRecord(); formats.put(new Integer(formatIndex), new Integer(f.getFormatRecord()));
fonts.put(new Integer(fontIndex), new Integer(f.getFontIndex())); int formatIndex = xfr.getFormatRecord(); formats.put(new Integer(formatIndex), new Integer(f.getFormatRecord()));
if (xfr.getFormatRecord() >= customFormatStartIndex) xfr.setFormatIndex(formatMapping.getNewIndex(xfr.getFormatRecord()));
if (xfr.getFormatRecord() >= customFormatStartIndex) xfr.setFormatIndex(formatMapping.getNewIndex(xfr.getFormatRecord()));