- // If beginning and end are 0, the feature is for the whole sequence
- // and we don't want to render the feature in the normal way
-
- if (newMadeVisible && !oldfeatures.contains(features[index].getType())) {
- // this is a new feature type on the alignment. Mark it for
- // display.
- av.featuresDisplayed.put(features[index].getType(),
- new Integer(getColour(features[index].
- getType()).getRGB()));
- setOrder(features[index].getType(),0);
- }
- }
- }
- if (!allfeatures.contains(features[index].getType()))
- {
- allfeatures.addElement(features[index].getType());
- }
- index++;
- }
- }
- updateRenderOrder(allfeatures);
- findingFeatures = false;
- }
- protected boolean firing=false;
- /**
- * replaces the current renderOrder with the unordered features in allfeatures.
- * The ordering of any types in both renderOrder and allfeatures is preserved,
- * and all new feature types are rendered on top of the existing types, in
- * the order given by getOrder or the order given in allFeatures.
- * Note. this operates directly on the featureOrder hash for efficiency. TODO:
- * eliminate the float storage for computing/recalling the persistent ordering
- *
- * @param allFeatures
- */
- private void updateRenderOrder(Vector allFeatures) {
- Vector allfeatures = new Vector(allFeatures);
- String[] oldRender = renderOrder;
- renderOrder = new String[allfeatures.size()];
- boolean initOrders=(featureOrder==null);
- int opos=0;
- if (oldRender!=null && oldRender.length>0)
- {
- for (int j=0; j<oldRender.length; j++)
- {
- if (oldRender[j]!=null)
+ featureIndex = index;
+ name.setText(features[index].getType());
+ description.setText(features[index].getDescription());
+ source.setText(features[index].getFeatureGroup());
+ start.setValue(new Integer(features[index].getBegin()));
+ end.setValue(new Integer(features[index].getEnd()));
+
+ SearchResults highlight = new SearchResults();
+ highlight.addResult(sequences[0], features[index].getBegin(),
+ features[index].getEnd());
+
+ ap.getSeqPanel().seqCanvas.highlightSearchResults(highlight);
+
+ }
+ FeatureColourI col = getFeatureStyle(name.getText());
+ if (col == null)