static String lastFeatureGroupAdded;\r
static String lastDescriptionAdded;\r
\r
- public boolean createNewFeatures(SequenceI[] sequences,\r
- SequenceFeature[] features,\r
- AlignmentPanel ap)\r
- {\r
- return amendFeatures(sequences, features, true, ap);\r
- }\r
-\r
-\r
int featureIndex = 0;\r
boolean deleteFeature = false;\r
Panel colourPanel;\r
featureGroups = new Hashtable();\r
}\r
\r
-\r
-\r
col = colourPanel.getBackground();\r
setColour(lastFeatureAdded, col);\r
\r
}\r
findAllFeatures();\r
\r
+ String [] tro = new String[renderOrder.length];\r
+ tro[0] = renderOrder[renderOrder.length-1];\r
+ System.arraycopy(renderOrder,0,tro,1,renderOrder.length-1);\r
+ renderOrder = tro;\r
+\r
return true;\r
}\r
else\r
\r
public Color getColour(String featureType)\r
{\r
- return (Color) featureColours.get(featureType);\r
- }\r
-\r
- public void addNewFeature(String name, Color col)\r
- {\r
-\r
- setColour(name, col);\r
- if (av.featuresDisplayed == null)\r
+ if (!featureColours.containsKey(featureType))\r
{\r
- av.featuresDisplayed = new Hashtable();\r
+ jalview.schemes.UserColourScheme ucs = new\r
+ jalview.schemes.UserColourScheme();\r
+ Color col = ucs.createColourFromName(featureType);\r
+ featureColours.put(featureType, col);\r
+ return col;\r
}\r
-\r
- av.featuresDisplayed.put(name, "NOGROUP");\r
+ else\r
+ return (Color) featureColours.get(featureType);\r
}\r
\r
+\r
public void setColour(String featureType, Color col)\r
{\r
featureColours.put(featureType, col);\r
av.featuresDisplayed.clear();\r
}\r
\r
+ /* if (visibleNew)\r
+ {\r
+ if (av.featuresDisplayed != null)\r
+ {\r
+ av.featuresDisplayed.clear();\r
+ }\r
+ else\r
+ {\r
+ av.featuresDisplayed = new Hashtable();\r
+ }\r
+ }\r
+ if (data == null)\r
+ {\r
+ return;\r
+ }*/\r
+\r
+\r
renderOrder = new String[data.length];\r
\r
if (data.length > 0)\r