}
});
- summaryView = new JCheckBox(MessageManager.getString("summary_view"));
+ summaryView = new JCheckBox(
+ MessageManager.getString("label.summary_view"));
summaryView
- .setToolTipText(MessageManager.getString("summary_view_tip"));
+ .setToolTipText(
+ MessageManager.getString("label.summary_view_tip"));
summaryView.addActionListener(new ActionListener()
{
@Override
fireTableCellUpdated(row, col);
if (summaryView.isSelected() && col == SHOW_COLUMN)
{
- String type = (String) data[row][TYPE_COLUMN];
- OntologyI so = SequenceOntologyFactory.getInstance();
- for (int r = 0; r < data.length; r++)
+ setSubtypesVisibility(row, (Boolean) value);
+ }
+ updateFeatureRenderer(data);
+ }
+
+ /**
+ * Sets the visibility of any feature types which are sub-types of the type
+ * in the given row of the table
+ *
+ * @param row
+ * @param value
+ */
+ protected void setSubtypesVisibility(int row, Boolean value)
+ {
+ String type = (String) data[row][TYPE_COLUMN];
+ OntologyI so = SequenceOntologyFactory.getInstance();
+
+ for (int r = 0; r < data.length; r++)
+ {
+ String type2 = (String) data[r][TYPE_COLUMN];
+ if (!type2.equals(type))
{
- if (r != row)
+ if (so.isA(type2, type))
{
- String type2 = (String) data[r][TYPE_COLUMN];
- if (so.isA(type2, type))
- {
- data[r][col] = value;
- fireTableCellUpdated(r, col);
- }
+ data[r][SHOW_COLUMN] = value;
+ fireTableCellUpdated(r, SHOW_COLUMN);
}
}
}
-
- updateFeatureRenderer(data);
}
}