public void setFormat(int colNo, java.text.Format fmt) { // SFormat sfmt = (fmt instanceof NumberFormat ? // new FormatSFormat(fmt, "", SFormat.RIGHT) : // new FormatSFormat(fmt, "", SFormat.LEFT)); SFormat sfmt = FormatUtils.toSFormat(fmt); setFormat(colNo, sfmt); }
/** * Sets up a renderer and editor based on a format string. Works for a small number of well-known * types, this is NOT general. */ public void setFormat(int colNo, String fmtString) { // System.out.println("styledModel.getModel(" + colNo + ") = " + styledModel.getModel()); Class klass = styledModel.getModel().getColumnClass(colNo); // Format fmt = FormatUtils.newFormat(klass, fmtString); SFormat sfmt = FormatUtils.toSFormat(klass, fmtString); setFormat(colNo, sfmt); }
public void setFormat(int colNo, java.text.Format fmt, int horizAlign) { // SFormat sfmt = new FormatSFormat(fmt, "", horizAlign); SFormat sfmt = FormatUtils.toSFormat(fmt, horizAlign); setFormat(colNo, sfmt); }