package jalview.schemes;
-import jalview.api.AlignViewportI;
import jalview.datamodel.AnnotatedCollectionI;
+import jalview.datamodel.SequenceCollectionI;
+import jalview.datamodel.SequenceI;
import java.util.LinkedHashMap;
import java.util.Map;
*
* @param name
* name of the colour scheme
- * @param viewport
+ * @param forData
+ * the data to be coloured
+ * @param optional
+ * map from hidden representative sequences to the sequences they
+ * represent
* @return
*/
- public ColourSchemeI getColourScheme(String name, AlignViewportI viewport)
+ public ColourSchemeI getColourScheme(String name,
+ AnnotatedCollectionI forData,
+ Map<SequenceI, SequenceCollectionI> hiddenRepSequences)
{
if (name == null)
{
return null;
}
ColourSchemeI cs = schemes.get(name.toLowerCase());
- return cs == null ? null : cs.getInstance(viewport.getAlignment(),
- viewport.getHiddenRepSequences());
+ return cs == null ? null : cs.getInstance(forData, hiddenRepSequences);
}
/**
- * Returns an instance of the colour scheme with which the given data may be
+ * Returns an instance of the colour scheme with which the given view may be
* coloured
*
* @param name
+ * name of the colour scheme
* @param forData
+ * the data to be coloured
* @return
*/
public ColourSchemeI getColourScheme(String name,
AnnotatedCollectionI forData)
{
- ColourSchemeI cs = schemes.get(name.toLowerCase());
- return cs == null ? null : cs.getInstance(forData, null);
+ return getColourScheme(name, forData, null);
}
/**