X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FContactMatrixI.java;h=1d7391b617a009807695ac995693130c1c20e6dd;hb=4b7d3640209c4434d569c746672cf9eed4250ace;hp=bac3abf05acb9eb36fa42b7349b1312aa85ab93c;hpb=a0ac724dba7d556966b546d4a0093449c397be84;p=jalview.git diff --git a/src/jalview/datamodel/ContactMatrixI.java b/src/jalview/datamodel/ContactMatrixI.java index bac3abf..1d7391b 100644 --- a/src/jalview/datamodel/ContactMatrixI.java +++ b/src/jalview/datamodel/ContactMatrixI.java @@ -1,5 +1,10 @@ package jalview.datamodel; +import java.awt.Color; +import java.util.Arrays; +import java.util.BitSet; +import java.util.List; + public interface ContactMatrixI { @@ -29,4 +34,59 @@ public interface ContactMatrixI int getHeight(); + default boolean hasGroups() + { + return false; + } + + default BitSet getGroupsFor(int column) + { + BitSet colbitset = new BitSet(); + colbitset.set(column); + return colbitset; + } + + default List getGroups() + { + return Arrays.asList(); + } + + default boolean hasTree() + { + return false; + } + + /** + * Newick representation of clustered matrix + * + * @return null unless hasTree is true + */ + default String getNewick() + { + return null; + } + + default String getTreeMethod() + { + return null; + } + + default boolean hasCutHeight() + { + return false; + } + + default double getCutHeight() + { + return 0; + } + + void updateGroups(List colGroups); + + void setColorForGroup(BitSet bs, Color color); + + default Color getColourForGroup(BitSet bs) + { + return Color.white; + }; }