Fixed issue with column resizing when only one column.

This commit is contained in:
Jeff Wallace 2013-10-31 14:21:16 -04:00
parent dbdebfa1e4
commit 4142c87919

View File

@ -343,10 +343,11 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
//int scrollWidth = ttv.getWidth();
int margin = 4;
int startColumn = 1;
if (props.size() > 0) {
ov.getOutline().setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
}
// If there is only one column (which was removed from props above)
// Just let the table resize itself.
ov.getOutline().setAutoResizeMode((props.size() > 0) ? JTable.AUTO_RESIZE_OFF : JTable.AUTO_RESIZE_ALL_COLUMNS);
// get first 100 rows values for the table