import java.awt.Color;
import java.util.Map;
+/**
+ * shade sequences using the colour shown in the ID panel. Useful to map
+ * sequence groupings onto residue data (eg tree subgroups visualised on
+ * structures or overview window)
+ *
+ * @author jprocter
+ */
public class IdColourScheme implements ColourSchemeI
{
AlignViewportI view = null;
- AnnotatedCollectionI coll = null;
-
public IdColourScheme()
{
public IdColourScheme(AlignViewportI view, AnnotatedCollectionI coll)
{
this.view = view;
- this.coll = coll;
}
// ((SequenceGroup)coll).idColour
// we always return the sequence ID colour, in case the user has customised
// the displayed Id colour by right-clicking an internal node in the tree.
- return (view == null) ? Color.WHITE
- : view.getSequenceColour(seq).darker();
+ if (view == null)
+ {
+ return Color.WHITE;
+ }
+ Color col = view.getSequenceColour(seq);
+ return Color.WHITE.equals(col) ? Color.WHITE : col.darker();
}
@Override
@Override
public boolean isSimple()
{
- // this is really a sequence colour
- return true;
+ return false;
}
}