X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FContactMatrixI.java;fp=src%2Fjalview%2Fdatamodel%2FContactMatrixI.java;h=0d3bff603fef79c380bdba96c2709123e605a120;hb=eb3e681d6e82ccdd5d312d1981dfb306e7f479f0;hp=4261519d4e46ab88c09e6a0f64a1df9dbca0ee55;hpb=cb31e23d9138e481479623374aed7767bf8934d2;p=jalview.git diff --git a/src/jalview/datamodel/ContactMatrixI.java b/src/jalview/datamodel/ContactMatrixI.java index 4261519..0d3bff6 100644 --- a/src/jalview/datamodel/ContactMatrixI.java +++ b/src/jalview/datamodel/ContactMatrixI.java @@ -30,7 +30,9 @@ public interface ContactMatrixI String getType(); int getWidth(); + int getHeight(); + public GroupSetI getGroupSet(); /// proxy methods to simplify use of the interface @@ -126,11 +128,12 @@ public interface ContactMatrixI void setGroupSet(GroupSet makeGroups); - default void randomlyReColourGroups() { + default void randomlyReColourGroups() + { if (hasGroupSet()) { GroupSetI groups = getGroupSet(); - for (BitSet group:groups.getGroups()) + for (BitSet group : groups.getGroups()) { groups.setColorForGroup(group, ColorUtils.getARandomColor()); } @@ -179,9 +182,10 @@ public interface ContactMatrixI } } } - + /** - * look up the colour for a column in the associated contact matrix + * look up the colour for a column in the associated contact matrix + * * @return Color.white or assigned colour */ default Color getGroupColorForPosition(int column) @@ -189,7 +193,7 @@ public interface ContactMatrixI if (hasGroupSet()) { GroupSetI groups = getGroupSet(); - for (BitSet gp:groups.getGroups()) + for (BitSet gp : groups.getGroups()) { if (gp.get(column)) { @@ -202,14 +206,14 @@ public interface ContactMatrixI /** * direct access to column and row position of matrix - - * Implementations are allowed to throw - * RunTimeExceptions if _column/i are out of bounds + * + * Implementations are allowed to throw RunTimeExceptions if _column/i are out + * of bounds * * @param column * @param row * @return */ double getElementAt(int column, int row); - + }