@Override
public boolean markColumnsContainingFeatures(boolean invert,
- boolean extendCurrent, boolean toggle, String featureType)
+ boolean extendCurrent, boolean toggle, String... featureType)
{
// JBPNote this routine could also mark rows, not just columns.
// need a decent query structure to allow all types of feature searches
|| extendCurrent) ? viewport.getAlignment()
: viewport.getSelectionGroup();
- int nseq = findColumnsWithFeature(featureType, sqcol, bs);
+ int nseq = findColumnsWithFeature(sqcol, bs, featureType);
ColumnSelection cs = viewport.getColumnSelection();
if (cs == null)
cs = new ColumnSelection();
}
+ String featureTypeString = featureType.length == 1 ? featureType[0]
+ : featureType.toString();
+
if (bs.cardinality() > 0 || invert)
{
boolean changed = cs.markColumns(bs, sqcol.getStartRes(),
invert ? MessageManager
.getString("label.not_containing")
: MessageManager.getString("label.containing"),
- featureType, Integer.valueOf(nseq).toString() }));
+ featureTypeString, Integer.valueOf(nseq).toString() }));
return true;
}
}
{
avcg.setStatus(MessageManager
.formatMessage("label.no_feature_of_type_found", new String[]
- { featureType }));
+ { featureTypeString }));
if (!extendCurrent)
{
cs.clear();
/**
* Sets a bit in the BitSet for each column (base 0) in the sequence
- * collection which includes a visible feature of the specified feature type.
- * Returns the number of sequences which have the feature visible in the
- * selected range.
+ * collection which includes a visible feature of the specified feature
+ * type(s). Returns the number of sequences which have the feature(s) visible
+ * in the selected range.
*
- * @param featureType
* @param sqcol
* @param bs
+ * @param featureType
+ *
* @return
*/
- int findColumnsWithFeature(String featureType,
- SequenceCollectionI sqcol, BitSet bs)
+ int findColumnsWithFeature(SequenceCollectionI sqcol,
+ BitSet bs, String... featureType)
{
FeatureRenderer fr = alignPanel == null ? null : alignPanel
.getFeatureRenderer();