+/*
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ *
+ * This file is part of Jalview.
+ *
+ * Jalview is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ */
package jalview.datamodel;
import java.awt.Color;
String getType();
int getWidth();
+
int getHeight();
+
public GroupSetI getGroupSet();
/// proxy methods to simplify use of the interface
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());
}
}
}
}
-
+
/**
- * 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)
if (hasGroupSet())
{
GroupSetI groups = getGroupSet();
- for (BitSet gp:groups.getGroups())
+ for (BitSet gp : groups.getGroups())
{
if (gp.get(column))
{
}
return Color.white;
}
-
+
+ /**
+ * direct access to column and row position of matrix
+ *
+ * Implementations are allowed to throw RunTimeExceptions if _column/i are out
+ * of bounds
+ *
+ * @param column
+ * @param row
+ * @return
+ */
+ double getElementAt(int column, int row);
+
}