- s = seq.getCharAt(i);
-
- if (jalview.util.Comparison.isGap(s))
- {
- continue;
- }
-
- g.setColor(featureColour);
-
- g.fillRect( (i - start) * av.charWidth, y1, av.charWidth, av.charHeight);
-
- if (offscreenRender || !av.validCharWidth)
- {
- continue;
- }
-
- g.setColor(Color.white);
- charOffset = (av.charWidth - fm.charWidth(s)) / 2;
- g.drawString(String.valueOf(s),
- charOffset + (av.charWidth * (i - start)),
- pady);
-
- }
- }
- }
-
- boolean newFeatureAdded = false;
- /**
- * Called when alignment in associated view has new/modified features
- * to discover and display.
- *
- */
- public void featuresAdded()
- {
- lastSeq=null;
- findAllFeatures();
- }
-
- boolean findingFeatures = false;
- /**
- * search the alignment for all new features, give them a colour and display
- * them. Then fires a PropertyChangeEvent on the changeSupport object.
- *
- */
- synchronized void findAllFeatures()
- {
- findAllFeatures(true); // add all new features as visible
- if (!firing) {
- firing=true;
- changeSupport.firePropertyChange("changeSupport",null,null);
- firing=false;
- }
- }
- /**
- * Searches alignment for all features and updates colours
- *
- * @param newMadeVisible
- * if true newly added feature types will be rendered immediatly
- */
- synchronized void findAllFeatures(boolean newMadeVisible) {
- newFeatureAdded = false;
-
- if (findingFeatures)
- {
- newFeatureAdded = true;
- return;
- }
-
- findingFeatures = true;
-
- if (av.featuresDisplayed == null)
- {
- av.featuresDisplayed = new Hashtable();
- }
-
- allfeatures = new Vector();
- Vector oldfeatures = new Vector();
- if (renderOrder!=null)
- {
- for (int i=0; i<renderOrder.length; i++) {
- if (renderOrder[i]!=null)