tc.setHeaderRenderer(new VHeaderRenderer(DisplayType.YesNo));
}
// Date
else if (c == Timestamp.class)
{
tc.setCellRenderer(new VCellRenderer(DisplayType.Date));
if (readOnly)
tc.setCellEditor(new ROCellEditor());
else
tc.setCellEditor(new MiniCellEditor(c));
m_minWidth.add(new Integer(30));
tc.setHeaderRenderer(new VHeaderRenderer(DisplayType.DateTime));
}
// Amount
else if (c == BigDecimal.class)
{
tc.setCellRenderer(new VCellRenderer(DisplayType.Amount));
if (readOnly)
{
tc.setCellEditor(new ROCellEditor());
m_minWidth.add(new Integer(70));
}
else
{
tc.setCellEditor(new MiniCellEditor(c));
m_minWidth.add(new Integer(80));
}
tc.setHeaderRenderer(new VHeaderRenderer(DisplayType.Number));
}
// Number
else if (c == Double.class)
{
tc.setCellRenderer(new VCellRenderer(DisplayType.Number));
if (readOnly)
{
tc.setCellEditor(new ROCellEditor());
m_minWidth.add(new Integer(70));
}
else
{
tc.setCellEditor(new MiniCellEditor(c));
m_minWidth.add(new Integer(80));
}
tc.setHeaderRenderer(new VHeaderRenderer(DisplayType.Number));
}
// Integer
else if (c == Integer.class)
{
tc.setCellRenderer(new VCellRenderer(DisplayType.Integer));
if (readOnly)
tc.setCellEditor(new ROCellEditor());
else
tc.setCellEditor(new MiniCellEditor(c));
m_minWidth.add(new Integer(30));
tc.setHeaderRenderer(new VHeaderRenderer(DisplayType.Number));
}
// String
else
{
tc.setCellRenderer(new VCellRenderer(DisplayType.String));
if (readOnly)
tc.setCellEditor(new ROCellEditor());
else
tc.setCellEditor(new MiniCellEditor(String.class));
m_minWidth.add(new Integer(30));