git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-3026-JAL-3063 menus dyanamic; better alignment
[jalview.git]
/
src
/
jalview
/
schemes
/
ResidueColourScheme.java
diff --git
a/src/jalview/schemes/ResidueColourScheme.java
b/src/jalview/schemes/ResidueColourScheme.java
index
03fc129
..
2f7a5e0
100755
(executable)
--- a/
src/jalview/schemes/ResidueColourScheme.java
+++ b/
src/jalview/schemes/ResidueColourScheme.java
@@
-24,7
+24,6
@@
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.SequenceCollectionI;
import jalview.datamodel.SequenceGroup;
import jalview.datamodel.SequenceI;
import jalview.datamodel.SequenceCollectionI;
import jalview.datamodel.SequenceGroup;
import jalview.datamodel.SequenceI;
-import jalview.util.Comparison;
import java.awt.Color;
import java.util.Map;
import java.awt.Color;
import java.util.Map;
@@
-36,9
+35,17
@@
public abstract class ResidueColourScheme implements ColourSchemeI
{
public static final String NONE = "None";
{
public static final String NONE = "None";
+ /*
+ * default display name for a user defined colour scheme
+ */
public static final String USER_DEFINED = "User Defined";
/*
public static final String USER_DEFINED = "User Defined";
/*
+ * name for (new) "User Defined.." colour scheme menu item
+ */
+ public static final String USER_DEFINED_MENU = "*User Defined*";
+
+ /*
* lookup up by character value e.g. 'G' to the colors array index
* e.g. if symbolIndex['K'] = 11 then colors[11] is the colour for K
*/
* lookup up by character value e.g. 'G' to the colors array index
* e.g. if symbolIndex['K'] = 11 then colors[11] is the colour for K
*/
@@
-55,8
+62,9
@@
public abstract class ResidueColourScheme implements ColourSchemeI
/**
* Creates a new ResidueColourScheme object.
*
/**
* Creates a new ResidueColourScheme object.
*
- * @param final int[] index table into colors (ResidueProperties.naIndex or
- * ResidueProperties.aaIndex)
+ * @param final
+ * int[] index table into colors (ResidueProperties.naIndex or
+ * ResidueProperties.aaIndex)
* @param colors
* colours for symbols in sequences
*/
* @param colors
* colours for symbols in sequences
*/
@@
-91,8
+99,7
@@
public abstract class ResidueColourScheme implements ColourSchemeI
{
Color colour = Color.white;
{
Color colour = Color.white;
- if (!Comparison.isGap(c) && colors != null && symbolIndex != null
- && c < symbolIndex.length
+ if (colors != null && symbolIndex != null && c < symbolIndex.length
&& symbolIndex[c] < colors.length)
{
colour = colors[symbolIndex[c]];
&& symbolIndex[c] < colors.length)
{
colour = colors[symbolIndex[c]];
@@
-201,4
+208,14
@@
public abstract class ResidueColourScheme implements ColourSchemeI
{
return true;
}
{
return true;
}
+
+ /**
+ * Default method returns false. Override this to return true in colour
+ * schemes that have a colour associated with gap residues.
+ */
+ @Override
+ public boolean hasGapColour()
+ {
+ return false;
+ }
}
}