Windows "Session info", "SGA trace" and "Invalid objects":
When any of those is opened, the embedded JTable is populated automatically.
After that, the column widths are adjusted to the table content, but with a maximum column width of 300.
So far this works pretty OK and the widths are appropriate, I think.
However, after reloading the content, the widths of all columns are reduced to a (too) small standard width.
The probable reason is that with each reload a new TableModel object is created.
E.g. in SGATracePanel.populateSGATrace():
:
rs = s.getResultSet();
DefaultTableModel tm = createTableModel();
while (rs.next())
:
So column settings get lost and columns are recreated with a standard width of 75.
A simple solution I could think of is to check if the JTable already has a non-empty table model and then to reset it with setRowCount(0):
:
DefaultTableModel tm;
if ((_sgaTrace.getModel().getColumnCount() > 0) && (_sgaTrace.getModel() instanceof DefaultTableModel))
{
tm = (DefaultTableModel)_sgaTrace.getModel();
tm.setRowCount(0);
}
else
{
tm = createTableModel();
}
:
btw: I would like to suggest to activate a basic sorting functionality in those windows.
E.g. in SGATracePanel.createGUI():
Possibly not the perfect sorting rule for each column, but a quick win and better than no sorting functionality at all, I think.
Thanks you for the changes.
Is fixed and will be available in future snapshots and versions.
Excerpt from change log:
1475 Oracle Plugin: SGA-Trace/Session Info/Invalid objects windows:
Thanks to Chris B for parts of the changes.
Hi Gerd,
thanks for taking care of this.
But have I just seen it correctly, that you have modified the column width behaviour for "SGA-Trace" and "Session Info" only ... but not for "Invalid objects" ?
KR, CB
... is now fixed for "Invalid objects", too. Sorry for the inconvenience.
Gerd