コード例 #1
0
 /**
  * Returns a {@link CellFormat} that applies the given format.  Two calls
  * with the same format may or may not return the same object.
  *
  * @param format The format.
  *
  * @return A {@link CellFormat} that applies the given format.
  */
 public static CellFormat GetInstance(String format)
 {
     CellFormat fmt = null;
     if (formatCache.ContainsKey(format))
         fmt = formatCache[format];
     if (fmt == null)
     {
         if (format.Equals("General"))
             fmt = GENERAL_FORMAT;
         else
             fmt = new CellFormat(format);
         formatCache.Add(format, fmt);
     }
     return fmt;
 }