* [1688492] No Sort indicator for lookup and info window

* [1688435] Sort indicator wrong after refresh
This commit is contained in:
Heng Sin Low 2007-03-26 15:47:07 +00:00
parent 64823b5c33
commit c97a21bedf
2 changed files with 23 additions and 6 deletions

View File

@ -104,6 +104,7 @@ public final class VTable extends CTable
return;
}
sorting = true;
// other sort column
if (modelColumnIndex != p_lastSortIndex)
p_asc = true;
@ -116,6 +117,8 @@ public final class VTable extends CTable
+ " - rows=" + rows + ", asc=" + p_asc);
((GridTable)model).sort(modelColumnIndex, p_asc);
sorting = false;
// table model fires "Sorted" DataStatus event which causes MTab to position to row 0
} // sort

View File

@ -298,7 +298,9 @@ public class MiniTable extends CTable
m_minWidth.add(new Integer(10));
tc.setMaxWidth(20);
tc.setPreferredWidth(20);
tc.setResizable(false);
tc.setResizable(false);
tc.setHeaderRenderer(new VHeaderRenderer(DisplayType.Number));
}
// Boolean
else if (c == Boolean.class)
@ -314,6 +316,8 @@ public class MiniTable extends CTable
tc.setCellEditor(new DefaultCellEditor(check));
}
m_minWidth.add(new Integer(30));
tc.setHeaderRenderer(new VHeaderRenderer(DisplayType.YesNo));
}
// Date
else if (c == Timestamp.class)
@ -323,7 +327,9 @@ public class MiniTable extends CTable
tc.setCellEditor(new ROCellEditor());
else
tc.setCellEditor(new MiniCellEditor(c));
m_minWidth.add(new Integer(30));
m_minWidth.add(new Integer(30));
tc.setHeaderRenderer(new VHeaderRenderer(DisplayType.DateTime));
}
// Amount
else if (c == BigDecimal.class)
@ -338,7 +344,9 @@ public class MiniTable extends CTable
{
tc.setCellEditor(new MiniCellEditor(c));
m_minWidth.add(new Integer(80));
}
}
tc.setHeaderRenderer(new VHeaderRenderer(DisplayType.Number));
}
// Number
else if (c == Double.class)
@ -353,7 +361,9 @@ public class MiniTable extends CTable
{
tc.setCellEditor(new MiniCellEditor(c));
m_minWidth.add(new Integer(80));
}
}
tc.setHeaderRenderer(new VHeaderRenderer(DisplayType.Number));
}
// Integer
else if (c == Integer.class)
@ -363,7 +373,9 @@ public class MiniTable extends CTable
tc.setCellEditor(new ROCellEditor());
else
tc.setCellEditor(new MiniCellEditor(c));
m_minWidth.add(new Integer(30));
m_minWidth.add(new Integer(30));
tc.setHeaderRenderer(new VHeaderRenderer(DisplayType.Number));
}
// String
else
@ -373,7 +385,9 @@ public class MiniTable extends CTable
tc.setCellEditor(new ROCellEditor());
else
tc.setCellEditor(new MiniCellEditor(String.class));
m_minWidth.add(new Integer(30));
m_minWidth.add(new Integer(30));
tc.setHeaderRenderer(new VHeaderRenderer(DisplayType.String));
}
// log.fine( "Renderer=" + tc.getCellRenderer().toString() + ", Editor=" + tc.getCellEditor().toString());
} // setColumnClass