+ public static void configureTableColumn(JTable tbl_summary,
+ Collection<PDBDocField> wantedFields)
+ {
+ for (PDBDocField wantedField : wantedFields)
+ {
+ if (wantedField.equals(PDBDocField.PDB_ID))
+ {
+ tbl_summary.getColumn(wantedField.getName()).setMinWidth(40);
+ tbl_summary.getColumn(wantedField.getName()).setMaxWidth(60);
+ tbl_summary.getColumn(wantedField.getName()).setPreferredWidth(45);
+ }
+ else if (wantedField.equals(PDBDocField.TITLE))
+ {
+ tbl_summary.getColumn(wantedField.getName()).setMinWidth(300);
+ tbl_summary.getColumn(wantedField.getName()).setMaxWidth(1000);
+ tbl_summary.getColumn(wantedField.getName()).setPreferredWidth(400);
+ }
+ else if (wantedField.getGroup() == Group.QUALITY_MEASURES)
+ {
+ tbl_summary.getColumn(wantedField.getName()).setMinWidth(50);
+ tbl_summary.getColumn(wantedField.getName()).setMaxWidth(150);
+ tbl_summary.getColumn(wantedField.getName()).setPreferredWidth(85);
+ }
+ else
+ {
+ tbl_summary.getColumn(wantedField.getName()).setMinWidth(50);
+ tbl_summary.getColumn(wantedField.getName()).setMaxWidth(400);
+ tbl_summary.getColumn(wantedField.getName()).setPreferredWidth(95);
+ }
+ }
+ }