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-4235 JAL-3599 Try and report Eclipse Product Version for jalviewjsTranspile....
[jalview.git]
/
src
/
jalview
/
schemes
/
PurinePyrimidineColourScheme.java
diff --git
a/src/jalview/schemes/PurinePyrimidineColourScheme.java
b/src/jalview/schemes/PurinePyrimidineColourScheme.java
index
d2b878d
..
a8270cc
100644
(file)
--- a/
src/jalview/schemes/PurinePyrimidineColourScheme.java
+++ b/
src/jalview/schemes/PurinePyrimidineColourScheme.java
@@
-20,7
+20,8
@@
*/
package jalview.schemes;
*/
package jalview.schemes;
-import java.awt.Color;
+import jalview.api.AlignViewportI;
+import jalview.datamodel.AnnotatedCollectionI;
/**
* Class is based off of NucleotideColourScheme
/**
* Class is based off of NucleotideColourScheme
@@
-35,56
+36,29
@@
public class PurinePyrimidineColourScheme extends ResidueColourScheme
public PurinePyrimidineColourScheme()
{
super(ResidueProperties.purinepyrimidineIndex,
public PurinePyrimidineColourScheme()
{
super(ResidueProperties.purinepyrimidineIndex,
- ResidueProperties.purinepyrimidine, 0);
+ ResidueProperties.purinepyrimidine);
}
}
- /**
- * Finds the corresponding color for the type of character inputed
- *
- * @param c
- * Character in sequence
- *
- * @return Color from purinepyrimidineIndex in
- * jalview.schemes.ResidueProperties
- */
- public Color findColour(char c)
+ @Override
+ public boolean isNucleotideSpecific()
{
{
- return colors[ResidueProperties.purinepyrimidineIndex[c]];
+ return true;
+ }
+
+ @Override
+ public String getSchemeName()
+ {
+ return JalviewColourScheme.PurinePyrimidine.toString();
}
/**
}
/**
- * Returns color based on conservation
- *
- * @param c
- * Character in sequence
- * @param j
- * Threshold
- *
- * @return Color in RGB
+ * Returns a new instance of this colour scheme with which the given data may
+ * be coloured
*/
*/
- public Color findColour(char c, int j)
+ @Override
+ public ColourSchemeI getInstance(AlignViewportI view,
+ AnnotatedCollectionI coll)
{
{
- Color currentColour;
- if ((threshold == 0) || aboveThreshold(c, j))
- {
- try
- {
- currentColour = colors[ResidueProperties.purinepyrimidineIndex[c]];
- } catch (Exception ex)
- {
- return Color.white;
- }
- }
- else
- {
- return Color.white;
- }
-
- if (conservationColouring)
- {
- currentColour = applyConservation(currentColour, j);
- }
-
- return currentColour;
+ return new PurinePyrimidineColourScheme();
}
}
}
}